Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 static extern int SendCallbackMessage([In] IntPtr hWnd, int wMsg, uint wParam, VfwcapControlCallback lParam);
Ejemplo n.º 3
0
        //public bool capSetCallbackOnWaveStream(Vfw.CallBackDelegate fpProc)
        //{
        //    return 1 == SendMessageW(fWindowHandle, Vfw.WM_CAP_SET_CALLBACK_WAVESTREAM, 0, fpProc);
        //}

        public bool SetCallbackOnCapControl(VfwcapControlCallback fpProc)
        {
            return 1 == SendCallbackMessage(fWindowHandle, Vfw.WM_CAP_SET_CALLBACK_CAPCONTROL, 0, fpProc);
        }