[vlc-devel] Re: freetype2 text module
Olivier Aubert
oaubert at bat710.univ-lyon1.fr
Mon Mar 24 16:38:08 CET 2003
Hello.
I am glad to see the osd_text module added to the current VLC version. I
wanted to use this feature for some time.
I have a comment on the current implementation of the osd_text module :
there is an issue in communicating with the filter, when there are more
than 1 video filters : there is no guarantee (in the lirc.c Feedback
example) that
p_intf->p_sys->p_vout
will hold a reference to an osd_text instance. It could be another
filter, like for instance clone.c. I got bitten by the same issue when
developping a snapshot functionality for vlc, which could be used as a
standalone video_output, or in conjunction with a "real" video_output
through the clone module.
I solved the problem by registering the snapshot vout_module module-id
as a variable at the libvlc level :
var_Create (p_this->p_libvlc, "snapshot-id", VLC_VAR_INTEGER);
to be able to get its reference in the modules that need it (via var_Get
(p_intf->p_libvlc, "snapshot-id") and vlc_object_get(snapshot-id) with
the correct id).
This solves the problem of filter pipes. But it does not solve the
problem of multiple instances of the same video_filter. Am I too crazy
to envision situations like :
osd_text (french text) --- X11 vout
/
p_clone
\
osd_text (english text) --- X11 vout
or a
osd_text (top text) -- osd_text (bottom text) -- X11 vout
What is needed is a way to register modules at the libvlc level : a kind
of naming service for the VLC object layer. Or maybe just the convention
that modules needing this should register a "module-id" variable in
p_libvlc.
Any thoughts on this ?
Olivier
--
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>
More information about the vlc-devel
mailing list