Setting video contrast, bightness ecc...

This forum is about all development around libVLC.
hulud
New Cone
New Cone
Posts: 8
Joined: 08 May 2009 20:11

Setting video contrast, bightness ecc...

Postby hulud » 18 May 2009 23:55

I'm trying to modify src/control/video.c to set contrast, brightness and other settings using libvlc:

i've tried with this function but nothing happens...

Code: Select all

void libvlc_video_set_contrast( libvlc_media_player_t *p_mi, float contrast, libvlc_exception_t *p_e ) { vout_thread_t *p_vout = GetVout( p_mi, p_e ); if( !p_vout ) return; var_SetFloat( p_vout, "contrast", contrast ); vlc_object_release( p_vout ); }
trying to get contrast value i get always 0:

Code: Select all

float libvlc_video_get_contrast( libvlc_media_player_t *p_mi, libvlc_exception_t *p_e ) { vout_thread_t *p_vout = GetVout( p_mi, p_e ); float contrast; if( !p_vout ) return 5; contrast = var_GetFloat( p_vout, "contrast" ); vlc_object_release( p_vout ); return contrast; }

Rémi Denis-Courmont
Developer
Developer
Posts: 15279
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Setting video contrast, bightness ecc...

Postby Rémi Denis-Courmont » 19 May 2009 18:40

You would need to enable the adjust video filter first, and set the variable onto that filter object, not on the video output object.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 35 guests