From 968ae4ef1e9a9373416bd0774d797fd4ea2eaa6c Mon Sep 17 00:00:00 2001 From: Derk-Jan Hartman Date: Thu, 23 Sep 2004 20:52:20 +0000 Subject: [PATCH] * if http:// and mime == asf, and name doesn't contain asx (cause they have mime == asf too) then bail http access and let the mms access try. ( VLC now plays http:// urls which are actually mms:// streams and no longer handles asx files when the path doesn't contain "asx" ) * added the aacp (aacPlus) mime type and force the aac demux in that case. aacPlus still doesn't work. (decoder issue?) * don't PLAYLIST_GO on a redirect. gave weird effects because the current item was still in the 'open' fase. The playlist is already playing, so there is no use in this option. --- modules/access/http.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/modules/access/http.c b/modules/access/http.c index 02e82cd27c..9a192de2d3 100644 --- a/modules/access/http.c +++ b/modules/access/http.c @@ -68,7 +68,7 @@ static void Close( vlc_object_t * ); vlc_module_begin(); set_description( _("HTTP input") ); - set_capability( "access2", 0 ); + set_capability( "access2", 1 ); add_string( "http-proxy", NULL, NULL, PROXY_TEXT, PROXY_LONGTEXT, VLC_FALSE ); @@ -267,6 +267,17 @@ static int Open ( vlc_object_t *p_this ) } } + if( p_sys->psz_mime && !strcasecmp( p_sys->psz_mime, "video/x-ms-asf" ) ) + { + char *p = strcasestr( p_access->psz_path, "asx" ); + + if( p == NULL ) + { + msg_Dbg( p_access, "This isn't http, it's mms" ); + goto error; + } + } + if( ( p_sys->i_code == 301 || p_sys->i_code == 302 || p_sys->i_code == 303 || p_sys->i_code == 307 ) && p_sys->psz_location && *p_sys->psz_location ) @@ -284,7 +295,7 @@ static int Open ( vlc_object_t *p_this ) } p_playlist->pp_items[p_playlist->i_index]->b_autodeletion = VLC_TRUE; playlist_Add( p_playlist, p_sys->psz_location, p_sys->psz_location, - PLAYLIST_INSERT | PLAYLIST_GO, + PLAYLIST_INSERT, p_playlist->i_index + 1 ); vlc_object_release( p_playlist ); @@ -295,6 +306,8 @@ static int Open ( vlc_object_t *p_this ) { if( p_sys->psz_mime && !strcasecmp( p_sys->psz_mime, "video/nsv" ) ) p_access->psz_demux = strdup( "nsv" ); + else if( p_sys->psz_mime && !strcasecmp( p_sys->psz_mime, "audio/aacp" ) ) + p_access->psz_demux = strdup( "aac" ); else p_access->psz_demux = strdup( "mp3" ); -- 2.39.5