[Mplayer-cvslog] CVS: main/libmpdemux asf_streaming.c,1.26,1.27

Bertrand Baudet bertrand at mplayerhq.hu
Wed May 15 00:33:32 CEST 2002


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

Modified Files:
	asf_streaming.c 
Log Message:
Enable mmst support. MMST will be tried if the HTTP support failed.


Index: asf_streaming.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/asf_streaming.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- asf_streaming.c	30 Apr 2002 16:58:53 -0000	1.26
+++ asf_streaming.c	14 May 2002 22:33:30 -0000	1.27
@@ -43,6 +43,12 @@
 //   internet connection, the TCP connection will not get
 //   through
 // * Then we can try HTTP.
+// 
+// Note: 	MMS/HTTP support is now a "well known" support protocol,
+// 		it has been tested for while, not like MMST support.
+// 		WMP sequence is MMSU then MMST and then HTTP.
+// 		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 ) {
 	char proto_s[10];
@@ -50,6 +56,15 @@
 	
 	strncpy( proto_s, stream->streaming_ctrl->url->protocol, 10 );
 	
+	if( 	!strncasecmp( proto_s, "http", 4) || 
+		!strncasecmp( proto_s, "mms", 3)  ||
+		!strncasecmp( proto_s, "http_proxy", 10)
+		) {
+		mp_msg(MSGT_NETWORK,MSGL_V,"Trying ASF/HTTP...\n");
+		fd = asf_http_streaming_start( stream );
+		if( fd!=-1 ) return fd;
+		mp_msg(MSGT_NETWORK,MSGL_V,"  ===> ASF/HTTP failed\n");
+	}
 	if( !strncasecmp( proto_s, "mms", 3) && strncasecmp( proto_s, "mmst", 4) ) {
 		mp_msg(MSGT_NETWORK,MSGL_V,"Trying ASF/UDP...\n");
 		//fd = asf_mmsu_streaming_start( stream );
@@ -58,18 +73,9 @@
 	}
 	if( !strncasecmp( proto_s, "mms", 3) ) {
 		mp_msg(MSGT_NETWORK,MSGL_V,"Trying ASF/TCP...\n");
-		//fd = asf_mmst_streaming_start( stream );
+		fd = asf_mmst_streaming_start( stream );
 		if( fd!=-1 ) return fd;
 		mp_msg(MSGT_NETWORK,MSGL_V,"  ===> ASF/TCP failed\n");
-	}
-	if( 	!strncasecmp( proto_s, "http", 4) || 
-		!strncasecmp( proto_s, "mms", 3)  ||
-		!strncasecmp( proto_s, "http_proxy", 10)
-		) {
-		mp_msg(MSGT_NETWORK,MSGL_V,"Trying ASF/HTTP...\n");
-		fd = asf_http_streaming_start( stream );
-		if( fd!=-1 ) return fd;
-		mp_msg(MSGT_NETWORK,MSGL_V,"  ===> ASF/HTTP failed\n");
 	}
 
 	mp_msg(MSGT_NETWORK,MSGL_ERR,"Unknown protocol: %s\n", proto_s );




More information about the MPlayer-cvslog mailing list