From 97dc478598f7aada4034fcec00f8377ceb6e029c Mon Sep 17 00:00:00 2001 From: Laurent Aimar Date: Tue, 9 Dec 2008 22:09:52 +0100 Subject: [PATCH] Remove access-filter support. The GUI need to be updated (QT4/macosx/wx). The module "dump" and "bandwidth" need to be ported to stream_filter. --- configure.ac | 1 - include/vlc_access.h | 2 -- include/vlc_config_cat.h | 7 ---- include/vlc_configuration.h | 11 +++--- modules/Makefile.am | 1 - modules/access/rtp/rtp.c | 2 +- src/input/access.c | 67 +++++++------------------------------ src/input/access.h | 2 -- src/input/input.c | 22 ------------ src/input/var.c | 1 - src/libvlc-module.c | 9 ----- 11 files changed, 19 insertions(+), 106 deletions(-) diff --git a/configure.ac b/configure.ac index fb262500be..0eec721265 100644 --- a/configure.ac +++ b/configure.ac @@ -5808,7 +5808,6 @@ AC_CONFIG_FILES([ modules/access/vcd/Makefile modules/access/vcdx/Makefile modules/access/screen/Makefile - modules/access_filter/Makefile modules/access_output/Makefile modules/audio_filter/Makefile modules/audio_filter/channel_mixer/Makefile diff --git a/include/vlc_access.h b/include/vlc_access.h index dc194b6c78..b7924209f1 100644 --- a/include/vlc_access.h +++ b/include/vlc_access.h @@ -83,8 +83,6 @@ struct access_t char *psz_access; /* Access path/url/filename/.... */ char *psz_path; - /* Access source for access_filter (NULL for regular access) */ - access_t *p_source; /* Access can fill this entry to force a demuxer * XXX: fill it once you know for sure you will succeed diff --git a/include/vlc_config_cat.h b/include/vlc_config_cat.h index 6bc4a6662a..da5c2c38b9 100644 --- a/include/vlc_config_cat.h +++ b/include/vlc_config_cat.h @@ -106,12 +106,6 @@ "Common settings you may want to alter are HTTP proxy or " \ "caching settings." ) -#define ACCESS_FILTER_TITLE N_( "Access filters" ) -#define ACCESS_FILTER_HELP N_( \ - "Access filters are special modules that allow advanced operations on " \ - "the input side of VLC. You should not touch anything here unless you " \ - "know what you are doing." ) - #define STREAM_FILTER_TITLE N_( "Stream filters" ) #define STREAM_FILTER_HELP N_( \ "Stream filters are special modules that allow advanced operations on " \ @@ -266,7 +260,6 @@ static const struct config_category_t categories_array[] = { CAT_INPUT, INPUT_TITLE, INPUT_HELP }, { SUBCAT_INPUT_GENERAL, ADVANCED_TITLE, ADVANCED_HELP }, { SUBCAT_INPUT_ACCESS, ACCESS_TITLE, ACCESS_HELP }, - { SUBCAT_INPUT_ACCESS_FILTER, ACCESS_FILTER_TITLE, ACCESS_FILTER_HELP }, { SUBCAT_INPUT_DEMUX, DEMUX_TITLE, DEMUX_HELP }, { SUBCAT_INPUT_VCODEC, VDEC_TITLE, VDEC_HELP }, { SUBCAT_INPUT_ACODEC, ADEC_TITLE, ADEC_HELP }, diff --git a/include/vlc_configuration.h b/include/vlc_configuration.h index 5b8f69df47..5ccb29e3c6 100644 --- a/include/vlc_configuration.h +++ b/include/vlc_configuration.h @@ -98,12 +98,11 @@ extern "C" { #define CAT_INPUT 4 #define SUBCAT_INPUT_GENERAL 401 #define SUBCAT_INPUT_ACCESS 402 - #define SUBCAT_INPUT_ACCESS_FILTER 403 - #define SUBCAT_INPUT_DEMUX 404 - #define SUBCAT_INPUT_VCODEC 405 - #define SUBCAT_INPUT_ACODEC 406 - #define SUBCAT_INPUT_SCODEC 407 - #define SUBCAT_INPUT_STREAM_FILTER 408 + #define SUBCAT_INPUT_DEMUX 403 + #define SUBCAT_INPUT_VCODEC 404 + #define SUBCAT_INPUT_ACODEC 405 + #define SUBCAT_INPUT_SCODEC 406 + #define SUBCAT_INPUT_STREAM_FILTER 407 #define CAT_SOUT 5 #define SUBCAT_SOUT_GENERAL 501 diff --git a/modules/Makefile.am b/modules/Makefile.am index bee6653f74..4ac47bda14 100644 --- a/modules/Makefile.am +++ b/modules/Makefile.am @@ -1,6 +1,5 @@ BASE_SUBDIRS = \ access \ - access_filter \ audio_filter \ audio_mixer \ audio_output \ diff --git a/modules/access/rtp/rtp.c b/modules/access/rtp/rtp.c index 1ebf65f5b7..e52efce252 100644 --- a/modules/access/rtp/rtp.c +++ b/modules/access/rtp/rtp.c @@ -114,7 +114,7 @@ vlc_module_end () * - send RTCP-RR and RTCP-BYE * - dynamic payload types (need SDP parser) * - multiple medias (need SDP parser, and RTCP-SR parser for lip-sync) - * - support for access_filter in case of stream_Demux (MPEG-TS) + * - support for stream_filter in case of stream_Demux (MPEG-TS) */ #ifndef IPPROTO_DCCP diff --git a/src/input/access.c b/src/input/access.c index a9ee129004..b5668c0ddd 100644 --- a/src/input/access.c +++ b/src/input/access.c @@ -1,10 +1,10 @@ /***************************************************************************** * access.c ***************************************************************************** - * Copyright (C) 1999-2004 the VideoLAN team + * Copyright (C) 1999-2008 the VideoLAN team * $Id$ * - * Author: Laurent Aimar + * Author: Laurent Aimar * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -29,31 +29,22 @@ #include /***************************************************************************** - * access_InternalNew: + * access_New: *****************************************************************************/ -static access_t *access_InternalNew( vlc_object_t *p_obj, const char *psz_access, - const char *psz_demux, const char *psz_path, - access_t *p_source ) +access_t *__access_New( vlc_object_t *p_obj, const char *psz_access, + const char *psz_demux, const char *psz_path ) { - static const char typename[] = "access"; access_t *p_access = vlc_custom_create( p_obj, sizeof (*p_access), - VLC_OBJECT_GENERIC, typename ); + VLC_OBJECT_GENERIC, "access" ); if( p_access == NULL ) return NULL; - /* Parse URL */ - p_access->p_source = p_source; - if( p_source ) - { - msg_Dbg( p_obj, "creating access filter '%s'", psz_access ); - } - else - { - msg_Dbg( p_obj, "creating access '%s' path='%s'", - psz_access, psz_path ); - p_access->psz_path = strdup( psz_path ); - } + /* */ + msg_Dbg( p_obj, "creating access '%s' path='%s'", + psz_access, psz_path ); + + p_access->psz_path = strdup( psz_path ); p_access->psz_access = strdup( psz_access ); p_access->psz_demux = strdup( psz_demux ); @@ -62,20 +53,13 @@ static access_t *access_InternalNew( vlc_object_t *p_obj, const char *psz_access p_access->pf_seek = NULL; p_access->pf_control = NULL; p_access->p_sys = NULL; - p_access->info.i_update = 0; - p_access->info.i_size = 0; - p_access->info.i_pos = 0; - p_access->info.b_eof = false; - p_access->info.i_title = 0; - p_access->info.i_seekpoint = 0; + access_InitFields( p_access ); /* Before module_need (for var_Create...) */ vlc_object_attach( p_access, p_obj ); - p_access->p_module = - module_need( p_access, p_source ? "access_filter" : "access", - psz_access, true ); + p_access->p_module = module_need( p_access, "access", psz_access, true ); if( p_access->p_module == NULL ) { @@ -90,26 +74,6 @@ static access_t *access_InternalNew( vlc_object_t *p_obj, const char *psz_access return p_access; } -/***************************************************************************** - * access_New: - *****************************************************************************/ -access_t *__access_New( vlc_object_t *p_obj, const char *psz_access, - const char *psz_demux, const char *psz_path ) -{ - return access_InternalNew( p_obj, psz_access, psz_demux, - psz_path, NULL ); -} - -/***************************************************************************** - * access_FilterNew: - *****************************************************************************/ -access_t *access_FilterNew( access_t *p_source, const char *psz_access_filter ) -{ - return access_InternalNew( VLC_OBJECT(p_source), psz_access_filter, - p_source->psz_demux, p_source->psz_path, - p_source ); -} - /***************************************************************************** * access_Delete: *****************************************************************************/ @@ -122,11 +86,6 @@ void access_Delete( access_t *p_access ) free( p_access->psz_path ); free( p_access->psz_demux ); - if( p_access->p_source ) - { - access_Delete( p_access->p_source ); - } - vlc_object_release( p_access ); } diff --git a/src/input/access.h b/src/input/access.h index 51f542914b..42485d7eb6 100644 --- a/src/input/access.h +++ b/src/input/access.h @@ -35,8 +35,6 @@ #define access_New( a, b, c, d ) __access_New(VLC_OBJECT(a), b, c, d ) access_t * __access_New( vlc_object_t *p_obj, const char *psz_access, const char *psz_demux, const char *psz_path ); -access_t * access_FilterNew( access_t *p_source, - const char *psz_access_filter ); void access_Delete( access_t * ); #endif diff --git a/src/input/input.c b/src/input/input.c index b026ee6071..151d456622 100644 --- a/src/input/input.c +++ b/src/input/input.c @@ -2461,28 +2461,6 @@ static int InputSourceInit( input_thread_t *p_input, goto error; } - /* */ - psz_tmp = psz = var_GetNonEmptyString( p_input, "access-filter" ); - while( psz && *psz ) - { - access_t *p_access = in->p_access; - char *end = strchr( psz, ':' ); - - if( end ) - *end++ = '\0'; - - in->p_access = access_FilterNew( in->p_access, psz ); - if( in->p_access == NULL ) - { - in->p_access = p_access; - msg_Warn( p_input, "failed to insert access filter %s", - psz ); - } - - psz = end; - } - free( psz_tmp ); - /* Get infos from access */ if( !p_input->b_preparsing ) { diff --git a/src/input/var.c b/src/input/var.c index 3b67f6c1d4..4de97a5659 100644 --- a/src/input/var.c +++ b/src/input/var.c @@ -492,7 +492,6 @@ void input_ConfigVarInit ( input_thread_t *p_input ) var_Create( p_input, "input-record-native", VLC_VAR_BOOL | VLC_VAR_DOINHERIT ); /* */ - var_Create( p_input, "access-filter", VLC_VAR_STRING | VLC_VAR_DOINHERIT ); var_Create( p_input, "access", VLC_VAR_STRING | VLC_VAR_DOINHERIT ); var_Create( p_input, "demux", VLC_VAR_STRING | VLC_VAR_DOINHERIT ); var_Create( p_input, "stream-filter", VLC_VAR_STRING | VLC_VAR_DOINHERIT ); diff --git a/src/libvlc-module.c b/src/libvlc-module.c index bdc87ec21d..c5ee5ef76a 100644 --- a/src/libvlc-module.c +++ b/src/libvlc-module.c @@ -1012,10 +1012,6 @@ static const char *const ppsz_clock_descriptions[] = "the correct access is not automatically detected. You should not "\ "set this as a global option unless you really know what you are doing." ) -#define ACCESS_FILTER_TEXT N_("Access filter module") -#define ACCESS_FILTER_LONGTEXT N_( \ - "Access filters are used to modify the stream that is being read." ) - #define STREAM_FILTER_TEXT N_("Stream filter module") #define STREAM_FILTER_LONGTEXT N_( \ "Stream filters are used to modify the stream that is being read. " ) @@ -1795,11 +1791,6 @@ vlc_module_begin () add_module( "access", "access", NULL, NULL, ACCESS_TEXT, ACCESS_LONGTEXT, true ); - set_subcategory( SUBCAT_INPUT_ACCESS_FILTER ) - add_module_list_cat( "access-filter", SUBCAT_INPUT_ACCESS_FILTER, NULL, NULL, - ACCESS_FILTER_TEXT, ACCESS_FILTER_LONGTEXT, false ); - - set_subcategory( SUBCAT_INPUT_DEMUX ) add_module( "demux", "demux", NULL, NULL, DEMUX_TEXT, DEMUX_LONGTEXT, true ); -- 2.39.2