[vlc-devel] libvlc_media_descriptor_add_option and :vout-filter problem

Antoine Cellerier dionoea at videolan.org
Wed May 7 16:36:58 CEST 2008


On Wed, May 07, 2008, jboileau wrote:
> In an attempt to use filters with libvlc I have tried simply adding
> the option to my media descriptor with
> libvlc_media_descriptor_add_option. Ex ":vout-filter=magnify". At
> least this should work fine for filters I do not need to interact
> with.
> 
> But the problem I have is that it only works on the first media
> descriptor/play. For example if I create a media descriptor without a
> ":vout" option, play it, then create a new media descriptor with a
> ":vout-filter=magnify" option and play this new one, I will not get
> the magnify filter. The reverse is also true. If I create a first
> media descriptor with the filter option I will get the magnify filter,
> but if I play a second media descriptor without any filter option the
> magnify filter will stay enabled.

That might be due to VLC's attempt at reusing a previous video output if
possible. Function __vout_Request in src/video_output/video_output.c is
repsonsible for video output creation. This function, if it finds a
previous video ouput, checks for the "vout-filter" variable attached to
the old video output ... which is unlikely to get updated if you use
:vout-filter=something. So basically that code is broken. I'll try to
fix that right away.

-- 
Antoine Cellerier
dionoea



More information about the vlc-devel mailing list