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

Thomas Guillem thomas at gllm.fr
Thu Jul 16 07:53:16 CEST 2020



On Wed, Jul 15, 2020, at 21:55, Rémi Denis-Courmont wrote:
> 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.

The thumbnailer exists too since vlc 4.0. 

> 
> 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)

I prefer to do like the player : require a libvlc instance. I don't want to end in a case where a media is parsed with a default libvlc, but played with a different one with different options. 

> 
> -- 
> 雷米‧德尼-库尔蒙
> http://www.remlab.net/
> 
> 
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list