Beispiel #1
0
 private void FrameCallBack(IntPtr lwnd, IntPtr lpVHdr)
 {
     ShowVideo.VIDEOHDR videoHeader = new ShowVideo.VIDEOHDR();
     byte[]             VideoData;
     videoHeader = (ShowVideo.VIDEOHDR)ShowVideo.GetStructure(lpVHdr, videoHeader);
     VideoData   = new byte[videoHeader.dwBytesUsed];
     ShowVideo.Copy(videoHeader.lpData, VideoData);
     if (this.RecievedFrame != null)
     {
         this.RecievedFrame(VideoData);
     }
 }
Beispiel #2
0
        private void FrameCallBack(IntPtr lwnd, IntPtr lpVHdr)
        {
            if (this.RecievedFrame != null)
            {
                ShowVideo.VIDEOHDR videoHeader = new ShowVideo.VIDEOHDR();
                byte[]             VideoData;
                videoHeader = (ShowVideo.VIDEOHDR)ShowVideo.GetStructure(lpVHdr, videoHeader);
                VideoData   = new byte[videoHeader.dwBytesUsed];
                ShowVideo.Copy(videoHeader.lpData, VideoData);



                IntPtr         hdc      = API.CreateCompatibleDC(0);
                API.BITMAPINFO bitheder = new API.BITMAPINFO();
                ShowVideo.SendMessage(this.lwndC, ShowVideo.WM_CAP_GET_VIDEOFORMAT, ShowVideo.SizeOf(bitheder), ref bitheder);
                API.BITMAPINFOHEADER hhh     = bitheder.bmiHeader;
                API.BITMAPINFO       bitinfo = new API.BITMAPINFO();

                IntPtr ht = API.CreateDIBSection(IntPtr.Zero, bitheder, API.DIB_RGB_COLORS, videoHeader.lpData, 0, 0);


                this.RecievedFrame(this, VideoData);
            }
        }