<div dir="ltr">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.<div>

<br></div><div>This object would subscribe to messages queue in libvlc_InternalInit and unsubscribe in libvlc_InternalDestroy.</div><div><br></div><div>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.  </div>

<meta http-equiv="content-type" content="text/html; charset=utf-8"><meta http-equiv="content-type" content="text/html; charset=utf-8"><div><br></div><div>Would you be interested by this stuff that I could do ? </div><div>

<br><br><div class="gmail_quote">2011/9/7 Rémi Denis-Courmont <span dir="ltr"><<a href="mailto:remi@remlab.net">remi@remlab.net</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Le mercredi 7 septembre 2011 01:17:35 ludovic, vous avez écrit :<br>
<div class="im">> Ok, I understand that I have to use the "message subscribers" mecanism<br>
> which calls "msg_callback_t  func".<br>
> Sorry to disturb you again with some (stupid) questions about your answer,<br>
> but I'd like to avoid a new mistake...<br>
> - Do you mean that I should integrate PrintMsg in a new object (solution 1)<br>
> or in the logger object (solution 2) ?<br>
<br>
</div>I don't mean you should do anything particular. I just mean your patch is<br>
going against a change that I did on purpose.<br>
<br>
Ultimately, my goal is to unify all loggers in the core, and provide a sane<br>
LibVLC logging API. But that depends on LibVLC initialization changes, which I<br>
might not be allowed to push until the 1.3.0 merge window opens.<br>
<div class="im"><br>
> - If it's solution 1 : this new object could be in<br>
> modules/misc/mesgstderr.c ?<br>
<br>
</div>Logging is needed before the plug-in subsystem is ready, so everything will<br>
need to be merged in the core.<br>
<div class="im"><br>
> - if it's solution 2 : - Can I try to merge TextPrint and PrintMsg ?<br>
<br>
</div>Ultimately, they should be merged, but I am afraid this is not possible until<br>
we have one time initialization in place.<br>
<div class="im"><br>
>                            - Can I call vlc_Subscribe twice in<br>
> logger.c:Open ?<br>
<br>
</div>You could but I suspect it will make things more complicated rather than<br>
simpler.<br>
<font color="#888888"><br>
--<br>
Rémi Denis-Courmont<br>
<a href="http://www.remlab.net/" target="_blank">http://www.remlab.net/</a><br>
<a href="http://fi.linkedin.com/in/remidenis" target="_blank">http://fi.linkedin.com/in/remidenis</a><br>
_______________________________________________<br>
vlc-devel mailing list<br>
To unsubscribe or modify your subscription options:<br>
<a href="http://mailman.videolan.org/listinfo/vlc-devel" target="_blank">http://mailman.videolan.org/listinfo/vlc-devel</a><br>
<br>
</font></blockquote></div><br></div></div>