[vlc-devel] live555 connection timeout (patch included)

Sébastien Escudier sebastien-devel at celeos.eu
Thu Oct 2 09:16:52 CEST 2008



Hi

I modified live555 library and live555 vlc module to allow a configurable
connection timeout.

Waiting can be very long because of two things :
- in live555 vlc module we call sendOptionsCmd and then describeURL, where we
have a blocking connect.
- This is done 3 times because of i_lefttries set to 3 (by the way, is it really
necessary to try 3 times in case of timeout ?)

So the blocking connect will be called 6 times in case of failure.

So you have to keep in mind that if you set a timeout of 5 sec you have to wait
for 30 sec before vlc stop trying again and again. But if you ask to quit, vlc
can quit between two retry (so 10 sec max).
But this is far better than without this patch, where you can wait several
minutes.

To use vlc with this patch you can use --rtsp-timeout 5 to set the connection
timeout to 5 seconds.

Please note that live555 _library_ modifications (two file) is compatible with
older versions of vlc (or other softwares based on this library).
live555 library modifications is done against 2008.09.02 version, you just have
to replace the two files and recompile it.
Then you can apply vlc attached patch and recompile vlc.

Regards.

PS : this is a repost of a mail sent yesterday, which may have been rejected
because of the size (?), 127ko.
Here I just attach diff files for live555 library. You can also find modified
files here :
http://www.celeos.eu/vlc/RTSPClient.cpp
http://www.celeos.eu/vlc/RTSPClient.hh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RTSPClient.cpp.diff
Type: text/x-diff
Size: 10244 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20081002/b1496a8d/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RTSPClient.hh.diff
Type: text/x-diff
Size: 4228 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20081002/b1496a8d/attachment-0001.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-use-timout-value-with-live555-library.patch
Type: text/x-diff
Size: 2319 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20081002/b1496a8d/attachment.patch>


More information about the vlc-devel mailing list