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: default avatarRémi Denis-Courmont <remi@remlab.net>
parent db4b639b
......@@ -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
......
......@@ -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 * ) );
......
......@@ -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
......
......@@ -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 * ) );
/** @}*/
......
......@@ -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
......
......@@ -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
{
......
......@@ -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" );
}
}
......
......@@ -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 )
{
......
......@@ -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 );
......
......@@ -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 )
{
......
......@@ -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;
......
......@@ -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 );
......
......@@ -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 );
......
......@@ -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 );
......
......@@ -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;
......
......@@ -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+=
......
......@@ -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+=
......
......@@ -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 )
......
......@@ -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
......
......@@ -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 );
......
......@@ -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:
......
......@@ -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,
......
......@@ -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);
......
......@@ -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);
/* */
......
......@@ -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;
}
......
......@@ -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;
......
......@@ -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..." );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment