lib: media_player: add stop/set_media async support
This commit adds 2 new function into 3.0.12: - libvlc_media_player_stop_async() - libvlc_media_player_set_media_async() These 2 new functions won't wait for the input_thread termination. This will allow LibVLC users to set media and stop them from the mainthread without blocking. In that case (*_async() function is called), the input thread will be terminated from a background thread: the worker_thread. In case a new media is played, it will be opened from this thread once the previous media is closed. libvlc_media_player_release() will wait for this destructor thread termination. That is why, it is advised to release the media_player at the end of the program (when UI is destroyed). This functionality is backport of the async stop functionality of the new VLC 4.0 player.
Showing
- include/vlc/libvlc_media_player.h 27 additions, 1 deletioninclude/vlc/libvlc_media_player.h
- lib/libvlc.sym 2 additions, 0 deletionslib/libvlc.sym
- lib/media_list_player.c 2 additions, 2 deletionslib/media_list_player.c
- lib/media_player.c 178 additions, 51 deletionslib/media_player.c
- lib/media_player_internal.h 9 additions, 0 deletionslib/media_player_internal.h
- test/libvlc/media_player.c 48 additions, 0 deletionstest/libvlc/media_player.c
Loading
Please register or sign in to comment