[vlc-devel] Re: freetype2 text module
Sigmund Augdal
sigmunau at stud.ntnu.no
Tue Apr 8 09:49:50 CEST 2003
On Mon, Mar 24, 2003 at 04:38:08PM +0100, Olivier Aubert wrote:
> 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.
Thanks, and sorry for the slow reply.
> 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 thought about this and concluded that this and concluded that this way
whould be usable enough, since you could allways keep this filter first in
the pipeline. I see now that this may not be enough.
> 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 sounds doable. But I will not have any time to fix this any time soon.
And there are other bugs in this module that need to be fixed too.
> 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
The second one is not a real problem since on osd_text instence can handle
several text strungs with different locations and durations. The only
problem whould be if you needed different size or font. The first one could
be a problem, but the real problem in that case whould be a problem of user
interface. Who whould you activate something like that?
>
> 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.
This is not my job to comment on.
>
> Any thoughts on this ?
This is my thoughts, thanks for the comments.
Sigmund
--
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