[vlc-devel] Video filter fails to load

Rafaël Carré funman at videolan.org
Wed Mar 21 08:27:35 CET 2012

Le 2012-03-21 00:01, Peter Tap a écrit :
> Folks,
> I am working on a custom video filter. At present, it requires no additional parameters:
> vlc_module_begin ()
>     set_capability( "sub source", 100 )
>     set_shortname( N_("Mytest ))
>     set_description( N_("Mytest desc") )
>     set_callbacks( CreateFilter, DestroyFilter )
>     set_category( CAT_VIDEO )
>     set_subcategory( SUBCAT_VIDEO_SUBPIC )
> vlc_module_end ()
> As my filter is close in functionality to marquee filter, I copied the code from marq.c and made relevant changes.

> When I run vlc --list, I see that my filter module gets listed.
> mytest          Mytest desc
> However, when I run "vlc --sub-filter=mytest," I get an error that it failed to create my filter:

What is the filename of your filter?

I think set_shortname or code using it is broken or buggy.

> [0x88d3bc0] main filter debug: looking for sub filter module: 0 candidates
> [0x88d3bc0] main filter debug: no sub filter module matched "mytest"
> [0x88d3bc0] main filter debug: TIMER module_need() : 0.204 ms - Total 0.204 ms / 1 intvls (Avg 0.204 ms)
> [0x8885010] main subpicture error: Failed to create sub filter 'mytest'
> [0x8885010] main subpicture error: Failed while trying to append 'mytest' to filter chain
> In the debugger, I see that after the errors are reported, it does invoke my CreateFilter method. However, something has already gone wrong by this time. Hence, my filter doesn't work as it is supposed to.
> I am wondering if anyone has any idea on what is going on.
> One more question, the marquee control makes a call to config_ChainParser in its CreateFilter method. However, as I don't require any parameters, I commented out the line. Would that make any difference?
>    /*
>     config_ChainParse( p_filter, CFG_PREFIX, ppsz_filter_options,
>                        p_filter->p_cfg );
>     */

should make no difference, you can remove ppsz_filter_options from your
code too.

> Thank you in advance for your help.
> Regards,
> Peter

More information about the vlc-devel mailing list