[vlc-devel] commit: libvlc: Export libvlc_media_player_get_input_thread(). (Pierre d' Herbemont )

Rafaël Carré rafael.carre at gmail.com
Fri Jan 29 14:33:29 CET 2010


On Fri, 29 Jan 2010 14:24:25 +0100
"Pierre d'Herbemont" <pdherbemont at free.fr> wrote:

> On Fri, Jan 29, 2010 at 2:18 PM, Rafaël Carré
> <rafael.carre at gmail.com> wrote:
> > On Fri, 29 Jan 2010 13:42:15 +0100
> > Rémi Denis-Courmont <remi at remlab.net> wrote:
> >
> >>
> >> On Fri, 29 Jan 2010 13:17:04 +0100, "Pierre d'Herbemont"
> >> <pdherbemont at free.fr> wrote:
> >> > On Fri, Jan 29, 2010 at 1:00 PM, Rafaël Carré
> >> > <rafael.carre at gmail.com> wrote:
> >> >> I hope this isn't Lunettes/Glasses
> >> >
> >> > Why would you not hope so?
> >>
> >> Because it's rather scary if one of the main author of LibVLC and a
> >> committer to the VLC repository won't fix the LibVLC API instead of
> >> adding those hacks.
> >
> > Right, if you need the input thread in libvlc, then it defeats the
> > purpose of privatizing it.
> 
> We need the input thread when using libvlccore. Oh, well, no need to
> nit pick.

$ head my_hack.c
#include "media_player_internal.h"

static input_thread_t
*libvlc_media_player_get_input_thread( libvlc_media_player_t *player ) {

    vlc_mutex_lock(&player->lock);

    input_thread_t *p_input_thread = player->p_input_thread;
    if(p_input_thread)
        vlc_object_hold(p_input_thread);

    vlc_mutex_unlock(&player->lock);

    return p_input_thread;
}

Here's my solution

-- 
Rafaël Carré
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20100129/97825dba/attachment.sig>


More information about the vlc-devel mailing list