[vlc-devel] transcode vfilter
Paul Corke
paul.corke at datatote.co.uk
Tue Apr 17 14:46:07 CEST 2007
I'm having problems getting the transcode module to use a
vfilter that I specify. I'm actually using my own "video
filter2" module, but the issue can be replicated with
"ripple". I have an sout chain like this:
#transcode{vcodec=mp2v,vb=6000,acodec=mp2a,ab=192,venc=ffmpeg,vfilter=ri
pple}
The module_Need() function finds the filter and gives it a score
of 10000 because the shortcut matches. It also finds the "scale"
module which has a default score of 10000. Because there are then
two modules with the same score, for some reason it tries to load
"scale" even though that is not what I specified as my vfilter!
I think there are four ways to fix this:
====== modules/video_filter/ripple.c ======
- set_capability( "video filter2", 0 );
+ set_capability( "video filter2", 1 );
/* and make the same change to all other modules */
====== modules/video_filter/scale.c ======
- set_capability( "video filter2", 10000 );
+ set_capability( "video filter2", 9999 );
====== src/misc/modules.c ======
/* Found it */
if( c && c[1] )
psz_alias = c+1;
- i_shortcut_bonus = i_short * 10000;
+ i_shortcut_bonus = i_short * 100000;
goto found_shortcut;
====== modules/stream_out/transcode.c ======
id->pp_ufilter[id->i_ufilter]->p_module =
module_Need( id->pp_ufilter[id->i_ufilter],
- "video filter2", p_sys->psz_vfilters[i], 0 );
+ "video filter2", p_sys->psz_vfilters[i],
VLC_TRUE );
======
I think I prefer the final option, because it has no impact on
the other parts of the system. By setting "b_strict", it forces
the selection of the specified module and I can't see why anyone
would want it to choose a different one.
Options 2 or 3 might be interesting in case the same thing is
happening elsewhere - someone else might know and I don't currently
have time to look at all the module_Need() calls. Therefore
I'm attaching a patch file for the final option.
Regards,
Paul.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: transcode.svn-diff.txt
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20070417/9616fd17/attachment.txt>
More information about the vlc-devel
mailing list