[Live-devel] live555 (via vlc) and WMS

John Sullivan john at kanargh.force9.co.uk
Wed Sep 14 12:32:42 PDT 2011


I just hit an upgrade from live555-0-0.27.2010.04.09.fc14 to
live555-0-0.30.2011.01.24.fc15 (rpmfusion builds for Fedora) which
broke a local hack I was using - I was meaning to push it at some
point and now seems like a good opportunity to try and get a proper
supported fix in.

I was doing:

--- live.orig/liveMedia/RTSPClient.cpp.jsorig   2011-08-18 18:29:38.981817871 +0100
+++ live/liveMedia/RTSPClient.cpp       2011-08-18 18:32:56.390261409 +0100
@@ -981,7 +981,7 @@
       "%s"
       "\r\n";

-    char const* sessURL = sessionURL(session);
+    char const* sessURL = fServerIsMicrosoft ? fBaseURL : sessionURL(session);
     unsigned cmdSize = strlen(cmdFmt)
       + strlen(sessURL)
       + 20 /* max int len */


But I now see that fServerIsMicrosoft is missing and the Server
header isn't parsed with the code comment:

      // For now, omit parsing the "Server:" header (unless someone
      // convinces us that we still need to treat Windows Media Server
      // especially

Hopefully I can do that!

The issue is (as you can tell from the patch) URL generation under
some circumstances. For normal RTSP to WMS, using vlc (which uses
live555):

URL                    = rtsp://server/filename.wmv
SDP session control    = rtsp://server/filename.wmv/
SDP subsession control = video
SETUP rtsp://server/filename.wmv/video
PLAY  rtsp://server/filename.wmv/

This works. If however we try and pass a query string:

URL                    = rtsp://server/filename.wmv?param=56565
SDP session control    = rtsp://server/filename.wmv?param=56565/
SDP subsession control = rtsp://server/filename.wmv/video
SETUP rtsp://server/filename.wmv/video
PLAY  rtsp://server/filename.wmv?param=56565/  <--- 400 Bad Request

WMS generates a session control attribute it itself can't understand.
It appears to realise this partially and fixes up the subsession URL
so that SETUP still works, but will not accept the session URL in the
PLAY command.

WMP appears to use the SDP session and subsession URLs for SETUP, but
ignores the SDP for PLAY and other aggregate level commands such as
TEARDOWN etc. and simply uses the original base URL. This may be
non-standard, but WMP and WMS appear to rely on this, in this case.

(For clarity: WMP ignores the SDP control even in the former case and
always generates a PLAY without the terminal slash. vlc works too in
this case because WMS doesn't appear to care whether a URL without a
query string ends in a slash or not. But with the query string, using
the original URL is critical.)

John
-- 
Dead stars still burn



More information about the live-devel mailing list