[Mplayer-cvslog] CVS: main/libmpdemux network.c,1.72,1.73 asf_streaming.c,1.36,1.37

Alban Bedel CVS albeu at mplayerhq.hu
Sun Mar 30 19:10:39 CEST 2003


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

Modified Files:
	network.c asf_streaming.c 
Log Message:
Use new config headers
Remove STREAMTYPE_PLAYLIST.


Index: network.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/network.c,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -r1.72 -r1.73
--- network.c	26 Mar 2003 11:35:13 -0000	1.72
+++ network.c	30 Mar 2003 17:10:36 -0000	1.73
@@ -18,7 +18,7 @@
 
 #include "stream.h"
 #include "demuxer.h"
-#include "../cfgparser.h"
+#include "../m_config.h"
 
 #include "network.h"
 #include "http.h"
@@ -36,7 +36,7 @@
 
 extern int mp_input_check_interrupt(int time);
 
-int asf_streaming_start( stream_t *stream );
+int asf_streaming_start( stream_t *stream, int *demuxer_type );
 int rtsp_streaming_start( stream_t *stream );
 
 /* Variables for the command line option -user, -passwd & -bandwidth */
@@ -1006,7 +1006,9 @@
 			// Send the appropriate HTTP request
 			// Need to filter the network stream.
 			// ASF raw stream is encapsulated.
-			ret = asf_streaming_start( stream );
+			// It can also be a playlist (redirector)
+			// so we need to pass demuxer_type too
+			ret = asf_streaming_start( stream, demuxer_type );
 			if( ret<0 ) {
 				mp_msg(MSGT_NETWORK,MSGL_ERR,"asf_streaming_start failed\n");
 			}
@@ -1040,8 +1042,6 @@
 			if( ret<0 ) {
 				mp_msg(MSGT_NETWORK,MSGL_ERR,"nop_streaming_start failed\n");
 			}
-			if((*demuxer_type) == DEMUXER_TYPE_PLAYLIST)
-			  stream->type = STREAMTYPE_PLAYLIST;
 			break;
 		default:
 			mp_msg(MSGT_NETWORK,MSGL_ERR,"Unable to detect the streaming type\n");

Index: asf_streaming.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/asf_streaming.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- asf_streaming.c	6 Jan 2003 16:42:20 -0000	1.36
+++ asf_streaming.c	30 Mar 2003 17:10:36 -0000	1.37
@@ -11,6 +11,7 @@
 #include "asf.h"
 
 #include "stream.h"
+#include "demuxer.h"
 
 #include "network.h"
 
@@ -24,7 +25,7 @@
 extern int verbose;
 
 
-int asf_http_streaming_start( stream_t *stream );
+int asf_http_streaming_start( stream_t *stream, int *demuxer_type );
 int asf_mmst_streaming_start( stream_t *stream );
 
 
@@ -47,7 +48,7 @@
 // 		In MPlayer case since HTTP support is more reliable,
 // 		we are doing HTTP first then we try MMST if HTTP fail.
 int
-asf_streaming_start( stream_t *stream ) {
+asf_streaming_start( stream_t *stream, int *demuxer_type) {
 	char proto_s[10];
 	int fd = -1;
 	
@@ -58,7 +59,7 @@
 		!strncasecmp( proto_s, "http_proxy", 10)
 		) {
 		mp_msg(MSGT_NETWORK,MSGL_V,"Trying ASF/HTTP...\n");
-		fd = asf_http_streaming_start( stream );
+		fd = asf_http_streaming_start( stream, demuxer_type );
 		if( fd>-1 ) return fd;
 		mp_msg(MSGT_NETWORK,MSGL_V,"  ===> ASF/HTTP failed\n");
 		if( fd==-2 ) return -1;
@@ -619,7 +620,7 @@
 }
 
 int
-asf_http_streaming_start( stream_t *stream ) {
+asf_http_streaming_start( stream_t *stream, int *demuxer_type ) {
 	HTTP_header_t *http_hdr=NULL;
 	URL_t *url = stream->streaming_ctrl->url;
 	asf_http_streaming_ctrl_t *asf_http_ctrl;
@@ -717,7 +718,7 @@
 						return -1;
 					}
 				}
-				stream->type = STREAMTYPE_PLAYLIST;
+				*demuxer_type = DEMUXER_TYPE_PLAYLIST;
 				done = 1;
 				break;
 			case ASF_Authenticate_e:



More information about the MPlayer-cvslog mailing list