[vlc-devel] [PATCH 2/2] live555: Use OPTIONS as keep-alive fallback
Julian Scheel
julian at jusst.de
Thu Jun 18 17:33:59 CEST 2015
So far no keep-alive messages are sent when GET_PARAMETERS is not supported by
the server. Change this to fall back to sending OPTIONS as keep-alive message,
which is the default keep-alive message in the SAT>IP specification. As
RFC2326 does not enforce a specific command as keep-alive message this shall
be valid for any compliant RTSP server.
Signed-off-by: Julian Scheel <julian at jusst.de>
---
modules/access/live555.cpp | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/modules/access/live555.cpp b/modules/access/live555.cpp
index ec1e513..ada0d3f 100644
--- a/modules/access/live555.cpp
+++ b/modules/access/live555.cpp
@@ -1234,9 +1234,9 @@ static int Play( demux_t *p_demux )
if( p_sys->i_timeout <= 0 )
p_sys->i_timeout = 60; /* default value from RFC2326 */
- /* start timeout-thread only if GET_PARAMETER is supported by the server */
- /* or start it if wmserver dialect, since they don't report that GET_PARAMETER is supported correctly */
- if( !p_sys->p_timeout && ( p_sys->b_get_param || var_InheritBool( p_demux, "rtsp-wmserver" ) ) )
+ /* start timeout-thread. GET_PARAMETER will be used if supported by
+ * the server. OPTIONS will be used as a fallback */
+ if( !p_sys->p_timeout )
{
msg_Dbg( p_demux, "We have a timeout of %d seconds", p_sys->i_timeout );
p_sys->p_timeout = (timeout_thread_t *)malloc( sizeof(timeout_thread_t) );
@@ -1285,7 +1285,13 @@ static int Demux( demux_t *p_demux )
if( p_sys->b_timeout_call && p_sys->rtsp && p_sys->ms )
{
char *psz_bye = NULL;
- p_sys->rtsp->sendGetParameterCommand( *p_sys->ms, NULL, psz_bye );
+ /* Use GET_PARAMETERS if supported. wmserver dialect supports
+ * it, but does not report this properly. */
+ if( p_sys->b_get_param || var_GetBool( p_demux, "rtsp-wmserver" ) )
+ p_sys->rtsp->sendGetParameterCommand( *p_sys->ms, NULL, psz_bye );
+ else
+ p_sys->rtsp->sendOptionsCommand(NULL, NULL);
+
p_sys->b_timeout_call = false;
}
--
2.4.3
More information about the vlc-devel
mailing list