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?
RVCamRecorder hangs on RVCamRecorder.Active := false;
RVCamRecorder hangs on RVCamRecorder.Active := false;
Last edited by ya_vanka on Sat Nov 02, 2019 8:31 pm, edited 1 time in total.
Re: RVCamRecorder hangs on RVCamRecorder.Active := false;
The similar problem exists in demo project VideoRecorder.
If I try to connect to non existing stream and then press Start recording button it hangs as well in TRVMFFMPEG.VideoEncodeFile at the same line glCriticalSection.SafeEnter;
If I try to connect to non existing stream and then press Start recording button it hangs as well in TRVMFFMPEG.VideoEncodeFile at the same line glCriticalSection.SafeEnter;
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: RVCamRecorder hangs on RVCamRecorder.Active := false;
Does this problem exist in version 7.0?
Re: RVCamRecorder hangs on RVCamRecorder.Active := false;
Partially.
The application hangs for 15-20 seconds if I press Start recording button while it tries to connect.
Once it shows an error "Video stream error" the applications starts to respond.
The application hangs for 15-20 seconds if I press Start recording button while it tries to connect.
Once it shows an error "Video stream error" the applications starts to respond.
Re: RVCamRecorder hangs on RVCamRecorder.Active := false;
I moved line RVCamRecorder.Active := true;
inside RVCamera1GetImage(Sender: TObject; img: TRVMBitmap); event handler.
It looks like that it solved a problem.
Is this a correct work-around?
inside RVCamera1GetImage(Sender: TObject; img: TRVMBitmap); event handler.
It looks like that it solved a problem.
Is this a correct work-around?
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: RVCamRecorder hangs on RVCamRecorder.Active := false;
Well, if it makes things faster, it's ok.