I use the OnEndVideoStream Event to detect a disconnection. but the OnEndVideoStream event will respond by providing feedback within 1 minute, when the network is disconnected.
how to set the duration of time / feedback so that it is faster.
OnEndVideoStream Event to detect a disconnection
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: OnEndVideoStream Event to detect a disconnection
Do you play video stream using FFmpeg?
Try to assign RVCamera.FFMPEGProperty.TimeOut = timeout in seconds
Try to assign RVCamera.FFMPEGProperty.TimeOut = timeout in seconds
Re: OnEndVideoStream Event to detect a disconnection
i use GStreamer, not play using FFmpeg
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: OnEndVideoStream Event to detect a disconnection
RVMedia does not set timeout properties for GStreamer video sources, so default timeouts are used.
I can suggest changes in RVMedia source code to set timeout. But these changes are different for different protocols (HTTP(S) / RTSP / UDP)
What video protocol do you use?
I can suggest changes in RVMedia source code to set timeout. But these changes are different for different protocols (HTTP(S) / RTSP / UDP)
What video protocol do you use?
Re: OnEndVideoStream Event to detect a disconnection
i use rstp protocol
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: OnEndVideoStream Event to detect a disconnection
For rtsp, RVMedia uses 'rtspsrc' GStreamer object.
For new version of GStreamer, a launch string for rtspsrc is constructed in the function GetRTSPSourceStr_1_0 (MRVGSTObject unit for VCL and LCL, or fmxMRVGSTObject unit for FireMonkey)
A list of rtspsrc properties can be found here:
https://gstreamer.freedesktop.org/docum ... properties
From these properties, I can see the following:
tcp-timeout
Fail after timeout microseconds on TCP connections (0 = disabled)
Default value : 20000000
As I can see from description, this timeout value is used only when RTSP is based on TCP (it may also be based on UDP). The default value is 20 sec.
timeout
Default value : 5000000
As I understand, this timeout is used for RTSP on UDP, the default value is 5 sec.
You can play with these properties by adding their value to the end of GetRTSPSourceStr_1_0, for example:
If you use Delphi and Windows 32-bit platform, you can simply rebuild your project after making changes in RVMedia source code.
However, in the following cases you need to rebuild RVMedia packages:
- you use Windows 64-bit or Linux platform
- you use C++Builder
- your project uses runtime packages
- when installing, you set the option of adding a path to precompiled units instead of a path to a source code.
You can rebuild packages using Windows Start menu shortcut "Install RVMedia * in Delphi IDE"
For new version of GStreamer, a launch string for rtspsrc is constructed in the function GetRTSPSourceStr_1_0 (MRVGSTObject unit for VCL and LCL, or fmxMRVGSTObject unit for FireMonkey)
A list of rtspsrc properties can be found here:
https://gstreamer.freedesktop.org/docum ... properties
From these properties, I can see the following:
tcp-timeout
Fail after timeout microseconds on TCP connections (0 = disabled)
Default value : 20000000
As I can see from description, this timeout value is used only when RTSP is based on TCP (it may also be based on UDP). The default value is 20 sec.
timeout
Code: Select all
Retry TCP transport after UDP timeout microseconds (0 = disabled)
As I understand, this timeout is used for RTSP on UDP, the default value is 5 sec.
You can play with these properties by adding their value to the end of GetRTSPSourceStr_1_0, for example:
Code: Select all
AddParam(Result, 'tcp-timeout=10000000');
However, in the following cases you need to rebuild RVMedia packages:
- you use Windows 64-bit or Linux platform
- you use C++Builder
- your project uses runtime packages
- when installing, you set the option of adding a path to precompiled units instead of a path to a source code.
You can rebuild packages using Windows Start menu shortcut "Install RVMedia * in Delphi IDE"