[Live-devel] Question regarding ParseRTSPRequestString() and URLSuffix/URLPreSuffix

Mehran Ansari mehran at stretchinc.com
Tue Oct 5 17:15:13 PDT 2010


It seems to me the ParseRTSPRequestString() only handles one specific RTSP URI format and does not handle the generic allowed format. According to RFC2326  syntax and semantics for RTSP URLs is:


   rtsp_URL  =   ( "rtsp:" | "rtspu:" )
                 "//" host [ ":" port ] [ abs_path ]
   host      =   <A legal Internet host domain name of IP address
                 (in dotted decimal form), as defined by Section 2.1
                 of RFC 1123 \cite{rfc1123}>
   port      =   *DIGIT

   abs_path is defined in [H3.2.1].

This means I should be allowed to have a rtsp_URL of:
   
   RTSP://192.168.1.20:8554/PSIA/Streaming/channels/0 

But this function parses this URL as URLSuffix="0" and URLPreSuffix="channels"

I modified this function such that it sets URLSuffix="PSIA/Streaming/channels/0" and URLPreSuffix="192.168.1.20:8554"
and named my session to be the value of URLSuffix. Now I am having problem with RTSP_cmd_setup as the openRTCP client appends "track1" to the URL which makes this session non-existent. Then I realized that is the reason you have URLSuffix and URLPreSuffix to remove "track1" and see the actual URL.

In my server I won't have different tracks and according to the RFC 2326: 

   If the presentation comprises only a single stream, the media-level
   "a=control:" attribute may be omitted altogether.

Is there any way for me to disable this appending of "track1" to the URL? I mean, other than actually deleting it from the sdpFmt in OnDemandServerMediaSession.cpp. If I do this would I cause other problem?

Thank you for any help you can give me in this regard.

--Mehran


More information about the live-devel mailing list