[vlc-devel] How to create a field that is accessible by multiple modules
remi at remlab.net
Sat Nov 17 16:28:02 CET 2012
Le samedi 17 novembre 2012 14:09:49, Rafaël Carré a écrit :
> > //Set a var
> > var_Create(stream->p_libvlc, "variabel_name_1", VLC_VAR_INTEGER);
> > var_SetInteger(stream->p_libvlc, "variabel_name_1", active);
> > //get a var
> > return var_InheritInteger(stream->p_libvlc, "variabel_name_1");
> > I have no idea if this solution is thread safe and stuff like that, like
> > I said, it is a hacksish solution that you shouldn't use in decent code.
> It should be safe as long as the object is valid. (if it's not I expect
> it to crash immediately anyway)
libvlc is always valid from that perspective. However, the data would be
shared across all objects within a libvlc instance.
Expect problems if VLM or libvlc_media_player is used...
More information about the vlc-devel