Beispiel #1
0
 void _visFuncFrameRecved(int errorCode, ref yoseen.DataFrame dataFrame)
 {
     //fix20200324
     if (_warden.visPreviewHandle < 0)
     {
         return;
     }
     if (0 == errorCode)
     {
         fdCanvas.algUpdateVIS(dataFrame.H264, dataFrame.Bmp);
     }
     this.Dispatcher.BeginInvoke(_visDelFrameRecved_UI, errorCode, dataFrame);
 }
Beispiel #2
0
 void _visFuncFrameRecved_UI(int errorCode, yoseen.DataFrame dataFrame)
 {
     if (_warden.visPreviewHandle < 0)
     {
         return;
     }
     if (errorCode == 0)
     {
         //
         fdCanvas.UpdateVIS(ref dataFrame);
     }
     else if (errorCode == (int)yoseen.YoseenErrorType.YET_PreviewRecoverBegin)
     {
         Trace.WriteLine(string.Format("{0:yyyy-MM-dd HH:mm:ss}, VIS recover begin", DateTime.Now));
     }
     else if (errorCode == (int)yoseen.YoseenErrorType.YET_PreviewRecoverEnd)
     {
         Trace.WriteLine(string.Format("{0:yyyy-MM-dd HH:mm:ss}, VIS recover end", DateTime.Now));
     }
 }
Beispiel #3
0
        public void ShowConfig(ref yoseen.DataFrame irFrame, ref yoseen.DataFrame visFrame,
                               ref FDConfig binConfig, DELAfterFDConfig delAfterConfig)
        {
            //
            _delAfterConfig = delAfterConfig;
            _irFrame        = irFrame;
            int ret = yoseen.YoseenPlayback.YoseenPlayback_OpenMem(_ptrPlayback, _irFrame.Head, _irFrame.Temp);

            if (0 > ret)
            {
                return;
            }
            _irFrameHead = (yoseen.DataFrameHeader)Marshal.PtrToStructure(irFrame.Head, typeof(yoseen.DataFrameHeader));

            yoseen.YoseenPlayback.YoseenPlayback_SetImage(_ptrPlayback, ref _clsDevice._bin.IRImage_StrechControl, ref _clsDevice._bin.IRImage_PaletteType);
            ret = yoseen.YoseenPlayback.YoseenPlayback_ReadFrame(_ptrPlayback, 0, ref _irFrame);
            if (ret < 0)
            {
                return;
            }

            //
            _visFrame     = visFrame;
            _visFrameHead = (yoseen.H264RtspHeader)Marshal.PtrToStructure(visFrame.H264, typeof(yoseen.H264RtspHeader));

            /*
             * update data
             */
            configCanvas.BeginUpdate(_irFrameHead.Width, _irFrameHead.Height, 0);
            configCanvas.BeginUpdate(_visFrameHead.width, _visFrameHead.height, 1);

            configCanvas.ChangePalette(_clsDevice._bin.IRImage_PaletteType);
            configCanvas.UpdateIR(ref _irFrame);
            configCanvas.UpdateVIS(ref _visFrame);

            configCanvas.LoadConfig(ref binConfig);
            //
            this.ShowDialog();
        }
Beispiel #4
0
 void _funcFrameRecved(int errorCode, ref yoseen.DataFrame dataFrame)
 {
     this.Dispatcher.BeginInvoke(_delFrameRecved_UI, errorCode, dataFrame);
 }