[vlc-devel] [PATCH 1/2] lib: media_player: keep player libvlc instance
Rémi Denis-Courmont
remi at remlab.net
Wed Jul 15 18:26:57 CEST 2020
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)
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/
More information about the vlc-devel
mailing list