RVCamRecorder hangs on RVCamRecorder.Active := false;
Posted: Sat Nov 02, 2019 1:57 pm
I have a problem with RVCamRecorder (version 6.1).
I connect to an rtsp stream via following lines:
RVCamera.DeviceType := rvdtRTSP;
RVCamera.URL := 'rtsp://127.0.0.1:8554/stream.sdp';
and then start recording:
RVCamRecorder.OutputFileName := 'out1.avi'';
RVCamRecorder.Active := true;
Then I disconnect via:
if (RVCamRecorder.Active) then RVCamRecorder.Active := false;
if (RVCamera.IsVideoPlaying) then RVCamera.Abort;
If rtsp stream exists ('rtsp://127.0.0.1:8554/stream.sdp) then everything works. But If there is no rtsp stream and connection is not established then applications hangs on the line RVCamRecorder.Active := false;
I've traced the problem and it hangs in TRVMFFMPEG.VideoEncodeDeinit; at line glCriticalSection.SafeEnter;
And then
while not TryEnter_ do
RVMWait(RV_AbortWaitTime);
So, why does it hang and what can I do to avoid it?
I connect to an rtsp stream via following lines:
RVCamera.DeviceType := rvdtRTSP;
RVCamera.URL := 'rtsp://127.0.0.1:8554/stream.sdp';
and then start recording:
RVCamRecorder.OutputFileName := 'out1.avi'';
RVCamRecorder.Active := true;
Then I disconnect via:
if (RVCamRecorder.Active) then RVCamRecorder.Active := false;
if (RVCamera.IsVideoPlaying) then RVCamera.Abort;
If rtsp stream exists ('rtsp://127.0.0.1:8554/stream.sdp) then everything works. But If there is no rtsp stream and connection is not established then applications hangs on the line RVCamRecorder.Active := false;
I've traced the problem and it hangs in TRVMFFMPEG.VideoEncodeDeinit; at line glCriticalSection.SafeEnter;
And then
while not TryEnter_ do
RVMWait(RV_AbortWaitTime);
So, why does it hang and what can I do to avoid it?