[vlc-devel] [PATCH 3.x 0/2] RFC: libvlc_media_player: add async stop
Thomas Guillem
thomas at gllm.fr
Mon Oct 19 16:07:35 CEST 2020
Hello,
I don't think the current libvlc_media_player_stop() is usable since it
is blocking. VLC ports usually call it from background threads, but it
lead to deadlocks when the mainthread is calling libvlc_media_player getter
functions.
This set of patch adds support for asynchronous stop() in VLC 3.x. It
will be needed for the iOS VLC port. It can be applied in vlc-ios patch
set directly but I do think this set could be helpful for LibVLC 3.x
users.
I don't know if it's OK to add 2 APIs for a hotfix release. Maybe call
it VLC 3.1 ?
PS: vlc-android has the same problem but it was fixed on the application
(calling stop from app background thread, and creating a new
media_player for each new medias).
Best,
Thomas Guillem (2):
lib: media_player: add stop/set_media async support
WIP: lib: media_list_player: change media asynchronously
include/vlc/libvlc_media_player.h | 28 ++++-
lib/libvlc.sym | 2 +
lib/media_list_player.c | 4 +-
lib/media_player.c | 182 +++++++++++++++++++++++++-----
lib/media_player_internal.h | 16 ++-
test/libvlc/media_player.c | 48 ++++++++
6 files changed, 249 insertions(+), 31 deletions(-)
--
2.28.0
More information about the vlc-devel
mailing list