public int VideoCapture_CallBack(VIDEO_SAMPLE_INFO VideoInfo, IntPtr pbData, int lLength, long tRefTime, LONGPTR lUserData)
        {
            if ((DateTime.Now - dtimeLastCalback).TotalMilliseconds >= avermediaTools.videoCaptureInfoForCallBack.dwDuration)
            {
                dtimeLastCalback = DateTime.Now;
                lock (objSync)
                {
                    if (imageStatsForm != null && !imageStatsForm.Disposing)
                    {
                        byte[] bData = new byte[lLength - 1];
                        Marshal.Copy(pbData, bData, 0, lLength - 1);
                        try
                        {
                            imageStatsForm.PreviewImage(bData, VideoInfo);
                        }
                        catch (Exception ex) { }
                    }
                }

                iCount++;
                ulong length = VideoInfo.dwWidth * VideoInfo.dwHeight;
                Console.WriteLine(DateTime.Now.ToString("HH:mm:ss.fff") + " -> " + iCount + "   /   " + lLength + "   /   " + length);
            }
            return(1);
        }
Esempio n. 2
0
 public int VideoCapture_CallBack1(VIDEO_SAMPLE_INFO VideoInfo, IntPtr pbData, int lLength, long tRefTime, LONGPTR lUserData)
 {
     return(1);
 }