vlc_module_begin();
set_category( CAT_INPUT);
set_category( SUBCAT_INPUT_SCODEC );
- set_capability( "text renderer", 101 );
+ set_capability( "text renderer", 99 );
add_shortcut( "svg" );
add_string( "svg-template-file", "", NULL, TEMPLATE_TEXT, TEMPLATE_LONGTEXT, VLC_TRUE );
set_callbacks( Create, Destroy );
"VLC can display messages on the video. This is called OSD (On Screen " \
"Display).")
+#define TEXTRENDERER_TEXT N_("Text rendering module")
+#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 " \
add_bool( "spu", 1, NULL, SPU_TEXT, SPU_LONGTEXT, VLC_TRUE );
add_bool( "osd", 1, NULL, OSD_TEXT, OSD_LONGTEXT, VLC_FALSE );
+ add_module( "text-renderer", "text renderer", NULL, NULL, TEXTRENDERER_TEXT,
+ TEXTRENDERER_LONGTEXT, VLC_TRUE );
set_section( N_("Subtitles") , NULL );
add_file( "sub-file", NULL, NULL, SUB_FILE_TEXT,
/* Load the text rendering module */
if( !p_spu->p_text && p_region )
{
+ char *psz_modulename = NULL;
+
p_spu->p_text = vlc_object_create( p_spu, VLC_OBJECT_FILTER );
vlc_object_attach( p_spu->p_text, p_spu );
p_spu->p_text->pf_sub_buffer_new = spu_new_buffer;
p_spu->p_text->pf_sub_buffer_del = spu_del_buffer;
- p_spu->p_text->p_module =
- module_Need( p_spu->p_text, "text renderer", 0, 0 );
+
+ psz_modulename = var_CreateGetString( p_spu, "text-renderer" );
+ if( psz_modulename && *psz_modulename )
+ {
+ p_spu->p_text->p_module =
+ module_Need( p_spu->p_text, "text renderer", psz_modulename, VLC_TRUE );
+ }
+ if( !p_spu->p_text->p_module )
+ {
+ p_spu->p_text->p_module =
+ module_Need( p_spu->p_text, "text renderer", 0, 0 );
+ }
+ if( psz_modulename ) free( psz_modulename );
}
else if( p_region )
{