[vlc-devel] [PATCH 1/5] Refactor: rename "sub-filter" to "sub-source" this includes capability, functions, constants, user messages and command line parameter.
Yuval Tze
yuvaltze at gmail.com
Sun Apr 17 00:38:31 CEST 2011
---
doc/demo.sh | 10 +++++-----
include/vlc_filter.h | 10 +++++-----
include/vlc_osd.h | 8 ++++----
include/vlc_spu.h | 4 ++--
modules/gui/macosx/extended.m | 2 +-
modules/gui/qt4/components/extended_panels.cpp | 4 ++--
modules/stream_out/transcode/transcode.c | 6 +++---
modules/video_filter/audiobargraph_v.c | 12 ++++++------
.../video_filter/dynamicoverlay/dynamicoverlay.c | 4 ++--
modules/video_filter/logo.c | 10 +++++-----
modules/video_filter/marq.c | 4 ++--
modules/video_filter/mosaic.c | 6 +++---
modules/video_filter/osdmenu.c | 10 +++++-----
modules/video_filter/remoteosd.c | 10 +++++-----
modules/video_filter/rss.c | 4 ++--
share/http/js/mosaic.js | 2 +-
share/lua/http/js/mosaic.js | 2 +-
src/libvlc-module.c | 14 +++++++-------
src/libvlccore.sym | 4 ++--
src/misc/filter_chain.c | 4 ++--
src/video_output/control.c | 2 +-
src/video_output/control.h | 2 +-
src/video_output/video_output.c | 12 ++++++------
src/video_output/vout_internal.h | 2 +-
src/video_output/vout_intf.c | 18 +++++++++---------
src/video_output/vout_subpictures.c | 18 +++++++++---------
test/dynamicoverlay/overlay-test.c | 2 +-
27 files changed, 93 insertions(+), 93 deletions(-)
diff --git a/doc/demo.sh b/doc/demo.sh
index 594de9e..45fe554 100755
--- a/doc/demo.sh
+++ b/doc/demo.sh
@@ -18,7 +18,7 @@ pyschedelic()
echo -e "\n- Psychedelic demo -\nconfiguration\n"
echo -en "Please choose an input. Live camera feeds are best.\ninput? "
read input
- echo -e "\n$VLC --sub-filter marq --marq-position 8 --marq-size 30 --marq-color 16776960 --marq-marquee \"VLC - Psychedelic video filter\" --vout-filter distort --distort-mode psychedelic $input"
+ echo -e "\n$VLC --sub-source marq --marq-position 8 --marq-size 30 --marq-color 16776960 --marq-marquee \"VLC - Psychedelic video filter\" --vout-filter distort --distort-mode psychedelic $input"
}
gradient()
@@ -33,7 +33,7 @@ setup a input $input
setup a output #duplicate{dst=mosaic-bridge,select=video}
control a play" > "`pwd`/demo.vlm"
echo "VLM batch file saved to `pwd`/demo.vlm"
- echo -e "\n$VLC --sub-filter mosaic:marq:logo --mosaic-width 120 --mosaic-height 90 --mosaic-cols 1 --mosaic-rows 1 --marq-position 8 --marq-size 30 --marq-color 65280 --marq-marquee \"VLC - Gradient video filter\" --logo-file $logofile --vout-filter distort --distort-mode gradient --extraintf telnet --telnet-host localhost --vlm-conf `pwd`/demo.vlm $input"
+ echo -e "\n$VLC --sub-source mosaic:marq:logo --mosaic-width 120 --mosaic-height 90 --mosaic-cols 1 --mosaic-rows 1 --marq-position 8 --marq-size 30 --marq-color 65280 --marq-marquee \"VLC - Gradient video filter\" --logo-file $logofile --vout-filter distort --distort-mode gradient --extraintf telnet --telnet-host localhost --vlm-conf `pwd`/demo.vlm $input"
}
mosaic()
@@ -48,7 +48,7 @@ setup a input $vid
setup a output #duplicate{dst=mosaic-bridge,select=video}
control a play" > "`pwd`/demo.vlm"
echo "VLM batch file saved to `pwd`/demo.vlm"
- echo -e "\n$VLC --sub-filter mosaic:marq --marq-marque \"VLC - mosaic\" --marq-position 6 --mosaic-width 120 --mosaic-height 90 --mosaic-rows 1 --mosaic-cols 1 --mosaic-alpha 150 --extraintf telnet --telnet-host localhost --vlm-conf `pwd`/demo.vlm $bg"
+ echo -e "\n$VLC --sub-source mosaic:marq --marq-marque \"VLC - mosaic\" --marq-position 6 --mosaic-width 120 --mosaic-height 90 --mosaic-rows 1 --mosaic-cols 1 --mosaic-alpha 150 --extraintf telnet --telnet-host localhost --vlm-conf `pwd`/demo.vlm $bg"
}
wall()
@@ -61,10 +61,10 @@ wall()
case "$rot" in
"y"|"Y"|"yes")
echo -e "\nLeft hand side:\n$VLC --vout-filter wall:transform --transform-type 90 --wall-cols 2 --wall-rows 1 --wall-active 0 $input"
- echo -e "\nRight hand side:\n$VLC --vout-filter wall:transform --transform-type 90 --wall-cols 2 --wall-rows 1 --wall-active 1 --sub-filter marq --marq-marquee \"VLC - Video wall\" $input"
+ echo -e "\nRight hand side:\n$VLC --vout-filter wall:transform --transform-type 90 --wall-cols 2 --wall-rows 1 --wall-active 1 --sub-source marq --marq-marquee \"VLC - Video wall\" $input"
;;
*)
- echo -e "\nLeft hand side:\n$VLC --vout-filter wall --wall-cols 2 --wall-rows 1 --wall-active 0 --sub-filter marq --marq-marquee \"VLC - Video wall\" $input"
+ echo -e "\nLeft hand side:\n$VLC --vout-filter wall --wall-cols 2 --wall-rows 1 --wall-active 0 --sub-source marq --marq-marquee \"VLC - Video wall\" $input"
echo -e "\nRight hand side:\n$VLC --vout-filter wall --wall-cols 2 --wall-rows 1 --wall-active 1 $input"
;;
esac
diff --git a/include/vlc_filter.h b/include/vlc_filter.h
index ea24344..4c5e320 100644
--- a/include/vlc_filter.h
+++ b/include/vlc_filter.h
@@ -103,7 +103,7 @@ struct filter_t
struct
{
- subpicture_t * (*pf_filter) ( filter_t *, mtime_t );
+ subpicture_t * (*pf_source) ( filter_t *, mtime_t );
subpicture_t * (*pf_buffer_new)( filter_t * );
void (*pf_buffer_del)( filter_t *, subpicture_t * );
int (*pf_mouse) ( filter_t *,
@@ -111,7 +111,7 @@ struct filter_t
const vlc_mouse_t *p_new,
const video_format_t * );
} sub;
-#define pf_sub_filter u.sub.pf_filter
+#define pf_sub_source u.sub.pf_source
#define pf_sub_buffer_new u.sub.pf_buffer_new
#define pf_sub_buffer_del u.sub.pf_buffer_del
#define pf_sub_mouse u.sub.pf_mouse
@@ -177,7 +177,7 @@ static inline void filter_FlushPictures( filter_t *p_filter )
/**
* This function will return a new subpicture usable by p_filter as an output
* buffer. You have to release it using filter_DeleteSubpicture or by returning
- * it to the caller as a pf_sub_filter return value.
+ * it to the caller as a pf_sub_source return value.
* Provided for convenience.
*
* \param p_filter filter_t object
@@ -399,7 +399,7 @@ VLC_EXPORT( block_t *, filter_chain_AudioFilter, ( filter_chain_t *, block_t * )
* \param p_chain pointer to filter chain
* \param display_date of subpictures
*/
-VLC_EXPORT( void, filter_chain_SubFilter, ( filter_chain_t *, mtime_t ) );
+VLC_EXPORT( void, filter_chain_SubSource, ( filter_chain_t *, mtime_t ) );
/**
* Apply the filter chain to a mouse state.
@@ -414,7 +414,7 @@ VLC_EXPORT( int, filter_chain_MouseFilter, ( filter_chain_t *, vlc_mouse_t *, co
/**
* Inform the filter chain of mouse state.
*
- * It makes sense only for a sub filter chain.
+ * It makes sense only for a sub source chain.
*/
VLC_EXPORT( int, filter_chain_MouseEvent, ( filter_chain_t *, const vlc_mouse_t *, const video_format_t * ) );
diff --git a/include/vlc_osd.h b/include/vlc_osd.h
index 02b394e..e1836c1 100644
--- a/include/vlc_osd.h
+++ b/include/vlc_osd.h
@@ -51,11 +51,11 @@ extern "C" {
* The OSD menu core creates the OSD menu structure in memory. It parses a
* configuration file that defines all elements that are part of the menu. The
* core also handles all actions and menu structure updates on behalf of video
- * subpicture filters.
+ * subpicture sources.
*
- * The file modules/video_filters/osdmenu.c implements a subpicture filter that
+ * The file modules/video_filters/osdmenu.c implements a subpicture source that
* specifies the final information on positioning of the current state image.
- * A subpicture filter is called each time a video picture has to be rendered,
+ * A subpicture source is called each time a video picture has to be rendered,
* it also gives a start and end date to the subpicture. The subpicture can be
* streamed if used inside a transcoding command. For example:
*
@@ -66,7 +66,7 @@ extern "C" {
* An example for local usage of the OSD menu is:
*
* vlc dvdsimple:///dev/dvd --extraintf rc
- * --sub-filter osdmenu
+ * --sub-source osdmenu
* --osdmenu-file=share/osdmenu/dvd.cfg
*
* Each OSD menu element, called "action", defines a hotkey action. Each action
diff --git a/include/vlc_spu.h b/include/vlc_spu.h
index be7bc30..7977cdd 100644
--- a/include/vlc_spu.h
+++ b/include/vlc_spu.h
@@ -93,9 +93,9 @@ VLC_EXPORT( int, spu_RegisterChannel, ( spu_t * ) );
VLC_EXPORT( void, spu_ClearChannel, ( spu_t *, int ) );
/**
- * It changes the sub filters list
+ * It changes the sub sources list
*/
-VLC_EXPORT( void, spu_ChangeFilters, ( spu_t *, const char * ) );
+VLC_EXPORT( void, spu_ChangeSources, ( spu_t *, const char * ) );
/** @}*/
diff --git a/modules/gui/macosx/extended.m b/modules/gui/macosx/extended.m
index 9f11a18..2a53852 100644
--- a/modules/gui/macosx/extended.m
+++ b/modules/gui/macosx/extended.m
@@ -351,7 +351,7 @@ static VLCExtended *_o_sharedInstance = nil;
}
else
{
- msg_Warn( p_intf, "the corresponding subfilter coundn't be found" );
+ msg_Warn( p_intf, "the corresponding subsource coundn't be found" );
}
}
else
diff --git a/modules/gui/qt4/components/extended_panels.cpp b/modules/gui/qt4/components/extended_panels.cpp
index 5a9597a..78c552b 100644
--- a/modules/gui/qt4/components/extended_panels.cpp
+++ b/modules/gui/qt4/components/extended_panels.cpp
@@ -299,9 +299,9 @@ void ExtVideo::ChangeVFiltersString( const char *psz_name, bool b_add )
{
psz_filter_type = "video-filter";
}
- else if( module_provides( p_obj, "sub filter" ) )
+ else if( module_provides( p_obj, "sub source" ) )
{
- psz_filter_type = "sub-filter";
+ psz_filter_type = "sub-source";
}
else
{
diff --git a/modules/stream_out/transcode/transcode.c b/modules/stream_out/transcode/transcode.c
index 32ffee6..153aa65 100644
--- a/modules/stream_out/transcode/transcode.c
+++ b/modules/stream_out/transcode/transcode.c
@@ -433,7 +433,7 @@ static int Open( vlc_object_t *p_this )
{
p_sys->p_spu = spu_Create( p_stream );
if( p_sys->p_spu )
- spu_ChangeFilters( p_sys->p_spu, psz_string );
+ spu_ChangeSources( p_sys->p_spu, psz_string );
}
free( psz_string );
@@ -459,11 +459,11 @@ static int Open( vlc_object_t *p_this )
{
p_sys->p_spu = spu_Create( p_stream );
if( p_sys->p_spu )
- spu_ChangeFilters( p_sys->p_spu, "osdmenu" );
+ spu_ChangeSources( p_sys->p_spu, "osdmenu" );
}
else
{
- spu_ChangeFilters( p_sys->p_spu, "osdmenu" );
+ spu_ChangeSources( p_sys->p_spu, "osdmenu" );
}
}
diff --git a/modules/video_filter/audiobargraph_v.c b/modules/video_filter/audiobargraph_v.c
index 64fc579..69a8f50 100644
--- a/modules/video_filter/audiobargraph_v.c
+++ b/modules/video_filter/audiobargraph_v.c
@@ -82,9 +82,9 @@ vlc_module_begin ()
set_category( CAT_VIDEO )
set_subcategory( SUBCAT_VIDEO_SUBPIC )
- set_capability( "sub filter", 0 )
+ set_capability( "sub source", 0 )
set_callbacks( OpenSub, Close )
- set_description( N_("Audio Bar Graph Video sub filter") )
+ set_description( N_("Audio Bar Graph Video sub source") )
set_shortname( N_("Audio Bar Graph Video") )
add_shortcut( "audiobargraph_v" )
@@ -102,7 +102,7 @@ vlc_module_begin ()
add_submodule ()
set_capability( "video filter2", 0 )
set_callbacks( OpenVideo, Close )
- set_description( N_("Audio Bar Graph Video sub filter") )
+ set_description( N_("Audio Bar Graph Video sub source") )
add_shortcut( "audiobargraph_v" )
vlc_module_end ()
@@ -174,7 +174,7 @@ static void LoadBarGraph( vlc_object_t *, BarGraph_t *);
void parse_i_values( BarGraph_t *p_BarGraph, char *i_values);
/**
- * Open the sub filter
+ * Open the sub source
*/
static int OpenSub( vlc_object_t *p_this )
{
@@ -262,7 +262,7 @@ static int OpenCommon( vlc_object_t *p_this, bool b_sub )
/* Misc init */
if( b_sub )
{
- p_filter->pf_sub_filter = FilterSub;
+ p_filter->pf_sub_source = FilterSub;
}
else
{
@@ -302,7 +302,7 @@ static void Close( vlc_object_t *p_this )
}
/**
- * Sub filter
+ * Sub source
*/
static subpicture_t *FilterSub( filter_t *p_filter, mtime_t date )
{
diff --git a/modules/video_filter/dynamicoverlay/dynamicoverlay.c b/modules/video_filter/dynamicoverlay/dynamicoverlay.c
index caa5f75..52dba04 100644
--- a/modules/video_filter/dynamicoverlay/dynamicoverlay.c
+++ b/modules/video_filter/dynamicoverlay/dynamicoverlay.c
@@ -68,7 +68,7 @@ vlc_module_begin ()
set_shortname( N_("Overlay" ))
set_category( CAT_VIDEO )
set_subcategory( SUBCAT_VIDEO_VFILTER )
- set_capability( "sub filter", 0 )
+ set_capability( "sub source", 0 )
add_loadfile( "overlay-input", NULL, INPUT_TEXT, INPUT_LONGTEXT,
false )
@@ -113,7 +113,7 @@ static int Create( vlc_object_t *p_this )
p_sys->b_atomic = false;
vlc_mutex_init( &p_sys->lock );
- p_filter->pf_sub_filter = Filter;
+ p_filter->pf_sub_source = Filter;
config_ChainParse( p_filter, "overlay-", ppsz_filter_options,
p_filter->p_cfg );
diff --git a/modules/video_filter/logo.c b/modules/video_filter/logo.c
index d706d66..2b90c78 100644
--- a/modules/video_filter/logo.c
+++ b/modules/video_filter/logo.c
@@ -87,9 +87,9 @@ vlc_module_begin ()
set_category( CAT_VIDEO )
set_subcategory( SUBCAT_VIDEO_SUBPIC )
set_help(LOGO_HELP)
- set_capability( "sub filter", 0 )
+ set_capability( "sub source", 0 )
set_callbacks( OpenSub, Close )
- set_description( N_("Logo sub filter") )
+ set_description( N_("Logo sub source") )
set_shortname( N_("Logo overlay") )
add_shortcut( "logo" )
@@ -200,7 +200,7 @@ static logo_t *LogoListNext( logo_list_t *p_list, mtime_t i_date );
static logo_t *LogoListCurrent( logo_list_t *p_list );
/**
- * Open the sub filter
+ * Open the sub source
*/
static int OpenSub( vlc_object_t *p_this )
{
@@ -293,7 +293,7 @@ static int OpenCommon( vlc_object_t *p_this, bool b_sub )
/* Misc init */
if( b_sub )
{
- p_filter->pf_sub_filter = FilterSub;
+ p_filter->pf_sub_source = FilterSub;
}
else
{
@@ -326,7 +326,7 @@ static void Close( vlc_object_t *p_this )
}
/**
- * Sub filter
+ * Sub source
*/
static subpicture_t *FilterSub( filter_t *p_filter, mtime_t date )
{
diff --git a/modules/video_filter/marq.c b/modules/video_filter/marq.c
index c4e8e4b..200bfcf 100644
--- a/modules/video_filter/marq.c
+++ b/modules/video_filter/marq.c
@@ -144,7 +144,7 @@ static const char *const ppsz_pos_descriptions[] =
* Module descriptor
*****************************************************************************/
vlc_module_begin ()
- set_capability( "sub filter", 0 )
+ set_capability( "sub source", 0 )
set_shortname( N_("Marquee" ))
set_description( N_("Marquee display") )
set_help(MARQUEE_HELP)
@@ -225,7 +225,7 @@ static int CreateFilter( vlc_object_t *p_this )
CREATE_VAR( p_style->i_font_size, Integer, "marq-size" );
/* Misc init */
- p_filter->pf_sub_filter = Filter;
+ p_filter->pf_sub_source = Filter;
p_sys->last_time = 0;
return VLC_SUCCESS;
diff --git a/modules/video_filter/mosaic.c b/modules/video_filter/mosaic.c
index 4505837..31f2a12 100644
--- a/modules/video_filter/mosaic.c
+++ b/modules/video_filter/mosaic.c
@@ -174,11 +174,11 @@ static const char *const ppsz_align_descriptions[] =
#define CFG_PREFIX "mosaic-"
vlc_module_begin ()
- set_description( N_("Mosaic video sub filter") )
+ set_description( N_("Mosaic video sub source") )
set_shortname( N_("Mosaic") )
set_category( CAT_VIDEO )
set_subcategory( SUBCAT_VIDEO_SUBPIC)
- set_capability( "sub filter", 0 )
+ set_capability( "sub source", 0 )
set_callbacks( CreateFilter, DestroyFilter )
add_integer_with_range( CFG_PREFIX "alpha", 255, 0, 255, NULL,
@@ -294,7 +294,7 @@ static int CreateFilter( vlc_object_t *p_this )
if( p_sys == NULL )
return VLC_ENOMEM;
- p_filter->pf_sub_filter = Filter;
+ p_filter->pf_sub_source = Filter;
vlc_mutex_init( &p_sys->lock );
vlc_mutex_lock( &p_sys->lock );
diff --git a/modules/video_filter/osdmenu.c b/modules/video_filter/osdmenu.c
index f5a134e..2aa2a1e 100644
--- a/modules/video_filter/osdmenu.c
+++ b/modules/video_filter/osdmenu.c
@@ -84,7 +84,7 @@ static const char *const ppsz_pos_descriptions[] =
{ N_("Center"), N_("Left"), N_("Right"), N_("Top"), N_("Bottom"),
N_("Top-Left"), N_("Top-Right"), N_("Bottom-Left"), N_("Bottom-Right") };
-/* subfilter functions */
+/* subsource functions */
static int CreateFilter ( vlc_object_t * );
static void DestroyFilter( vlc_object_t * );
static subpicture_t *Filter( filter_t *, mtime_t );
@@ -114,7 +114,7 @@ static int MouseEvent( filter_t *,
#define OSD_UPDATE_MAX 1000
vlc_module_begin ()
- set_capability( "sub filter", 100 )
+ set_capability( "sub source", 100 )
set_description( N_("On Screen Display menu") )
set_shortname( N_("OSD menu") )
add_shortcut( "osdmenu" )
@@ -144,7 +144,7 @@ vlc_module_begin ()
vlc_module_end ()
/*****************************************************************************
- * Sub filter code
+ * Sub source code
*****************************************************************************/
/*****************************************************************************
@@ -250,8 +250,8 @@ static int CreateFilter ( vlc_object_t *p_this )
var_AddCallback( p_sys->p_menu, "osd-menu-visible",
OSDMenuVisibleEvent, p_filter );
- /* Attach subpicture filter callback */
- p_filter->pf_sub_filter = Filter;
+ /* Attach subpicture source callback */
+ p_filter->pf_sub_source = Filter;
p_filter->pf_sub_mouse = MouseEvent;
es_format_Init( &p_filter->fmt_out, SPU_ES, VLC_CODEC_SPU );
diff --git a/modules/video_filter/remoteosd.c b/modules/video_filter/remoteosd.c
index 488b371..29270ab 100644
--- a/modules/video_filter/remoteosd.c
+++ b/modules/video_filter/remoteosd.c
@@ -115,7 +115,7 @@ static void DestroyFilter( vlc_object_t * );
vlc_module_begin ()
set_description( N_("Remote-OSD over VNC") )
- set_capability( "sub filter", 100 )
+ set_capability( "sub source", 100 )
set_shortname( N_("Remote-OSD") )
set_category( CAT_VIDEO )
set_subcategory( SUBCAT_VIDEO_SUBPIC )
@@ -149,7 +149,7 @@ vlc_module_end ()
#define CHALLENGESIZE 16
#define MAX_VNC_SERVER_NAME_LENGTH 255
-/* subfilter functions */
+/* subsource functions */
static subpicture_t *Filter( filter_t *, mtime_t );
static int MouseEvent( filter_t *,
@@ -194,7 +194,7 @@ static void vnc_encrypt_bytes( unsigned char *bytes, char *passwd );
/*****************************************************************************
- * Sub filter code
+ * Sub source code
*****************************************************************************/
/*****************************************************************************
@@ -303,8 +303,8 @@ static int CreateFilter ( vlc_object_t *p_this )
/* Keep track of OSD Events */
p_sys->b_need_update = false;
- /* Attach subpicture filter callback */
- p_filter->pf_sub_filter = Filter;
+ /* Attach subpicture source callback */
+ p_filter->pf_sub_source = Filter;
p_filter->pf_sub_mouse = MouseEvent;
var_AddCallback( p_filter->p_libvlc, "key-pressed", KeyEvent, p_this );
diff --git a/modules/video_filter/rss.c b/modules/video_filter/rss.c
index 52cff8a..756f2a2 100644
--- a/modules/video_filter/rss.c
+++ b/modules/video_filter/rss.c
@@ -189,7 +189,7 @@ static const char *const ppsz_title_modes[] =
* Module descriptor
*****************************************************************************/
vlc_module_begin ()
- set_capability( "sub filter", 1 )
+ set_capability( "sub source", 1 )
set_shortname( N_("RSS / Atom") )
set_help(RSS_HELP)
set_callbacks( CreateFilter, DestroyFilter )
@@ -302,7 +302,7 @@ static int CreateFilter( vlc_object_t *p_this )
/* Misc init */
vlc_mutex_init( &p_sys->lock );
- p_filter->pf_sub_filter = Filter;
+ p_filter->pf_sub_source = Filter;
p_sys->last_date = (mtime_t)0;
p_sys->b_fetched = false;
diff --git a/share/http/js/mosaic.js b/share/http/js/mosaic.js
index 5b9c3e3..6309072 100644
--- a/share/http/js/mosaic.js
+++ b/share/http/js/mosaic.js
@@ -201,7 +201,7 @@ function mosaic_code_update()
if(! o.test( value( 'mosaic_output' ) ) )
{
code.value +=
-"setup bg option sub-filter=mosaic\n"+
+"setup bg option sub-source=mosaic\n"+
"setup bg output #bridge-in{offset=100}:display\n";
}
code.value+=
diff --git a/share/lua/http/js/mosaic.js b/share/lua/http/js/mosaic.js
index 5b9c3e3..6309072 100644
--- a/share/lua/http/js/mosaic.js
+++ b/share/lua/http/js/mosaic.js
@@ -201,7 +201,7 @@ function mosaic_code_update()
if(! o.test( value( 'mosaic_output' ) ) )
{
code.value +=
-"setup bg option sub-filter=mosaic\n"+
+"setup bg option sub-source=mosaic\n"+
"setup bg output #bridge-in{offset=100}:display\n";
}
code.value+=
diff --git a/src/libvlc-module.c b/src/libvlc-module.c
index ba60e56..2219bdf 100644
--- a/src/libvlc-module.c
+++ b/src/libvlc-module.c
@@ -786,9 +786,9 @@ static const char *const ppsz_clock_descriptions[] =
// DEPRECATED
#define SUB_CAT_LONGTEXT N_( \
"These options allow you to modify the behavior of the subpictures " \
- "subsystem. You can for example enable subpictures filters (logo, etc.). " \
+ "subsystem. You can for example enable subpictures sources (logo, etc.). " \
"Enable these filters here and configure them in the " \
- "\"subpictures filters\" modules section. You can also set many " \
+ "\"subsources filters\" modules section. You can also set many " \
"miscellaneous subpictures options." )
#define SUB_MARGIN_TEXT N_("Force subtitle position")
@@ -809,9 +809,9 @@ static const char *const ppsz_clock_descriptions[] =
#define TEXTRENDERER_LONGTEXT N_( \
"VLC normally uses Freetype for rendering, but this allows you to use svg for instance.")
-#define SUB_FILTER_TEXT N_("Subpictures filter module")
-#define SUB_FILTER_LONGTEXT N_( \
- "This adds so-called \"subpicture filters\". These filters overlay " \
+#define SUB_SOURCE_TEXT N_("Subpictures source module")
+#define SUB_SOURCE_LONGTEXT N_( \
+ "This adds so-called \"subpicture sources\". These filters overlay " \
"some images or text over the video (like a logo, arbitrary text, ...)." )
#define SUB_AUTO_TEXT N_("Autodetect subtitle files")
@@ -1802,8 +1802,8 @@ vlc_module_begin ()
add_integer( "sub-margin", 0, SUB_MARGIN_TEXT,
SUB_MARGIN_LONGTEXT, true )
set_section( N_( "Overlays" ) , NULL )
- add_module_list_cat( "sub-filter", SUBCAT_VIDEO_SUBPIC, NULL, NULL,
- SUB_FILTER_TEXT, SUB_FILTER_LONGTEXT, false )
+ add_module_list_cat( "sub-source", SUBCAT_VIDEO_SUBPIC, NULL, NULL,
+ SUB_SOURCE_TEXT, SUB_SOURCE_LONGTEXT, false )
/* Input options */
set_category( CAT_INPUT )
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index 44d1a32..a5d8e98 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -132,7 +132,7 @@ filter_chain_MouseFilter
filter_chain_MouseEvent
filter_chain_New
filter_chain_Reset
-filter_chain_SubFilter
+filter_chain_SubSource
filter_chain_VideoFilter
filter_chain_VideoFlush
filter_ConfigureBlend
@@ -399,7 +399,7 @@ sout_StreamChainNew
spu_Create
spu_Destroy
spu_PutSubpicture
-spu_ChangeFilters
+spu_ChangeSources
spu_Render
spu_RegisterChannel
spu_ClearChannel
diff --git a/src/misc/filter_chain.c b/src/misc/filter_chain.c
index cb9be4a..8aff88b 100644
--- a/src/misc/filter_chain.c
+++ b/src/misc/filter_chain.c
@@ -293,13 +293,13 @@ block_t *filter_chain_AudioFilter( filter_chain_t *p_chain, block_t *p_block )
return p_block;
}
-void filter_chain_SubFilter( filter_chain_t *p_chain,
+void filter_chain_SubSource( filter_chain_t *p_chain,
mtime_t display_date )
{
for( chained_filter_t *f = p_chain->first; f != NULL; f = f->next )
{
filter_t *p_filter = &f->filter;
- subpicture_t *p_subpic = p_filter->pf_sub_filter( p_filter, display_date );
+ subpicture_t *p_subpic = p_filter->pf_sub_source( p_filter, display_date );
/* XXX I find that spu_t cast ugly */
if( p_subpic )
spu_PutSubpicture( (spu_t*)p_chain->p_this, p_subpic );
diff --git a/src/video_output/control.c b/src/video_output/control.c
index 96cb186..1806137 100644
--- a/src/video_output/control.c
+++ b/src/video_output/control.c
@@ -45,7 +45,7 @@ void vout_control_cmd_Clean(vout_control_cmd_t *cmd)
break;
case VOUT_CONTROL_OSD_TITLE:
case VOUT_CONTROL_CHANGE_FILTERS:
- case VOUT_CONTROL_CHANGE_SUB_FILTERS:
+ case VOUT_CONTROL_CHANGE_SUB_SOURCES:
free(cmd->u.string);
break;
default:
diff --git a/src/video_output/control.h b/src/video_output/control.h
index 7426134..09325b5 100644
--- a/src/video_output/control.h
+++ b/src/video_output/control.h
@@ -39,7 +39,7 @@ enum {
VOUT_CONTROL_FLUSH_SUBPICTURE, /* integer */
VOUT_CONTROL_OSD_TITLE, /* string */
VOUT_CONTROL_CHANGE_FILTERS, /* string */
- VOUT_CONTROL_CHANGE_SUB_FILTERS, /* string */
+ VOUT_CONTROL_CHANGE_SUB_SOURCES, /* string */
VOUT_CONTROL_CHANGE_SUB_MARGIN, /* integer */
VOUT_CONTROL_PAUSE,
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index ee0a99e..2c30257 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -552,9 +552,9 @@ void vout_ControlChangeFilters(vout_thread_t *vout, const char *filters)
vout_control_PushString(&vout->p->control, VOUT_CONTROL_CHANGE_FILTERS,
filters);
}
-void vout_ControlChangeSubFilters(vout_thread_t *vout, const char *filters)
+void vout_ControlChangeSubSources(vout_thread_t *vout, const char *filters)
{
- vout_control_PushString(&vout->p->control, VOUT_CONTROL_CHANGE_SUB_FILTERS,
+ vout_control_PushString(&vout->p->control, VOUT_CONTROL_CHANGE_SUB_SOURCES,
filters);
}
void vout_ControlChangeSubMargin(vout_thread_t *vout, int margin)
@@ -1172,9 +1172,9 @@ static void ThreadDisplayOsdTitle(vout_thread_t *vout, const char *string)
string);
}
-static void ThreadChangeSubFilters(vout_thread_t *vout, const char *filters)
+static void ThreadChangeSubSources(vout_thread_t *vout, const char *filters)
{
- spu_ChangeFilters(vout->p->spu, filters);
+ spu_ChangeSources(vout->p->spu, filters);
}
static void ThreadChangeSubMargin(vout_thread_t *vout, int margin)
{
@@ -1515,8 +1515,8 @@ static void *Thread(void *object)
case VOUT_CONTROL_CHANGE_FILTERS:
ThreadChangeFilters(vout, NULL, cmd.u.string, false);
break;
- case VOUT_CONTROL_CHANGE_SUB_FILTERS:
- ThreadChangeSubFilters(vout, cmd.u.string);
+ case VOUT_CONTROL_CHANGE_SUB_SOURCES:
+ ThreadChangeSubSources(vout, cmd.u.string);
break;
case VOUT_CONTROL_CHANGE_SUB_MARGIN:
ThreadChangeSubMargin(vout, cmd.u.integer);
diff --git a/src/video_output/vout_internal.h b/src/video_output/vout_internal.h
index 4767cb5..c48ff5b 100644
--- a/src/video_output/vout_internal.h
+++ b/src/video_output/vout_internal.h
@@ -149,7 +149,7 @@ void vout_ControlChangeCropRatio(vout_thread_t *, unsigned num, unsigned den);
void vout_ControlChangeCropWindow(vout_thread_t *, int x, int y, int width, int height);
void vout_ControlChangeCropBorder(vout_thread_t *, int left, int top, int right, int bottom);
void vout_ControlChangeFilters(vout_thread_t *, const char *);
-void vout_ControlChangeSubFilters(vout_thread_t *, const char *);
+void vout_ControlChangeSubSources(vout_thread_t *, const char *);
void vout_ControlChangeSubMargin(vout_thread_t *, int);
/* */
diff --git a/src/video_output/vout_intf.c b/src/video_output/vout_intf.c
index 2f33731..548867f 100644
--- a/src/video_output/vout_intf.c
+++ b/src/video_output/vout_intf.c
@@ -65,7 +65,7 @@ static int SnapshotCallback( vlc_object_t *, char const *,
vlc_value_t, vlc_value_t, void * );
static int VideoFilterCallback( vlc_object_t *, char const *,
vlc_value_t, vlc_value_t, void * );
-static int SubFilterCallback( vlc_object_t *, char const *,
+static int SubSourceCallback( vlc_object_t *, char const *,
vlc_value_t, vlc_value_t, void * );
static int SubMarginCallback( vlc_object_t *, char const *,
vlc_value_t, vlc_value_t, void * );
@@ -314,11 +314,11 @@ void vout_IntfInit( vout_thread_t *p_vout )
var_AddCallback( p_vout, "video-filter", VideoFilterCallback, NULL );
var_TriggerCallback( p_vout, "video-filter" );
- /* Add a sub-filter variable */
- var_Create( p_vout, "sub-filter",
+ /* Add a sub-source variable */
+ var_Create( p_vout, "sub-source",
VLC_VAR_STRING | VLC_VAR_DOINHERIT | VLC_VAR_ISCOMMAND );
- var_AddCallback( p_vout, "sub-filter", SubFilterCallback, NULL );
- var_TriggerCallback( p_vout, "sub-filter" );
+ var_AddCallback( p_vout, "sub-source", SubSourceCallback, NULL );
+ var_TriggerCallback( p_vout, "sub-source" );
/* Add sub-margin variable */
var_Create( p_vout, "sub-margin",
@@ -466,9 +466,9 @@ void vout_EnableFilter( vout_thread_t *p_vout, const char *psz_name,
{
psz_filter_type = "video-filter";
}
- else if( module_provides( p_obj, "sub filter" ) )
+ else if( module_provides( p_obj, "sub source" ) )
{
- psz_filter_type = "sub-filter";
+ psz_filter_type = "sub-source";
}
else
{
@@ -653,13 +653,13 @@ static int VideoFilterCallback( vlc_object_t *p_this, char const *psz_cmd,
return VLC_SUCCESS;
}
-static int SubFilterCallback( vlc_object_t *p_this, char const *psz_cmd,
+static int SubSourceCallback( vlc_object_t *p_this, char const *psz_cmd,
vlc_value_t oldval, vlc_value_t newval, void *p_data)
{
vout_thread_t *p_vout = (vout_thread_t *)p_this;
VLC_UNUSED(psz_cmd); VLC_UNUSED(oldval); VLC_UNUSED(p_data);
- vout_ControlChangeSubFilters( p_vout, newval.psz_string );
+ vout_ControlChangeSubSources( p_vout, newval.psz_string );
return VLC_SUCCESS;
}
diff --git a/src/video_output/vout_subpictures.c b/src/video_output/vout_subpictures.c
index 8ec919c..c9e2f8c 100644
--- a/src/video_output/vout_subpictures.c
+++ b/src/video_output/vout_subpictures.c
@@ -1253,7 +1253,7 @@ static void sub_del_buffer( filter_t *p_filter, subpicture_t *p_subpic )
subpicture_Delete( p_subpic );
}
-static int SubFilterAllocationInit( filter_t *p_filter, void *p_data )
+static int SubSourceAllocationInit( filter_t *p_filter, void *p_data )
{
spu_t *p_spu = p_data;
@@ -1271,7 +1271,7 @@ static int SubFilterAllocationInit( filter_t *p_filter, void *p_data )
return VLC_SUCCESS;
}
-static void SubFilterAllocationClean( filter_t *p_filter )
+static void SubSourceAllocationClean( filter_t *p_filter )
{
filter_owner_sys_t *p_sys = p_filter->p_owner;
@@ -1319,9 +1319,9 @@ spu_t *spu_Create( vlc_object_t *p_this )
p_sys->psz_chain_update = NULL;
vlc_mutex_init( &p_sys->chain_lock );
- p_sys->p_chain = filter_chain_New( p_spu, "sub filter", false,
- SubFilterAllocationInit,
- SubFilterAllocationClean,
+ p_sys->p_chain = filter_chain_New( p_spu, "sub source", false,
+ SubSourceAllocationInit,
+ SubSourceAllocationClean,
p_spu );
/* Load text and scale module */
@@ -1466,7 +1466,7 @@ subpicture_t *spu_Render( spu_t *p_spu,
{
spu_private_t *p_sys = p_spu->p;
- /* Update sub-filter chain */
+ /* Update sub-source chain */
vlc_mutex_lock( &p_sys->lock );
char *psz_chain_update = p_sys->psz_chain_update;
p_sys->psz_chain_update = NULL;
@@ -1481,8 +1481,8 @@ subpicture_t *spu_Render( spu_t *p_spu,
free( psz_chain_update );
}
- /* Run subpicture filters */
- filter_chain_SubFilter( p_sys->p_chain, render_osd_date );
+ /* Run subpicture sources */
+ filter_chain_SubSource( p_sys->p_chain, render_osd_date );
vlc_mutex_unlock( &p_sys->chain_lock );
static const vlc_fourcc_t p_chroma_list_default_yuv[] = {
@@ -1597,7 +1597,7 @@ void spu_ClearChannel( spu_t *p_spu, int i_channel )
vlc_mutex_unlock( &p_sys->lock );
}
-void spu_ChangeFilters( spu_t *p_spu, const char *psz_filters )
+void spu_ChangeSources( spu_t *p_spu, const char *psz_filters )
{
spu_private_t *p_sys = p_spu->p;
diff --git a/test/dynamicoverlay/overlay-test.c b/test/dynamicoverlay/overlay-test.c
index e2761e5..23b1ca7 100644
--- a/test/dynamicoverlay/overlay-test.c
+++ b/test/dynamicoverlay/overlay-test.c
@@ -318,7 +318,7 @@ int main( int i_argc, char *ppsz_argv[] ) {
printf( "Please make sure vlc is running.\n"
"You should append parameters similar to the following:\n"
- "--sub-filter overlay{input=%s,output=%s}\n",
+ "--sub-source overlay{input=%s,output=%s}\n",
ppsz_argv[1], ppsz_argv[2] );
printf( "Opening FIFOs..." );
--
1.7.1
More information about the vlc-devel
mailing list