コード例 #1
0
 void StartSerialSyncCapture()
 {
     _fpsStopWatch = Stopwatch.StartNew();
     SerialManager.SerialAcknowledged += OnSerialAcknowledged;
     MatrixFrame.InjestGDIBitmap(ScreenRecorder.ScreenToBitmap(), ScreenRecorder.InterpMode);
     //    Dispatcher.Invoke(() => { FrameToPreview(); });
     SerialManager.PushFrame();
 }
コード例 #2
0
 void OnSerialAcknowledged()
 {
     if (SyncSerial == true)
     {
         MatrixFrame.InjestGDIBitmap(ScreenRecorder.ScreenToBitmap(), ScreenRecorder.InterpMode);
         //     Dispatcher.Invoke(() => { FrameToPreview(); });
         SerialManager.PushFrame();
         LocalFPS             = SerialFPS = _fpsStopWatch.ElapsedMilliseconds - _localPreviousMillis;
         _localPreviousMillis = _fpsStopWatch.ElapsedMilliseconds;
     }
 }
コード例 #3
0
ファイル: MainWindow.xaml.cs プロジェクト: surejm/LMCSHD
 void PixelDataCallback(Bitmap capturedBitmap)
 {
     frame.InjestGDIBitmap(capturedBitmap);
     if (frame.ContentImage != null)
     {
         frame.ContentImage.Freeze();
         Dispatcher.Invoke(() => { UpdateContentImage(); });
     }
     Dispatcher.Invoke(() => { UpdatePreview(); });
     sm.SerialSendFrame(frame);
     GC.Collect();
 }
コード例 #4
0
        void PixelDataCallback(Bitmap capturedBitmap)
        {
            LocalFPS             = _fpsStopWatch.ElapsedMilliseconds - _localPreviousMillis;
            _localPreviousMillis = _fpsStopWatch.ElapsedMilliseconds;

            MatrixFrame.InjestGDIBitmap(capturedBitmap, ScreenRecorder.InterpMode);

            //     Dispatcher.Invoke(() => { FrameToPreview(); });

            if (SerialManager.PushFrame())
            {
                SerialFPS             = _fpsStopWatch.ElapsedMilliseconds - _serialPreviousMillis;
                _serialPreviousMillis = _fpsStopWatch.ElapsedMilliseconds;
            }
            //GC.Collect();
        }