From c5c742302c5556624940964d319b7b7b88499825 Mon Sep 17 00:00:00 2001 From: albeu Date: Sun, 30 Mar 2003 17:10:36 +0000 Subject: Use new config headers Remove STREAMTYPE_PLAYLIST. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9750 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/asf_streaming.c | 11 ++++++----- libmpdemux/network.c | 10 +++++----- 2 files changed, 11 insertions(+), 10 deletions(-) (limited to 'libmpdemux') diff --git a/libmpdemux/asf_streaming.c b/libmpdemux/asf_streaming.c index 569447f556..0e3eaf8cdb 100644 --- a/libmpdemux/asf_streaming.c +++ b/libmpdemux/asf_streaming.c @@ -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 @@ int asf_mmst_streaming_start( stream_t *stream ); // 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 @@ asf_streaming_start( stream_t *stream ) { !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 @@ asf_http_parse_response(asf_http_streaming_ctrl_t *asf_http_ctrl, HTTP_header_t } 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 @@ asf_http_streaming_start( stream_t *stream ) { return -1; } } - stream->type = STREAMTYPE_PLAYLIST; + *demuxer_type = DEMUXER_TYPE_PLAYLIST; done = 1; break; case ASF_Authenticate_e: diff --git a/libmpdemux/network.c b/libmpdemux/network.c index 696a746491..ed80d65a98 100644 --- a/libmpdemux/network.c +++ b/libmpdemux/network.c @@ -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 stream_cache_size; 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 @@ streaming_start(stream_t *stream, int *demuxer_type, URL_t *url) { // 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 @@ streaming_start(stream_t *stream, int *demuxer_type, URL_t *url) { 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"); -- cgit v1.2.3