[vlc-devel] Can<t set the hue programatically...

jboileau jboileau at gmail.com
Mon May 26 18:22:40 CEST 2008


Thanks Antoine, you have gotten me going in the right direction. You
have guessed right, I am using the latest from git. At least the
latest that builds which means may 15.

Using the example you provided I was able to play with the hue but
there is still some glitches. I was able to create the filter using:

var_SetString( p_vout, "video-filter", "adjust" );

I was also able to play with the hue by setting it directly in the string:

var_SetString( p_vout, "video-filter", "adjust{hue=100}" );

and this can be done repeatedly. The traces show that the second and
subsequent calls remove the filter first and add a new one.

But I can't set the hue using:

var_SetInteger( p_filter, "hue", 100);

First I try to find a valid filter pointer using:

vlc_object_t *p_filter = (vlc_object_t *) vlc_object_find_name(p_vout,
"adjust", FIND_ANYWHERE );

but I get NULL. I do this rigth after my call var_SetString( p_vout,
"video-filter", "adjust" );. How should I get my p_filter?

In investigating this problem I have found that if I had the adjust
filter as an option to libvlc_new and the use vlc_object_find_name I
get a valid p_filter. But I would rather be able to do it dynamically
if possible.

Jacques Boileau

On Mon, May 26, 2008 at 4:32 AM, Antoine Cellerier <dionoea at videolan.org> wrote:
> On Fri, May 23, 2008, jboileau wrote:
>> I am trying to access the adjust module programaticaly by adding
>> functionnality to libvlc. First I make sure my libvlc instance is
>> created using the option --video-filter=adjust{hue=200}. This part
>> works because when I play a video I can see the greenish hue this
>> value produces. Then, while the video is playing, I try to set the hue
>> using this code, but nothing changes:
>>
>>     val.i_int = 0;
>>     var_Set( p_vout, "hue", val );
>
> What VLC version are you using?
>
> I'd guess git master so here it comes:
> the "hue" setting is attached to the "adjust" video filter2 object. So
> you'd need to run var_Set( p_filter, "hue", val ); (btw, you can use
> var_SetInteger)
>
> If the adjust filter wasn't already available in the filter chain, you
> can just use var_SetString( p_vout, "video-filter", "adjust" );
>
> You can read modules/gui/qt4/components/extended_panels.cpp to see a
> (complex) code example.
>
> --
> Antoine Cellerier
> dionoea
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel
>



-- 
Jacques Boileau



More information about the vlc-devel mailing list