|
@@ -23,7 +23,7 @@ namespace FISIMPL
|
|
|
private PipeClient _pipeClient;
|
|
|
private PipeServer _pipeServer;
|
|
|
private FISImageFrameData _imageFrameData;
|
|
|
-
|
|
|
+ private FISBase64ImageData _tempBase64ImageData;
|
|
|
/// <summary>
|
|
|
/// Raised when local camera live execute
|
|
|
/// </summary>
|
|
@@ -677,6 +677,7 @@ namespace FISIMPL
|
|
|
if (_liveVideoV2 == null)
|
|
|
{
|
|
|
Logger.WriteLineError($"ReUploadRestVid error: live videoV2 feature is null");
|
|
|
+ return;
|
|
|
}
|
|
|
_liveVideoV2.ReUploadRestVid();
|
|
|
}
|
|
@@ -686,5 +687,47 @@ namespace FISIMPL
|
|
|
Logger.WriteLineError($"LiveVideoServiceForWindows StopRecordVideo Error:{ex}");
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ public FISBase64ImageData GetCurrentCaptureFrame()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ if (FISIMPL.IsConnectWithOldServer)
|
|
|
+ {
|
|
|
+ Logger.WriteLineError($"GetCurrentCaptureFrame error: old Server doesn't support");
|
|
|
+ return new FISBase64ImageData(0, 0, "", FailReasonForNullBase64Data.OldServerNotSupport);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ if (_liveVideoV2 == null)
|
|
|
+ {
|
|
|
+ Logger.WriteLineError($"GetCurrentCaptureFrame error: live videoV2 feature is null");
|
|
|
+ return new FISBase64ImageData(0, 0, "", FailReasonForNullBase64Data.vCloudIsDisconnected);
|
|
|
+ }
|
|
|
+ var videoFrameData = _liveVideoV2.GetCurrentCaptureFrame();
|
|
|
+ if (videoFrameData == null)
|
|
|
+ {
|
|
|
+ return new FISBase64ImageData(0, 0, "", FailReasonForNullBase64Data.Unknown);
|
|
|
+ }
|
|
|
+ else if (_tempBase64ImageData == null)
|
|
|
+ {
|
|
|
+ _tempBase64ImageData = new FISBase64ImageData(videoFrameData.Width, videoFrameData.Height, "");
|
|
|
+ }
|
|
|
+ else if (_tempBase64ImageData.Width != videoFrameData.Width || _tempBase64ImageData.Height != videoFrameData.Height)
|
|
|
+ {
|
|
|
+ _tempBase64ImageData.Width = videoFrameData.Width;
|
|
|
+ _tempBase64ImageData.Height = videoFrameData.Height;
|
|
|
+ }
|
|
|
+ _tempBase64ImageData.Base64Data = videoFrameData.Base64Data;
|
|
|
+ _tempBase64ImageData.FailMsg = (FailReasonForNullBase64Data)videoFrameData.FailMsg;
|
|
|
+ return _tempBase64ImageData;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ Logger.WriteLineError($"LiveVideoServiceForWindows GetCurrentCaptureFrame Error:{ex}");
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|