[Mplayer-cvslog] CVS: main/libmpdemux demuxer.h,1.31,1.32 network.c,1.35,1.36

Alban Bedel CVS albeu at mplayer.dev.hu
Thu Feb 21 14:14:54 CET 2002


Update of /cvsroot/mplayer/main/libmpdemux
In directory mplayer:/var/tmp.root/cvs-serv28252/libmpdemux

Modified Files:
	demuxer.h network.c 
Log Message:
Support for retriving mp3 playlist from the network


Index: demuxer.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demuxer.h,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- demuxer.h	20 Feb 2002 16:59:25 -0000	1.31
+++ demuxer.h	21 Feb 2002 13:14:52 -0000	1.32
@@ -25,6 +25,9 @@
 #define DEMUXER_TYPE_MAX 17
 
 #define DEMUXER_TYPE_DEMUXERS (1<<16)
+// A virtual demuxer type for the network code
+#define DEMUXER_TYPE_PLAYLIST (2<<16)
+
 
 #define DEMUXER_TIME_NONE 0
 #define DEMUXER_TIME_PTS 1

Index: network.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/network.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- network.c	17 Feb 2002 00:05:08 -0000	1.35
+++ network.c	21 Feb 2002 13:14:52 -0000	1.36
@@ -49,6 +49,10 @@
 	{ "video/x-ms-wvx", DEMUXER_TYPE_ASF },
 	{ "video/x-ms-wmv", DEMUXER_TYPE_ASF },
 	{ "video/x-ms-wma", DEMUXER_TYPE_ASF },
+	// Playlists
+	{ "audio/x-scpls", DEMUXER_TYPE_PLAYLIST },
+	{ "audio/x-mpegurl", DEMUXER_TYPE_PLAYLIST },
+	{ "audio/x-pls", DEMUXER_TYPE_PLAYLIST }
 };
 
 static struct {
@@ -70,6 +74,8 @@
 	{ "y4m", DEMUXER_TYPE_Y4M },
 	{ "mp3", DEMUXER_TYPE_AUDIO },
 	{ "wav", DEMUXER_TYPE_AUDIO },
+	{ "pls", DEMUXER_TYPE_PLAYLIST },
+	{ "m3u", DEMUXER_TYPE_PLAYLIST }
 };
 
 streaming_ctrl_t *
@@ -706,6 +712,7 @@
 		case DEMUXER_TYPE_FILM:
 		case DEMUXER_TYPE_ROQ:
 		case DEMUXER_TYPE_AUDIO:
+		case DEMUXER_TYPE_PLAYLIST:
 		case DEMUXER_TYPE_UNKNOWN:
 			// Generic start, doesn't need to filter
 			// the network stream, it's a raw stream
@@ -713,6 +720,8 @@
 			if( ret<0 ) {
 				printf("nop_streaming_start failed\n");
 			}
+			if((*demuxer_type) == DEMUXER_TYPE_PLAYLIST)
+			  stream->type = STREAMTYPE_PLAYLIST;
 			break;
 		default:
 			printf("Unable to detect the streaming type\n");




More information about the MPlayer-cvslog mailing list