[vlc-devel] commit: live555: handle WMServer as a special case (Jean-Paul Saman )

git version control git at videolan.org
Fri Jul 24 14:28:35 CEST 2009


vlc | branch: master | Jean-Paul Saman <jpsaman at videolan.org> | Fri Jul 24 13:38:03 2009 +0200| [1d07aed4c0cad38bfdf7c0283c1f1de4c38875c4] | committer: Jean-Paul Saman 

live555: handle WMServer as a special case

This patch adds --rtsp-wmserver which is needed to support pause mode. WMServer does not report any of the known RTSP OPTIONS when asking for it. Instead it returns a list of non-standard options.

Conflicts:

	modules/demux/live555.cpp

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1d07aed4c0cad38bfdf7c0283c1f1de4c38875c4
---

 modules/demux/live555.cpp |   17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/modules/demux/live555.cpp b/modules/demux/live555.cpp
index ca302f4..e92bfdd 100644
--- a/modules/demux/live555.cpp
+++ b/modules/demux/live555.cpp
@@ -82,6 +82,11 @@ static void Close( vlc_object_t * );
     "dialect of RTSP. With this parameter VLC will try this dialect, but "\
     "then it cannot connect to normal RTSP servers." )
 
+#define WMSERVER_TEXT N_("WMServer RTSP dialect")
+#define WMSERVER_LONGTEXT N_("WMServer uses an unstandard dialect " \
+    "of RTSP. Selecting this parameter will tell VLC to assume some " \
+    "options contrary to RFC 2326 guidelines.")
+
 #define USER_TEXT N_("RTSP user name")
 #define USER_LONGTEXT N_("Sets the username for the connection, " \
     "if no username or password are set in the url.")
@@ -131,6 +136,9 @@ vlc_module_begin ()
             change_safe()
         add_bool(   "rtsp-kasenna", false, NULL, KASENNA_TEXT,
                     KASENNA_LONGTEXT, true )
+        add_bool(   "rtsp-wmserver", false, NULL, WMSERVER_TEXT,
+                    WMSERVER_LONGTEXT, true)
+            change_safe()
         add_string( "rtsp-user", NULL, NULL, USER_TEXT,
                     USER_LONGTEXT, true )
         add_password( "rtsp-pwd", NULL, NULL, PASS_TEXT,
@@ -548,6 +556,9 @@ describe:
         p_sys->b_get_param = (bool)strstr( psz_options, "GET_PARAMETER" );
     delete [] psz_options;
 
+    if( var_CreateGetBool( p_demux, "rtsp-wmserver" ) )
+       p_sys->b_get_param = true;
+
 #if LIVEMEDIA_LIBRARY_VERSION_INT >= 1223337600
     p_sdp = p_sys->rtsp->describeWithPassword( psz_url, psz_user, psz_pwd,
                           var_GetBool( p_demux, "rtsp-kasenna" ), i_timeout );
@@ -1324,7 +1335,8 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
 
             *pb = (p_sys->rtsp != NULL) &&
                     (p_sys->i_npt_length > 0) &&
-                    !var_GetBool( p_demux, "rtsp-kasenna" );
+                    ( !var_GetBool( p_demux, "rtsp-kasenna" ) ||
+                      !var_GetBool( p_demux, "rtsp-wmserver" ) );
             *pb2 = false;
             return VLC_SUCCESS;
 
@@ -1333,7 +1345,8 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             double f_scale, f_old_scale;
 
             if( !p_sys->rtsp || (p_sys->i_npt_length <= 0) ||
-                var_GetBool( p_demux, "rtsp-kasenna" ) )
+                var_GetBool( p_demux, "rtsp-kasenna" ) ||
+                var_GetBool( p_demux, "rtsp-wmserver" ) )
                 return VLC_EGENERIC;
 
             /* According to RFC 2326 p56 chapter 12.35 a RTSP server that




More information about the vlc-devel mailing list