[vlc-devel] [PATCH] qt: force signals from the player callbacks to be emmited from a queued connection.
Alexandre Janniaux
ajanni at videolabs.io
Mon Oct 21 23:33:45 CEST 2019
Hi,
Just signaling a minor typo (emmit vs emit) in the commit title, + the trailing
dot.
In the commit message, potentially missing caps for callback, and typo on
commes (vs comes).
The patch itself looks good to me.
Regards,
--
Alexandre Janniaux
Videolabs
On Mon, Oct 21, 2019 at 05:44:20PM +0200, Pierre Lamot wrote:
> callbacks are called with the player locked, if the callback commes from Qt thread,
> the signal emitted by Qt may be handled within the same thread directly and ask for
> the player lock again.
> ---
> modules/gui/qt/components/player_controller.cpp | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/modules/gui/qt/components/player_controller.cpp b/modules/gui/qt/components/player_controller.cpp
> index 3bfafcc338..1b3b0d820a 100644
> --- a/modules/gui/qt/components/player_controller.cpp
> +++ b/modules/gui/qt/components/player_controller.cpp
> @@ -239,7 +239,9 @@ static void on_player_current_media_changed(vlc_player_t *, input_item_t *new_m
>
> if (!new_media)
> {
> - emit that->q_func()->inputChanged(false);
> + that->callAsync([that] () {
> + emit that->q_func()->inputChanged(false);
> + });
> return;
> }
>
> @@ -721,7 +723,9 @@ static void on_player_media_epg_changed(vlc_player_t *, input_item_t *, void *da
> {
> PlayerControllerPrivate* that = static_cast<PlayerControllerPrivate*>(data);
> msg_Dbg( that->p_intf, "on_player_item_epg_changed");
> - emit that->q_func()->epgChanged();
> + that->callAsync([that] () {
> + emit that->q_func()->epgChanged();
> + });
> }
>
> static void on_player_subitems_changed(vlc_player_t *, input_item_t *, input_item_node_t *, void *data)
> --
> 2.17.1
>
> _______________________________________________
> 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