[vlc-devel] Libvlc: problem with vlc_object_find_name()
Tanguy Krotoff
tkrotoff at gmail.com
Fri Apr 25 06:06:39 CEST 2008
Hello
I would like to add filters to libvlc (hue, contrast...)
And I'm stuck :/
For example, this little code inside control/video.c fails:
vout_thread_t *p_vout = GetVout( p_mi, p_e );
vlc_object_t *p_filter = (vlc_object_t *) vlc_object_find_name(
p_vout, "adjust", FIND_ANYWHERE );
var_SetInteger( p_filter, "hue", i_value );
p_filter is always NULL (p_vout is not: the video is being displayed)
Same for this:
vout_thread_t *p_vout = GetVout( p_mi, p_e );
vlc_object_t *p_filter = (vlc_object_t *) vlc_object_find_name(
p_vout, "marq", FIND_ANYWHERE );
var_SetString ( p_filter, "marq-marquee", "Hi!!!");
I checked MacOSX module source code (extended.m) and here is how it is
done (simplified version):
intf_thread_t * p_intf = VLCIntf;
vout_thread_t *p_vout = (vout_thread_t *) vlc_object_find(p_intf,
VLC_OBJECT_VOUT, FIND_ANYWHERE);
vlc_object_t *p_filter = (vlc_object_t *) vlc_object_find_name(
p_intf, "adjust", FIND_ANYWHERE );
var_SetInteger( p_filter, "hue", [o_sld_hue intValue] );
I don't understand what is intf_thread_t.
How do I get a intf_thread_t object inside libvlc?
What are the right parameters for vlc_object_find_name()?
Thx
--
Tanguy Krotoff <tkrotoff at gmail.com>
+33 6 68 42 70 24
More information about the vlc-devel
mailing list