[MPlayer-dev-eng] [PATCH] windows media playlists

Scott Heavner sdh at po.cwru.edu
Sat Oct 9 07:38:35 CEST 2004


There seem to be some problems with the .asx style playlists.  I haven't
tested these extensively, but they work on two streams that didn't work
before.

http://www.yayinonline.com/asx/radyoasx.asp?a=782&sk=2&rd=radyomydonoseturk&lp=2blank
http://www.tv-radio.com/live/asx/topmusic.asx

One of the problems is that we bounce back to the main playlist handler
with  ASF_Redirector_e, but the stream protocol is stuck as http -- so mms
feeds that don't use a http communication protocol won't work.  I'm
resetting it in mplayer.c to UNKNOWN after we load the playlist.  I don't
know if this would interfere with people passing a bunch of playlists on
the command line or not?

I added "application/x-mplayer2" to the ASF mime types in network.c --
maybe we want to call this a playlist instead of an ASF type?  But it
works this way.

And then there's the case of the braindead server, that's telling me the
.asx is a "video/x-ms-asf" ... any idea how to handle this?  I said if
response size > 0 assume its not a stream, is that legit?   And I only
used it to kill the video/x-ms-asf, not the other 3 types that are checked
at the top of asf_http_streaming_type().  Or should we sneak a peek at the
contents and see if it starts with <ASX or <HTML or <!-- ?

I have no way to apply this so I hope someone picks it up and verifies it
and applies it.

-scott



Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.793
diff -u -r1.793 mplayer.c
--- mplayer.c   7 Oct 2004 00:14:22 -0000       1.793
+++ mplayer.c   9 Oct 2004 05:16:38 -0000
@@ -1325,6 +1325,7 @@
     mp_msg(MSGT_CPLAYER,MSGL_V,"Parsing playlist %s...\n",filename);
     entry = parse_playtree(stream,0);
     eof=playtree_add_playlist(entry);
+    file_format =  DEMUXER_TYPE_UNKNOWN;
     goto goto_next_file;
   }
   stream->start_pos+=seek_to_byte;
Index: libmpdemux/asf_streaming.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/asf_streaming.c,v
retrieving revision 1.49
diff -u -r1.49 asf_streaming.c
--- libmpdemux/asf_streaming.c  21 Jul 2004 10:18:29 -0000      1.49
+++ libmpdemux/asf_streaming.c  9 Oct 2004 05:16:41 -0000
@@ -427,7 +427,8 @@
        if(     !strcasecmp(content_type, "application/octet-stream") ||
                !strcasecmp(content_type,
"application/vnd.ms.wms-hdr.asfv1") ||        // New in
Corona, first request
                !strcasecmp(content_type, "application/x-mms-framed") ||  
             // New in Corana, second request
-               !strcasecmp(content_type, "video/x-ms-asf")) {
+               ( !strcasecmp(content_type, "video/x-ms-asf") && ( ! http_hdr
+                        || ! http_hdr->body_size ) ) ) {               //
if got header size, skip it

                if( strstr(features, "broadcast") ) {
                        mp_msg(MSGT_NETWORK,MSGL_V,"=====> ASF Live
stream\n");
Index: libmpdemux/network.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/network.c,v
retrieving revision 1.105
diff -u -r1.105 network.c
--- libmpdemux/network.c        25 Jul 2004 00:37:07 -0000      1.105
+++ libmpdemux/network.c        9 Oct 2004 05:16:43 -0000
@@ -75,6 +75,7 @@
        // MOV => video/quicktime
        { "video/quicktime", DEMUXER_TYPE_MOV },
        // ASF
+       { "application/x-mplayer2", DEMUXER_TYPE_ASF },
         { "audio/x-ms-wax", DEMUXER_TYPE_ASF },
        { "audio/x-ms-wma", DEMUXER_TYPE_ASF },
        { "video/x-ms-asf", DEMUXER_TYPE_ASF },




More information about the MPlayer-dev-eng mailing list