[vlc-devel] Video filter fails to load

Peter Tap ptrtap at yahoo.com
Wed Mar 21 05:01:30 CET 2012


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:

[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 );

Thank you in advance for your help.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20120320/7d38f6d1/attachment.html>

More information about the vlc-devel mailing list