コード例 #1
0
ファイル: VfwCameraDevice.cs プロジェクト: Wiladams/NewTOAPIA
        public VfwCameraDevice(int index, int width, int height, int fps, int windowStyle, IntPtr parentWindow)
            : base(index, width, height, fps, windowStyle, parentWindow)
        {


            // Setup the delegate functions that will be called
            fVideoStreamDelegate = StreamCallBack;            
            fVideoFrameDelegate = FrameCallBack;
            fControlDelegate = ControlCallback;
            fErrorDelegate = ErrorCallback;

            SetCallbackOnVideoStream(fVideoStreamDelegate);
            SetCallbackOnFrame(fVideoFrameDelegate);
            SetCallbackOnCapControl(fControlDelegate);
            SetCallbackOnStatus(fStatusDelegate);
            SetCallbackOnError(fErrorDelegate);
        }
コード例 #2
0
 public bool SetCallbackOnVideoStream(VfwVideoFrameDelegate fpProc)
 {
     bool success = 1 == SendCallbackMessage(fWindowHandle, Vfw.WM_CAP_SET_CALLBACK_VIDEOSTREAM, 0, fpProc);
     return success;
 }
コード例 #3
0
 static extern int SendCallbackMessage([In] IntPtr hWnd, int wMsg, uint wParam, VfwVideoFrameDelegate lParam);
コード例 #4
0
        //public bool capSetCallbackOnYield(Vfw.CallBackDelegate fpProc)
        //{
        //    return 1 == SendCallbackMessage(fWindowHandle, Vfw.WM_CAP_SET_CALLBACK_YIELD, 0, fpProc);
        //}

        public bool SetCallbackOnFrame(VfwVideoFrameDelegate fpProc)
        {
            return 1 == SendCallbackMessage(fWindowHandle, Vfw.WM_CAP_SET_CALLBACK_FRAME, 0, fpProc);
        }