[MPlayer-dev-eng] Re: [PATCH] alternative extend extensions to include reflector:

adland adland123 at yahoo.com
Sun Apr 4 02:28:34 CEST 2004


> 
> The one I am testing with is
> rtsp://a539.l830021913.c8300.e.lr.akamaistream.net/live/D/539/8300/v0001
>/reflector:21913
> 

format for these type of reflectors seems to be rtsp://host/path/reflector:XXXX
where XXXX is numeric

I wrote an alternate patch which just extends the extension testing to
look for these reflectors

i am including as an optin for patch

--- main/libmpdemux/network.c   2004-03-13 11:10:02.000000000 -0500
+++ updated/libmpdemux/network.c        2004-04-03 19:16:34.000000000 -0500
@@ -686,14 +686,42 @@
                        // Checking for Real rtsp://
                        // Extension based detection, should be replaced with
 something based on server answer
                        if( url->file!= NULL ) {
-                               char *p;
+                               char *p,*r;
+                               int len,cp,reflector;
+
                                for( p = url->file; p[0]; p++ ) {
                                        if( p[0] == '.' && tolower(p[1]) == 'r'
 && (tolower(p[2]) == 'm' || tolower(p[2]) == 'a') && (!p[3] || p[3] == '?' ||
 p[3] == '&') ) {
                                                *file_format =
 DEMUXER_TYPE_REAL;
                                                return 0;
                                        }
                                }
-                       }
+
+                                //check for reflector url which does not have 
+                                //extension
+                                 p=url->file;
+                                 r=strstr(p,"reflector:");
+                                 reflector=0;
+
+                                 if (r != NULL)
+                                 {
+                                   reflector=1;
+                                   len=strlen(p);
+                                   for (cp=(r-p)+10;cp<len;cp++)
+                                   {
+                                     if (!isdigit(p[cp]))
+                                     {
+                                        reflector=0;
+                                        break;
+                                     }
+                                   }
+                                 }
+
+                                 if (reflector)
+                                {
+                                    *file_format = DEMUXER_TYPE_REAL;
+                                    return 0;
+                                }
+
+                       }
                        mp_msg(MSGT_NETWORK,MSGL_INFO,"Not a Realmedia rtsp url
. Trying standard rtsp protocol.\n");
 #ifdef STREAMING_LIVE_DOT_COM
                        *file_format = DEMUXER_TYPE_RTP;





More information about the MPlayer-dev-eng mailing list