vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Sat Jul 25 17:57:02 2015 +0300| [1965d9625adf6a2e666a4af9fa13792b03ca0b39] | committer: Rémi Denis-Courmont
access: remove access_t.psz_demux > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1965d9625adf6a2e666a4af9fa13792b03ca0b39 --- include/vlc_access.h | 5 ---- modules/access/dshow/dshow.cpp | 14 ----------- modules/access/dtv/access.c | 2 -- modules/access/http.c | 53 ---------------------------------------- modules/access/vcd/vcd.c | 3 --- modules/access/vcdx/access.c | 3 --- modules/access/vdr.c | 2 -- src/input/access.c | 11 +++------ src/input/access.h | 5 ++-- src/input/input.c | 5 ++-- 10 files changed, 7 insertions(+), 96 deletions(-) diff --git a/include/vlc_access.h b/include/vlc_access.h index 281497a..0e6ce86 100644 --- a/include/vlc_access.h +++ b/include/vlc_access.h @@ -82,11 +82,6 @@ struct access_t char *psz_location; /**< Location (URL with the scheme stripped) */ char *psz_filepath; /**< Local file path (if applicable) */ - /* Access can fill this entry to force a demuxer - * XXX: fill it once you know for sure you will succeed - * (if you fail, this value won't be reseted */ - char *psz_demux; - /* pf_read/pf_block/pf_readdir is used to read data. * XXX A access should set one and only one of them */ ssize_t (*pf_read) ( access_t *, uint8_t *, size_t ); /* Return -1 if no data yet, 0 if no more data, else real data read */ diff --git a/modules/access/dshow/dshow.cpp b/modules/access/dshow/dshow.cpp index c83b716..999c8ac 100644 --- a/modules/access/dshow/dshow.cpp +++ b/modules/access/dshow/dshow.cpp @@ -786,20 +786,6 @@ static int AccessOpen( vlc_object_t *p_this ) return VLC_EGENERIC; } - dshow_stream_t *p_stream = p_sys->pp_streams[0]; - - /* Check if we need to force demuxers */ - if( p_stream->i_fourcc == VLC_CODEC_DV ) - { - free( p_access->psz_demux ); - p_access->psz_demux = strdup( "rawdv" ); - } - else if( p_stream->i_fourcc == VLC_CODEC_MPGV ) - { - free( p_access->psz_demux ); - p_access->psz_demux = strdup( "mpgv" ); - } - /* Setup Access */ p_access->pf_read = NULL; p_access->pf_block = ReadCompressed; diff --git a/modules/access/dtv/access.c b/modules/access/dtv/access.c index f7d3bef..fd868ab 100644 --- a/modules/access/dtv/access.c +++ b/modules/access/dtv/access.c @@ -484,8 +484,6 @@ static int Open (vlc_object_t *obj) access->pf_block = Read; access->pf_control = Control; - free (access->psz_demux); - access->psz_demux = strdup ("ts"); return VLC_SUCCESS; error: diff --git a/modules/access/http.c b/modules/access/http.c index 0854809..314a856 100644 --- a/modules/access/http.c +++ b/modules/access/http.c @@ -522,59 +522,6 @@ connect: goto error; } - if( !strcmp( p_sys->psz_protocol, "ICY" ) || p_sys->b_icecast ) - { - if( p_sys->psz_mime && strcasecmp( p_sys->psz_mime, "application/ogg" ) ) - { - if( !strcasecmp( p_sys->psz_mime, "video/nsv" ) || - !strcasecmp( p_sys->psz_mime, "video/nsa" ) ) - { - free( p_access->psz_demux ); - p_access->psz_demux = strdup( "nsv" ); - } - else if( !strcasecmp( p_sys->psz_mime, "audio/aac" ) || - !strcasecmp( p_sys->psz_mime, "audio/aacp" ) ) - { - free( p_access->psz_demux ); - p_access->psz_demux = strdup( "m4a" ); - } - else if( !strcasecmp( p_sys->psz_mime, "audio/mpeg" ) ) - { - free( p_access->psz_demux ); - p_access->psz_demux = strdup( "mp3" ); - } - - msg_Info( p_access, "Raw-audio server found, %s demuxer selected", - p_access->psz_demux ); - -#if 0 /* Doesn't work really well because of the pre-buffering in - * shoutcast servers (the buffer content will be sent as fast as - * possible). */ - p_sys->b_pace_control = false; -#endif - } - else if( !p_sys->psz_mime ) - { - free( p_access->psz_demux ); - /* Shoutcast */ - p_access->psz_demux = strdup( "mp3" ); - } - /* else probably Ogg Vorbis */ - } - else if( !strcasecmp( psz_access, "unsv" ) && - p_sys->psz_mime && - !strcasecmp( p_sys->psz_mime, "misc/ultravox" ) ) - { - free( p_access->psz_demux ); - /* Grrrr! detect ultravox server and force NSV demuxer */ - p_access->psz_demux = strdup( "nsv" ); - } - else if( !strcmp( psz_access, "itpc" ) ) - { - free( p_access->psz_demux ); - p_access->psz_demux = strdup( "podcast" ); - } - if( p_sys->b_reconnect ) msg_Dbg( p_access, "auto re-connect enabled" ); return VLC_SUCCESS; diff --git a/modules/access/vcd/vcd.c b/modules/access/vcd/vcd.c index b418c02..b218ffe 100644 --- a/modules/access/vcd/vcd.c +++ b/modules/access/vcd/vcd.c @@ -203,9 +203,6 @@ static int Open( vlc_object_t *p_this ) p_access->info.i_pos = (uint64_t)( p_sys->i_sector - p_sys->p_sectors[1+i_title] ) * VCD_DATA_SIZE; - free( p_access->psz_demux ); - p_access->psz_demux = strdup( "ps" ); - return VLC_SUCCESS; error: diff --git a/modules/access/vcdx/access.c b/modules/access/vcdx/access.c index cf53866..4ee3c3b 100644 --- a/modules/access/vcdx/access.c +++ b/modules/access/vcdx/access.c @@ -936,9 +936,6 @@ VCDOpen ( vlc_object_t *p_this ) vcdplayer_play( p_access, itemid ); - free( p_access->psz_demux ); - p_access->psz_demux = strdup( "ps" ); - #ifdef FIXED if( play_single_item ) VCDFixupPlayList(p_access,p_vcd,psz_source,&itemid,play_single_item); diff --git a/modules/access/vdr.c b/modules/access/vdr.c index 2235e8c..4c71bc1 100644 --- a/modules/access/vdr.c +++ b/modules/access/vdr.c @@ -201,8 +201,6 @@ static int Open( vlc_object_t *p_this ) return VLC_EGENERIC; } - free( p_access->psz_demux ); - p_access->psz_demux = strdup( p_sys->b_ts_format ? "ts" : "ps" ); return VLC_SUCCESS; } diff --git a/src/input/access.c b/src/input/access.c index 51b0d00..cd5e960 100644 --- a/src/input/access.c +++ b/src/input/access.c @@ -54,8 +54,7 @@ char *get_path(const char *location) * access_New: *****************************************************************************/ access_t *access_New( vlc_object_t *p_obj, input_thread_t *p_parent_input, - const char *psz_access, const char *psz_demux, - const char *psz_location ) + const char *psz_access, const char *psz_location ) { access_t *p_access = vlc_custom_create( p_obj, sizeof (*p_access), "access" ); @@ -70,9 +69,7 @@ access_t *access_New( vlc_object_t *p_obj, input_thread_t *p_parent_input, p_access->psz_access = strdup( psz_access ); p_access->psz_location = strdup( psz_location ); p_access->psz_filepath = get_path( psz_location ); - p_access->psz_demux = strdup( psz_demux ); - if( p_access->psz_access == NULL || p_access->psz_location == NULL - || p_access->psz_demux == NULL ) + if( p_access->psz_access == NULL || p_access->psz_location == NULL ) goto error; msg_Dbg( p_obj, "creating access '%s' location='%s', path='%s'", @@ -100,7 +97,6 @@ error: free( p_access->psz_access ); free( p_access->psz_location ); free( p_access->psz_filepath ); - free( p_access->psz_demux ); vlc_object_release( p_access ); return NULL; } @@ -115,7 +111,7 @@ access_t *vlc_access_NewMRL(vlc_object_t *parent, const char *mrl) input_SplitMRL(&access, &demux, &location, &anchor, buf); /* Both demux and anchor are ignored, since they are of no use here. */ - access_t *obj = access_New(parent, NULL, access, "", location); + access_t *obj = access_New(parent, NULL, access, location); free(buf); return obj; @@ -128,7 +124,6 @@ void vlc_access_Delete(access_t *access) free(access->psz_access); free(access->psz_location); free(access->psz_filepath); - free(access->psz_demux); vlc_object_release(access); } diff --git a/src/input/access.h b/src/input/access.h index fe37716..88b8951 100644 --- a/src/input/access.h +++ b/src/input/access.h @@ -29,9 +29,8 @@ #include <vlc_access.h> access_t *access_New( vlc_object_t *p_obj, input_thread_t *p_input, - const char *psz_access, const char *psz_demux, - const char *psz_path ); -#define access_New( a, b, c, d, e ) access_New(VLC_OBJECT(a), b, c, d, e ) + const char *psz_access, const char *psz_path ); +#define access_New( a, b, c, d ) access_New(VLC_OBJECT(a), b, c, d ) char *get_path(const char *location); diff --git a/src/input/input.c b/src/input/input.c index 1ba589c..a822df7 100644 --- a/src/input/input.c +++ b/src/input/input.c @@ -2286,7 +2286,7 @@ static int InputSourceInit( input_thread_t *p_input, /* */ access_t *p_access = access_New( p_input, p_input, - psz_access, psz_demux, psz_path ); + psz_access, psz_path ); if( p_access == NULL ) { msg_Err( p_input, "open of `%s' failed", psz_mrl ); @@ -2298,8 +2298,7 @@ static int InputSourceInit( input_thread_t *p_input, } /* Access-forced demuxer (PARENTAL ADVISORY: EXPLICIT HACK) */ - if( !psz_demux[0] || !strcasecmp( psz_demux, "any" ) ) - psz_demux = p_access->psz_demux; +#warning FIXME: parse content type /* Create the stream_t */ stream_t *p_stream = stream_AccessNew( p_access ); _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
