[vlc-devel] [PATCH 1/2] lib: media_player: keep player libvlc instance

Rémi Denis-Courmont remi at remlab.net
Wed Jul 15 21:55:46 CEST 2020


Le keskiviikkona 15. heinäkuuta 2020, 21.24.12 EEST Thomas Guillem a écrit :
> On Wed, Jul 15, 2020, at 18:26, Rémi Denis-Courmont wrote:
> > Le torstaina 9. heinäkuuta 2020, 18.21.50 EEST Alexandre Janniaux a écrit 
:
> > > The media_player instance retains and releases the libvlc instance it's
> > > created from. When using a different libvlc instance for media_player
> > > and media,
> > 
> > Frankly, it makes zero sense for a media to be tied to an instance in the
> > first place. input_item_t is not tied to an instance. I think you're
> > looking at it from the wrong angle.
> > 
> > Of course, an instance is necessary for certain operation on the media:
> > playing, parsing, etc. In all those case, we should do one of the
> > following: 1) implicitly use the instance from the actor object (as media
> > player does)
> I vote for 1/, we should create a libvlc_parser API. That way we can remove
> the instance from the media.
> > 2) create an instance automatically,
> > 3) take an explicit instance pointer as parameter.

I tend to agree that (1) is better than either (2) or (3). There should be 
separate player, meta reader, thumbnailer and meta writer objects. Only the 
first one exists as yet.

But I don't know if the new functions should create their own private VLC 
instance, require a supplied VLC instance, or leave the choice of either (i.e. 
create an instance if the instance parameter is NULL).

-- 
雷米‧德尼-库尔蒙
http://www.remlab.net/





More information about the vlc-devel mailing list