Commit 9d86e0b6 authored by Yuval Tze's avatar Yuval Tze Committed by Rémi Denis-Courmont

Refactor: rename "sub-filter" to "sub-source" this includes capability,...

Refactor: rename "sub-filter" to "sub-source" this includes capability, functions, constants, user messages and command line parameter.
Signed-off-by: Rémi Denis-Courmont's avatarRémi Denis-Courmont <remi@remlab.net>
parent db4b639b
...@@ -18,7 +18,7 @@ pyschedelic() ...@@ -18,7 +18,7 @@ pyschedelic()
echo -e "\n- Psychedelic demo -\nconfiguration\n" echo -e "\n- Psychedelic demo -\nconfiguration\n"
echo -en "Please choose an input. Live camera feeds are best.\ninput? " echo -en "Please choose an input. Live camera feeds are best.\ninput? "
read input 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() gradient()
...@@ -33,7 +33,7 @@ setup a input $input ...@@ -33,7 +33,7 @@ setup a input $input
setup a output #duplicate{dst=mosaic-bridge,select=video} setup a output #duplicate{dst=mosaic-bridge,select=video}
control a play" > "`pwd`/demo.vlm" control a play" > "`pwd`/demo.vlm"
echo "VLM batch file saved to `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() mosaic()
...@@ -48,7 +48,7 @@ setup a input $vid ...@@ -48,7 +48,7 @@ setup a input $vid
setup a output #duplicate{dst=mosaic-bridge,select=video} setup a output #duplicate{dst=mosaic-bridge,select=video}
control a play" > "`pwd`/demo.vlm" control a play" > "`pwd`/demo.vlm"
echo "VLM batch file saved to `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() wall()
...@@ -61,10 +61,10 @@ wall() ...@@ -61,10 +61,10 @@ wall()
case "$rot" in case "$rot" in
"y"|"Y"|"yes") "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 "\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" echo -e "\nRight hand side:\n$VLC --vout-filter wall --wall-cols 2 --wall-rows 1 --wall-active 1 $input"
;; ;;
esac esac
......
...@@ -103,7 +103,7 @@ struct filter_t ...@@ -103,7 +103,7 @@ struct filter_t
struct struct
{ {
subpicture_t * (*pf_filter) ( filter_t *, mtime_t ); subpicture_t * (*pf_source) ( filter_t *, mtime_t );
subpicture_t * (*pf_buffer_new)( filter_t * ); subpicture_t * (*pf_buffer_new)( filter_t * );
void (*pf_buffer_del)( filter_t *, subpicture_t * ); void (*pf_buffer_del)( filter_t *, subpicture_t * );
int (*pf_mouse) ( filter_t *, int (*pf_mouse) ( filter_t *,
...@@ -111,7 +111,7 @@ struct filter_t ...@@ -111,7 +111,7 @@ struct filter_t
const vlc_mouse_t *p_new, const vlc_mouse_t *p_new,
const video_format_t * ); const video_format_t * );
} sub; } 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_new u.sub.pf_buffer_new
#define pf_sub_buffer_del u.sub.pf_buffer_del #define pf_sub_buffer_del u.sub.pf_buffer_del
#define pf_sub_mouse u.sub.pf_mouse #define pf_sub_mouse u.sub.pf_mouse
...@@ -177,7 +177,7 @@ static inline void filter_FlushPictures( filter_t *p_filter ) ...@@ -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 * 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 * 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. * Provided for convenience.
* *
* \param p_filter filter_t object * \param p_filter filter_t object
...@@ -399,7 +399,7 @@ VLC_EXPORT( block_t *, filter_chain_AudioFilter, ( filter_chain_t *, block_t * ) ...@@ -399,7 +399,7 @@ VLC_EXPORT( block_t *, filter_chain_AudioFilter, ( filter_chain_t *, block_t * )
* \param p_chain pointer to filter chain * \param p_chain pointer to filter chain
* \param display_date of subpictures * \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. * 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 ...@@ -414,7 +414,7 @@ VLC_EXPORT( int, filter_chain_MouseFilter, ( filter_chain_t *, vlc_mouse_t *, co
/** /**
* Inform the filter chain of mouse state. * 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 * ) ); VLC_EXPORT( int, filter_chain_MouseEvent, ( filter_chain_t *, const vlc_mouse_t *, const video_format_t * ) );
......
...@@ -51,11 +51,11 @@ extern "C" { ...@@ -51,11 +51,11 @@ extern "C" {
* The OSD menu core creates the OSD menu structure in memory. It parses a * 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 * 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 * 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. * 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 * it also gives a start and end date to the subpicture. The subpicture can be
* streamed if used inside a transcoding command. For example: * streamed if used inside a transcoding command. For example:
* *
...@@ -66,7 +66,7 @@ extern "C" { ...@@ -66,7 +66,7 @@ extern "C" {
* An example for local usage of the OSD menu is: * An example for local usage of the OSD menu is:
* *
* vlc dvdsimple:///dev/dvd --extraintf rc * vlc dvdsimple:///dev/dvd --extraintf rc
* --sub-filter osdmenu * --sub-source osdmenu
* --osdmenu-file=share/osdmenu/dvd.cfg * --osdmenu-file=share/osdmenu/dvd.cfg
* *
* Each OSD menu element, called "action", defines a hotkey action. Each action * Each OSD menu element, called "action", defines a hotkey action. Each action
......
...@@ -93,9 +93,9 @@ VLC_EXPORT( int, spu_RegisterChannel, ( spu_t * ) ); ...@@ -93,9 +93,9 @@ VLC_EXPORT( int, spu_RegisterChannel, ( spu_t * ) );
VLC_EXPORT( void, spu_ClearChannel, ( spu_t *, int ) ); 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 * ) );
/** @}*/ /** @}*/
......
...@@ -351,7 +351,7 @@ static VLCExtended *_o_sharedInstance = nil; ...@@ -351,7 +351,7 @@ static VLCExtended *_o_sharedInstance = nil;
} }
else else
{ {
msg_Warn( p_intf, "the corresponding subfilter coundn't be found" ); msg_Warn( p_intf, "the corresponding subsource coundn't be found" );
} }
} }
else else
......
...@@ -299,9 +299,9 @@ void ExtVideo::ChangeVFiltersString( const char *psz_name, bool b_add ) ...@@ -299,9 +299,9 @@ void ExtVideo::ChangeVFiltersString( const char *psz_name, bool b_add )
{ {
psz_filter_type = "video-filter"; 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 else
{ {
......
...@@ -433,7 +433,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -433,7 +433,7 @@ static int Open( vlc_object_t *p_this )
{ {
p_sys->p_spu = spu_Create( p_stream ); p_sys->p_spu = spu_Create( p_stream );
if( p_sys->p_spu ) if( p_sys->p_spu )
spu_ChangeFilters( p_sys->p_spu, psz_string ); spu_ChangeSources( p_sys->p_spu, psz_string );
} }
free( psz_string ); free( psz_string );
...@@ -459,11 +459,11 @@ static int Open( vlc_object_t *p_this ) ...@@ -459,11 +459,11 @@ static int Open( vlc_object_t *p_this )
{ {
p_sys->p_spu = spu_Create( p_stream ); p_sys->p_spu = spu_Create( p_stream );
if( p_sys->p_spu ) if( p_sys->p_spu )
spu_ChangeFilters( p_sys->p_spu, "osdmenu" ); spu_ChangeSources( p_sys->p_spu, "osdmenu" );
} }
else else
{ {
spu_ChangeFilters( p_sys->p_spu, "osdmenu" ); spu_ChangeSources( p_sys->p_spu, "osdmenu" );
} }
} }
......
...@@ -82,9 +82,9 @@ vlc_module_begin () ...@@ -82,9 +82,9 @@ vlc_module_begin ()
set_category( CAT_VIDEO ) set_category( CAT_VIDEO )
set_subcategory( SUBCAT_VIDEO_SUBPIC ) set_subcategory( SUBCAT_VIDEO_SUBPIC )
set_capability( "sub filter", 0 ) set_capability( "sub source", 0 )
set_callbacks( OpenSub, Close ) 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") ) set_shortname( N_("Audio Bar Graph Video") )
add_shortcut( "audiobargraph_v" ) add_shortcut( "audiobargraph_v" )
...@@ -102,7 +102,7 @@ vlc_module_begin () ...@@ -102,7 +102,7 @@ vlc_module_begin ()
add_submodule () add_submodule ()
set_capability( "video filter2", 0 ) set_capability( "video filter2", 0 )
set_callbacks( OpenVideo, Close ) 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" ) add_shortcut( "audiobargraph_v" )
vlc_module_end () vlc_module_end ()
...@@ -174,7 +174,7 @@ static void LoadBarGraph( vlc_object_t *, BarGraph_t *); ...@@ -174,7 +174,7 @@ static void LoadBarGraph( vlc_object_t *, BarGraph_t *);
void parse_i_values( BarGraph_t *p_BarGraph, char *i_values); 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 ) static int OpenSub( vlc_object_t *p_this )
{ {
...@@ -262,7 +262,7 @@ static int OpenCommon( vlc_object_t *p_this, bool b_sub ) ...@@ -262,7 +262,7 @@ static int OpenCommon( vlc_object_t *p_this, bool b_sub )
/* Misc init */ /* Misc init */
if( b_sub ) if( b_sub )
{ {
p_filter->pf_sub_filter = FilterSub; p_filter->pf_sub_source = FilterSub;
} }
else else
{ {
...@@ -302,7 +302,7 @@ static void Close( vlc_object_t *p_this ) ...@@ -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 ) static subpicture_t *FilterSub( filter_t *p_filter, mtime_t date )
{ {
......
...@@ -68,7 +68,7 @@ vlc_module_begin () ...@@ -68,7 +68,7 @@ vlc_module_begin ()
set_shortname( N_("Overlay" )) set_shortname( N_("Overlay" ))
set_category( CAT_VIDEO ) set_category( CAT_VIDEO )
set_subcategory( SUBCAT_VIDEO_VFILTER ) set_subcategory( SUBCAT_VIDEO_VFILTER )
set_capability( "sub filter", 0 ) set_capability( "sub source", 0 )
add_loadfile( "overlay-input", NULL, INPUT_TEXT, INPUT_LONGTEXT, add_loadfile( "overlay-input", NULL, INPUT_TEXT, INPUT_LONGTEXT,
false ) false )
...@@ -113,7 +113,7 @@ static int Create( vlc_object_t *p_this ) ...@@ -113,7 +113,7 @@ static int Create( vlc_object_t *p_this )
p_sys->b_atomic = false; p_sys->b_atomic = false;
vlc_mutex_init( &p_sys->lock ); 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, config_ChainParse( p_filter, "overlay-", ppsz_filter_options,
p_filter->p_cfg ); p_filter->p_cfg );
......
...@@ -87,9 +87,9 @@ vlc_module_begin () ...@@ -87,9 +87,9 @@ vlc_module_begin ()
set_category( CAT_VIDEO ) set_category( CAT_VIDEO )
set_subcategory( SUBCAT_VIDEO_SUBPIC ) set_subcategory( SUBCAT_VIDEO_SUBPIC )
set_help(LOGO_HELP) set_help(LOGO_HELP)
set_capability( "sub filter", 0 ) set_capability( "sub source", 0 )
set_callbacks( OpenSub, Close ) set_callbacks( OpenSub, Close )
set_description( N_("Logo sub filter") ) set_description( N_("Logo sub source") )
set_shortname( N_("Logo overlay") ) set_shortname( N_("Logo overlay") )
add_shortcut( "logo" ) add_shortcut( "logo" )
...@@ -200,7 +200,7 @@ static logo_t *LogoListNext( logo_list_t *p_list, mtime_t i_date ); ...@@ -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 ); 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 ) static int OpenSub( vlc_object_t *p_this )
{ {
...@@ -293,7 +293,7 @@ static int OpenCommon( vlc_object_t *p_this, bool b_sub ) ...@@ -293,7 +293,7 @@ static int OpenCommon( vlc_object_t *p_this, bool b_sub )
/* Misc init */ /* Misc init */
if( b_sub ) if( b_sub )
{ {
p_filter->pf_sub_filter = FilterSub; p_filter->pf_sub_source = FilterSub;
} }
else else
{ {
...@@ -326,7 +326,7 @@ static void Close( vlc_object_t *p_this ) ...@@ -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 ) static subpicture_t *FilterSub( filter_t *p_filter, mtime_t date )
{ {
......
...@@ -144,7 +144,7 @@ static const char *const ppsz_pos_descriptions[] = ...@@ -144,7 +144,7 @@ static const char *const ppsz_pos_descriptions[] =
* Module descriptor * Module descriptor
*****************************************************************************/ *****************************************************************************/
vlc_module_begin () vlc_module_begin ()
set_capability( "sub filter", 0 ) set_capability( "sub source", 0 )
set_shortname( N_("Marquee" )) set_shortname( N_("Marquee" ))
set_description( N_("Marquee display") ) set_description( N_("Marquee display") )
set_help(MARQUEE_HELP) set_help(MARQUEE_HELP)
...@@ -225,7 +225,7 @@ static int CreateFilter( vlc_object_t *p_this ) ...@@ -225,7 +225,7 @@ static int CreateFilter( vlc_object_t *p_this )
CREATE_VAR( p_style->i_font_size, Integer, "marq-size" ); CREATE_VAR( p_style->i_font_size, Integer, "marq-size" );
/* Misc init */ /* Misc init */
p_filter->pf_sub_filter = Filter; p_filter->pf_sub_source = Filter;
p_sys->last_time = 0; p_sys->last_time = 0;
return VLC_SUCCESS; return VLC_SUCCESS;
......
...@@ -174,11 +174,11 @@ static const char *const ppsz_align_descriptions[] = ...@@ -174,11 +174,11 @@ static const char *const ppsz_align_descriptions[] =
#define CFG_PREFIX "mosaic-" #define CFG_PREFIX "mosaic-"
vlc_module_begin () vlc_module_begin ()
set_description( N_("Mosaic video sub filter") ) set_description( N_("Mosaic video sub source") )
set_shortname( N_("Mosaic") ) set_shortname( N_("Mosaic") )
set_category( CAT_VIDEO ) set_category( CAT_VIDEO )
set_subcategory( SUBCAT_VIDEO_SUBPIC) set_subcategory( SUBCAT_VIDEO_SUBPIC)
set_capability( "sub filter", 0 ) set_capability( "sub source", 0 )
set_callbacks( CreateFilter, DestroyFilter ) set_callbacks( CreateFilter, DestroyFilter )
add_integer_with_range( CFG_PREFIX "alpha", 255, 0, 255, NULL, add_integer_with_range( CFG_PREFIX "alpha", 255, 0, 255, NULL,
...@@ -294,7 +294,7 @@ static int CreateFilter( vlc_object_t *p_this ) ...@@ -294,7 +294,7 @@ static int CreateFilter( vlc_object_t *p_this )
if( p_sys == NULL ) if( p_sys == NULL )
return VLC_ENOMEM; return VLC_ENOMEM;
p_filter->pf_sub_filter = Filter; p_filter->pf_sub_source = Filter;
vlc_mutex_init( &p_sys->lock ); vlc_mutex_init( &p_sys->lock );
vlc_mutex_lock( &p_sys->lock ); vlc_mutex_lock( &p_sys->lock );
......
...@@ -84,7 +84,7 @@ static const char *const ppsz_pos_descriptions[] = ...@@ -84,7 +84,7 @@ static const char *const ppsz_pos_descriptions[] =
{ N_("Center"), N_("Left"), N_("Right"), N_("Top"), N_("Bottom"), { N_("Center"), N_("Left"), N_("Right"), N_("Top"), N_("Bottom"),
N_("Top-Left"), N_("Top-Right"), N_("Bottom-Left"), N_("Bottom-Right") }; N_("Top-Left"), N_("Top-Right"), N_("Bottom-Left"), N_("Bottom-Right") };
/* subfilter functions */ /* subsource functions */
static int CreateFilter ( vlc_object_t * ); static int CreateFilter ( vlc_object_t * );
static void DestroyFilter( vlc_object_t * ); static void DestroyFilter( vlc_object_t * );
static subpicture_t *Filter( filter_t *, mtime_t ); static subpicture_t *Filter( filter_t *, mtime_t );
...@@ -114,7 +114,7 @@ static int MouseEvent( filter_t *, ...@@ -114,7 +114,7 @@ static int MouseEvent( filter_t *,
#define OSD_UPDATE_MAX 1000 #define OSD_UPDATE_MAX 1000
vlc_module_begin () vlc_module_begin ()
set_capability( "sub filter", 100 ) set_capability( "sub source", 100 )
set_description( N_("On Screen Display menu") ) set_description( N_("On Screen Display menu") )
set_shortname( N_("OSD menu") ) set_shortname( N_("OSD menu") )
add_shortcut( "osdmenu" ) add_shortcut( "osdmenu" )
...@@ -144,7 +144,7 @@ vlc_module_begin () ...@@ -144,7 +144,7 @@ vlc_module_begin ()
vlc_module_end () vlc_module_end ()
/***************************************************************************** /*****************************************************************************
* Sub filter code * Sub source code
*****************************************************************************/ *****************************************************************************/
/***************************************************************************** /*****************************************************************************
...@@ -250,8 +250,8 @@ static int CreateFilter ( vlc_object_t *p_this ) ...@@ -250,8 +250,8 @@ static int CreateFilter ( vlc_object_t *p_this )
var_AddCallback( p_sys->p_menu, "osd-menu-visible", var_AddCallback( p_sys->p_menu, "osd-menu-visible",
OSDMenuVisibleEvent, p_filter ); OSDMenuVisibleEvent, p_filter );
/* Attach subpicture filter callback */ /* Attach subpicture source callback */
p_filter->pf_sub_filter = Filter; p_filter->pf_sub_source = Filter;
p_filter->pf_sub_mouse = MouseEvent; p_filter->pf_sub_mouse = MouseEvent;
es_format_Init( &p_filter->fmt_out, SPU_ES, VLC_CODEC_SPU ); es_format_Init( &p_filter->fmt_out, SPU_ES, VLC_CODEC_SPU );
......
...@@ -115,7 +115,7 @@ static void DestroyFilter( vlc_object_t * ); ...@@ -115,7 +115,7 @@ static void DestroyFilter( vlc_object_t * );
vlc_module_begin () vlc_module_begin ()
set_description( N_("Remote-OSD over VNC") ) set_description( N_("Remote-OSD over VNC") )
set_capability( "sub filter", 100 ) set_capability( "sub source", 100 )
set_shortname( N_("Remote-OSD") ) set_shortname( N_("Remote-OSD") )
set_category( CAT_VIDEO ) set_category( CAT_VIDEO )
set_subcategory( SUBCAT_VIDEO_SUBPIC ) set_subcategory( SUBCAT_VIDEO_SUBPIC )
...@@ -149,7 +149,7 @@ vlc_module_end () ...@@ -149,7 +149,7 @@ vlc_module_end ()
#define CHALLENGESIZE 16 #define CHALLENGESIZE 16
#define MAX_VNC_SERVER_NAME_LENGTH 255 #define MAX_VNC_SERVER_NAME_LENGTH 255
/* subfilter functions */ /* subsource functions */
static subpicture_t *Filter( filter_t *, mtime_t ); static subpicture_t *Filter( filter_t *, mtime_t );
static int MouseEvent( filter_t *, static int MouseEvent( filter_t *,
...@@ -194,7 +194,7 @@ static void vnc_encrypt_bytes( unsigned char *bytes, char *passwd ); ...@@ -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 ) ...@@ -303,8 +303,8 @@ static int CreateFilter ( vlc_object_t *p_this )
/* Keep track of OSD Events */ /* Keep track of OSD Events */
p_sys->b_need_update = false; p_sys->b_need_update = false;
/* Attach subpicture filter callback */ /* Attach subpicture source callback */
p_filter->pf_sub_filter = Filter; p_filter->pf_sub_source = Filter;
p_filter->pf_sub_mouse = MouseEvent; p_filter->pf_sub_mouse = MouseEvent;
var_AddCallback( p_filter->p_libvlc, "key-pressed", KeyEvent, p_this ); var_AddCallback( p_filter->p_libvlc, "key-pressed", KeyEvent, p_this );
......
...@@ -189,7 +189,7 @@ static const char *const ppsz_title_modes[] = ...@@ -189,7 +189,7 @@ static const char *const ppsz_title_modes[] =
* Module descriptor * Module descriptor
*****************************************************************************/ *****************************************************************************/
vlc_module_begin () vlc_module_begin ()
set_capability( "sub filter", 1 ) set_capability( "sub source", 1 )
set_shortname( N_("RSS / Atom") ) set_shortname( N_("RSS / Atom") )
set_help(RSS_HELP) set_help(RSS_HELP)
set_callbacks( CreateFilter, DestroyFilter ) set_callbacks( CreateFilter, DestroyFilter )
...@@ -302,7 +302,7 @@ static int CreateFilter( vlc_object_t *p_this ) ...@@ -302,7 +302,7 @@ static int CreateFilter( vlc_object_t *p_this )
/* Misc init */ /* Misc init */
vlc_mutex_init( &p_sys->lock ); 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->last_date = (mtime_t)0;
p_sys->b_fetched = false; p_sys->b_fetched = false;
......
...@@ -201,7 +201,7 @@ function mosaic_code_update() ...@@ -201,7 +201,7 @@ function mosaic_code_update()
if(! o.test( value( 'mosaic_output' ) ) ) if(! o.test( value( 'mosaic_output' ) ) )
{ {
code.value += 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"; "setup bg output #bridge-in{offset=100}:display\n";
} }
code.value+= code.value+=
......
...@@ -201,7 +201,7 @@ function mosaic_code_update() ...@@ -201,7 +201,7 @@ function mosaic_code_update()
if(! o.test( value( 'mosaic_output' ) ) ) if(! o.test( value( 'mosaic_output' ) ) )
{ {
code.value += 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"; "setup bg output #bridge-in{offset=100}:display\n";
} }
code.value+= code.value+=
......
...@@ -786,9 +786,9 @@ static const char *const ppsz_clock_descriptions[] = ...@@ -786,9 +786,9 @@ static const char *const ppsz_clock_descriptions[] =
// DEPRECATED // DEPRECATED
#define SUB_CAT_LONGTEXT N_( \ #define SUB_CAT_LONGTEXT N_( \
"These options allow you to modify the behavior of the subpictures " \ "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 " \ "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." ) "miscellaneous subpictures options." )
#define SUB_MARGIN_TEXT N_("Force subtitle position") #define SUB_MARGIN_TEXT N_("Force subtitle position")
...@@ -809,9 +809,9 @@ static const char *const ppsz_clock_descriptions[] = ...@@ -809,9 +809,9 @@ static const char *const ppsz_clock_descriptions[] =
#define TEXTRENDERER_LONGTEXT N_( \ #define TEXTRENDERER_LONGTEXT N_( \
"VLC normally uses Freetype for rendering, but this allows you to use svg for instance.") "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_SOURCE_TEXT N_("Subpictures source module")
#define SUB_FILTER_LONGTEXT N_( \ #define SUB_SOURCE_LONGTEXT N_( \
"This adds so-called \"subpicture filters\". These filters overlay " \ "This adds so-called \"subpicture sources\". These filters overlay " \
"some images or text over the video (like a logo, arbitrary text, ...)." ) "some images or text over the video (like a logo, arbitrary text, ...)." )
#define SUB_AUTO_TEXT N_("Autodetect subtitle files") #define SUB_AUTO_TEXT N_("Autodetect subtitle files")
...@@ -1802,8 +1802,8 @@ vlc_module_begin () ...@@ -1802,8 +1802,8 @@ vlc_module_begin ()
add_integer( "sub-margin", 0, SUB_MARGIN_TEXT, add_integer( "sub-margin", 0, SUB_MARGIN_TEXT,
SUB_MARGIN_LONGTEXT, true ) SUB_MARGIN_LONGTEXT, true )
set_section( N_( "Overlays" ) , NULL ) set_section( N_( "Overlays" ) , NULL )
add_module_list_cat( "sub-filter", SUBCAT_VIDEO_SUBPIC, NULL, NULL, add_module_list_cat( "sub-source", SUBCAT_VIDEO_SUBPIC, NULL, NULL,
SUB_FILTER_TEXT, SUB_FILTER_LONGTEXT, false ) SUB_SOURCE_TEXT, SUB_SOURCE_LONGTEXT, false )
/* Input options */ /* Input options */
set_category( CAT_INPUT ) set_category( CAT_INPUT )
......
...@@ -132,7 +132,7 @@ filter_chain_MouseFilter ...@@ -132,7 +132,7 @@ filter_chain_MouseFilter
filter_chain_MouseEvent filter_chain_MouseEvent
filter_chain_New filter_chain_New
filter_chain_Reset filter_chain_Reset
filter_chain_SubFilter filter_chain_SubSource
filter_chain_VideoFilter filter_chain_VideoFilter
filter_chain_VideoFlush filter_chain_VideoFlush
filter_ConfigureBlend filter_ConfigureBlend
...@@ -399,7 +399,7 @@ sout_StreamChainNew ...@@ -399,7 +399,7 @@ sout_StreamChainNew
spu_Create spu_Create
spu_Destroy spu_Destroy
spu_PutSubpicture spu_PutSubpicture
spu_ChangeFilters spu_ChangeSources
spu_Render spu_Render
spu_RegisterChannel spu_RegisterChannel
spu_ClearChannel spu_ClearChannel
......
...@@ -293,13 +293,13 @@ block_t *filter_chain_AudioFilter( filter_chain_t *p_chain, block_t *p_block ) ...@@ -293,13 +293,13 @@ block_t *filter_chain_AudioFilter( filter_chain_t *p_chain, block_t *p_block )
return 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 ) mtime_t display_date )
{ {
for( chained_filter_t *f = p_chain->first; f != NULL; f = f->next ) for( chained_filter_t *f = p_chain->first; f != NULL; f = f->next )
{ {
filter_t *p_filter = &f->filter; 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 */ /* XXX I find that spu_t cast ugly */
if( p_subpic ) if( p_subpic )
spu_PutSubpicture( (spu_t*)p_chain->p_this, p_subpic ); spu_PutSubpicture( (spu_t*)p_chain->p_this, p_subpic );
......
...@@ -45,7 +45,7 @@ void vout_control_cmd_Clean(vout_control_cmd_t *cmd) ...@@ -45,7 +45,7 @@ void vout_control_cmd_Clean(vout_control_cmd_t *cmd)
break;