[vlc-devel] [PATCH 00/20] MR: Finishing vout life cycle work

Thomas Guillem thomas at gllm.fr
Tue May 7 11:55:45 CEST 2019


On Tue, May 7, 2019, at 11:51, Thomas Guillem wrote:
> 
> On Tue, May 7, 2019, at 11:45, Rémi Denis-Courmont wrote:
>> Hi,
>> 
>> To merge the locks, will you remove locking from within the UI event loop, or remove the event loop while holding the lock? How?
> 
> I'm testing it with https://code.videolan.org/tguillem/vlc/commit/1a96722d22fddcdde1f50a47a609e8229a332943
> 
> And indeed, it deadlocks.

I think the proper fix is https://code.videolan.org/tguillem/vlc/commit/4f3129cde81daa51c34861f7db509b250f03badf

vout_Request should not be called with the merged lock held.

Yes, I go back, Restoring a failing vout atomically is not needed anymore since the vout order is now preserved (the first vout created will always be the first and main one).


>> 
>> Le 6 mai 2019 19:15:48 GMT+03:00, Thomas Guillem <thomas at gllm.fr> a écrit :
>>> Here is the new version https://code.videolan.org/tguillem/vlc/tree/vout-life/6
>>> 
>>> This new MR fixes comments addressed in the previous MR.
>>> cf. https://code.videolan.org/tguillem/vlc/commit/1d4d6cbc54b87ac7cf4d40876f2c0a80e60f3c2c#note_34282
>>> 
>>> Here are the big changes:
>>> 
>>> - The commit "resource: reduce lock scope when starting the vout" has been removed, but the merge of the 2 input resource locks has been kept.
>>> 
>>>  - These 3 commits fix vout recycling:
>>> 
>>> "resource: add input_resource_StopFreeVout"
>>> "vout: add vout_Pause"
>>> "input: fix vout recycling"
>>> 
>>>  - This commit "resource: respect vout order" fixes vout ordering from input resources.
>>> 
>>> On Tue, Apr 30, 2019, at 10:41, Thomas Guillem wrote:
>>>> This set continue the previous work that was designed to always keep one valid
>>>> vout (the main one). Vout life cycle will behave like aout life cycle. This
>>>> will simplify variable/options handling.
>>>> 
>>>> The branch can be found on VideoLan gitlab:
>>>> https://code.videolan.org/tguillem/vlc/commits/vout-life/5
>>>> You can comment on it.
>>>> 
>>>> The first commit fixes a crash on macOS. Double vlc_mutex_destroy() doesn't seem
>>>> to be detected on Linux, even with Asan.
>>>> 
>>>> The second commit fixes asserts within the vout that can be triggered when vout
>>>> functions are called while it is stopped (window disable + no vout display
>>>> plugin).
>>>> 
>>>> The ressource commits change vout holding/creation from input resources. The
>>>> vout is now created from the first input_resource_Hold() call (if it was not
>>>> created by a decoder before).
>>>> 
>>>> The player commits remove previous hacks that was needed because the main vout
>>>> was not always created. Now that the player has always a valid vout, it can now
>>>> store variables/option on it.
>>>> 
>>>> The macOS/Qt commits change the way options (like filters) are passed to vouts.
>>>> Options are now saved on the main vout and not on the playlist/interface/player
>>>> anymore. This causes a change of behavior when there are several vouts (options
>>>> are now only applied to the main vout). If an user want options to be applied
>>>> on all future vouts, he can save the filter settings from the dialogs.  This
>>>> cause future var_Inherit to fetch the variable from the new saved config.
>>>> 
>>>> The last patch disable skins2 in order to be able to remove the legacy
>>>> playlist.
>>>> 
>>>> Thomas Guillem (20):
>>>>   vout: fix double mutex destroy
>>>>   vout: don't call vout_SizeWindow without a valid format
>>>>   resource: remove intermediate functions
>>>>   resource: merge both locks
>>>>   resource: reduce lock scope when starting the vout
>>>>   resource: add input_resource_HoldVoutLocked
>>>>   resource: always return a valid vout from HoldVout*()
>>>>   resource: don't allow to terminate vouts
>>>>   player: document vout lifecycle
>>>>   player: remove vlc_player_vout_SetFilter
>>>>   player: remove vlc_player_SetVideoSplitter
>>>>   player: change vout events
>>>>   hotkeys: re-indent after last commit
>>>>   test: player: test outputs
>>>>   qt: PlayerController: simplify getVout()
>>>>   qt: setup filter variables on the main vout
>>>>   macosx: setup effect variables on the main aout
>>>>   macosx: setup filter variables on the main vout
>>>>   gui: disable skins2
>>>>   remove vlc_playlist_legacy
>>>> 
>>>>  include/vlc_input.h                           |   5 -
>>>>  include/vlc_interface.h                       |   8 -
>>>>  include/vlc_player.h                          |  85 +-
>>>>  include/vlc_playlist_legacy.h                 | 429 ---------
>>>>  lib/media.c                                   |   1 -
>>>>  lib/playlist.c                                |   2 -
>>>>  modules/control/gestures.c                    |  20 +-
>>>>  modules/control/hotkeys.c                     |  42 +-
>>>>  modules/gui/Makefile.am                       |   2 +-
>>>>  .../coreinteraction/VLCVideoFilterHelper.m    |  76 +-
>>>>  .../panels/VLCAudioEffectsWindowController.m  | 225 ++---
>>>>  .../panels/VLCVideoEffectsWindowController.m  | 151 +--
>>>>  .../gui/macosx/playlist/VLCPlayerController.h |  14 -
>>>>  .../gui/macosx/playlist/VLCPlayerController.m |  26 +-
>>>>  modules/gui/qt/components/extended_panels.cpp |  43 +-
>>>>  .../gui/qt/components/player_controller.cpp   |  16 +-
>>>>  modules/gui/qt/dialogs/epg.cpp                |   1 -
>>>>  po/POTFILES.in                                |  10 -
>>>>  src/Makefile.am                               |  13 -
>>>>  src/check_symbols                             |   3 +-
>>>>  src/input/es_out.c                            |  26 -
>>>>  src/input/input.c                             |   1 -
>>>>  src/input/input_interface.h                   |   7 -
>>>>  src/input/meta.c                              |   1 -
>>>>  src/input/player.c                            |  73 +-
>>>>  src/input/resource.c                          | 198 ++--
>>>>  src/input/vlm.c                               |   1 -
>>>>  src/interface/interface.c                     |  36 -
>>>>  src/libvlc-module.c                           |   1 -
>>>>  src/libvlc.c                                  |   2 -
>>>>  src/libvlccore.sym                            |  44 -
>>>>  src/playlist_legacy/aout.c                    | 124 ---
>>>>  src/playlist_legacy/control.c                 | 147 ---
>>>>  src/playlist_legacy/engine.c                  | 501 ----------
>>>>  src/playlist_legacy/item.c                    | 883 ------------------
>>>>  src/playlist_legacy/loadsave.c                |  67 --
>>>>  src/playlist_legacy/playlist_internal.h       | 186 ----
>>>>  src/playlist_legacy/renderer.c                |  51 -
>>>>  src/playlist_legacy/search.c                  | 130 ---
>>>>  src/playlist_legacy/services_discovery.c      | 242 -----
>>>>  src/playlist_legacy/sort.c                    | 376 --------
>>>>  src/playlist_legacy/thread.c                  | 533 -----------
>>>>  src/playlist_legacy/tree.c                    | 427 ---------
>>>>  src/video_output/video_output.c               |   9 +-
>>>>  test/src/input/player.c                       |  71 +-
>>>>  45 files changed, 433 insertions(+), 4876 deletions(-)
>>>>  delete mode 100644 include/vlc_playlist_legacy.h
>>>>  delete mode 100644 src/playlist_legacy/aout.c
>>>>  delete mode 100644 src/playlist_legacy/control.c
>>>>  delete mode 100644 src/playlist_legacy/engine.c
>>>>  delete mode 100644 src/playlist_legacy/item.c
>>>>  delete mode 100644 src/playlist_legacy/loadsave.c
>>>>  delete mode 100644 src/playlist_legacy/playlist_internal.h
>>>>  delete mode 100644 src/playlist_legacy/renderer.c
>>>>  delete mode 100644 src/playlist_legacy/search.c
>>>>  delete mode 100644 src/playlist_legacy/services_discovery.c
>>>>  delete mode 100644 src/playlist_legacy/sort.c
>>>>  delete mode 100644 src/playlist_legacy/thread.c
>>>>  delete mode 100644 src/playlist_legacy/tree.c
>>>> 
>>>> -- 
>>>> 2.20.1vlc-devel mailing list
>>>> To unsubscribe or modify your subscription options:
>>>> https://mailman.videolan.org/listinfo/vlc-devel
>>> vlc-devel mailing list
>>> To unsubscribe or modify your subscription options:
>>> https://mailman.videolan.org/listinfo/vlc-devel
>> 
>> -- 
>> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté. 
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20190507/dc7541cf/attachment.html>


More information about the vlc-devel mailing list