[vlc-devel] [PATCH] Merge PrintMsg and PrintColorMsg to avoid duplicated code
Rémi Denis-Courmont
remi at remlab.net
Wed Sep 7 18:31:11 CEST 2011
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
simpler.
--
Rémi Denis-Courmont
http://www.remlab.net/
http://fi.linkedin.com/in/remidenis
More information about the vlc-devel
mailing list