[vlc-devel] [PATCH] Merge PrintMsg and PrintColorMsg to avoid duplicated code
segarral at gmail.com
Thu Sep 22 08:47:43 CEST 2011
Sorry, but as i didn t receive any answer to the question below, i try to send it you again.
Ps: I wait a long time before send it you again because i thought it was not interesting. So my apologizes if it is.
Début du message transféré :
> Expéditeur: ludovic <segarral at free.fr>
> Date: 10 septembre 2011 12:18:59 HAEC
> Destinataire: Mailing list for VLC media player developers <vlc-devel at videolan.org>
> Objet: Rép : [vlc-devel] [PATCH] Merge PrintMsg and PrintColorMsg to avoid duplicated code
> About messages on stderr, I would suggest to add a new built-in singleton object (src/misc/msgstderr.c or in src/misc/messages). This object would be referenced in libvlc_priv_t (src/libvlc.h), in the "singleton object" part.
> This object would subscribe to messages queue in libvlc_InternalInit and unsubscribe in libvlc_InternalDestroy.
> This pretty simple mecanism could be the first step to unify all loggers in the core. Hope that this object make your LibVLC initialization changes easier for messages part.
> Would you be interested by this stuff that I could do ?
> 2011/9/7 Rémi Denis-Courmont<remi at remlab.net>
> Le mercredi 7 septembre 2011 01:17:35 ludovic, vous avez écrit :
> > Ok, I understand that I have to use the "message subscribers" mecanism
> > which calls "msg_callback_t func".
> > Sorry to disturb you again with some (stupid) questions about your answer,
> > but I'd like to avoid a new mistake...
> > - Do you mean that I should integrate PrintMsg in a new object (solution 1)
> > or in the logger object (solution 2) ?
> I don't mean you should do anything particular. I just mean your patch is
> going against a change that I did on purpose.
> Ultimately, my goal is to unify all loggers in the core, and provide a sane
> LibVLC logging API. But that depends on LibVLC initialization changes, which I
> might not be allowed to push until the 1.3.0 merge window opens.
> > - If it's solution 1 : this new object could be in
> > modules/misc/mesgstderr.c ?
> Logging is needed before the plug-in subsystem is ready, so everything will
> need to be merged in the core.
> > - if it's solution 2 : - Can I try to merge TextPrint and PrintMsg ?
> Ultimately, they should be merged, but I am afraid this is not possible until
> we have one time initialization in place.
> > - Can I call vlc_Subscribe twice in
> > logger.c:Open ?
> You could but I suspect it will make things more complicated rather than
> Rémi Denis-Courmont
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vlc-devel