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

Thomas Guillem thomas at gllm.fr
Wed Jul 15 20:24:12 CEST 2020



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.
> 
> Creating an instance is very cheap - if there is already at least one in the 
> process so option 2 is actually very viable for simple case like saving 
> metadata.
> 
> It's also highly desirable where a consistent result is expected/assumed such 
> as preparsing, whose result should depend on media options but *not* on the 
> LibVLC instance.
> 
> -- 
> レミ・デニ-クールモン
> 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