[vlc-devel] [PATCH] GUI-Qt: update components/extended_panels.cpp
Thomas Guillem
thomas at gllm.fr
Tue Apr 25 13:07:44 CEST 2017
On Tue, Apr 25, 2017, at 15:03, Victorien Le Couviour--Tuffet wrote:
> Retrieve already loaded audio and video filters at window construction.
> This fixes the bug occuring when enabling or disabling a filter from Qt:
> it was rebuilding a filter chain adding or removing the concerned filter,
> but as it didn't retrieved the ones that were already there (enabled
> through
> command line), there were just thrown away.
> ---
> modules/gui/qt/components/extended_panels.cpp | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> diff --git a/modules/gui/qt/components/extended_panels.cpp
> b/modules/gui/qt/components/extended_panels.cpp
> index 39d88b90d3..e16db16c7b 100644
> --- a/modules/gui/qt/components/extended_panels.cpp
> +++ b/modules/gui/qt/components/extended_panels.cpp
> @@ -99,6 +99,23 @@ static inline void setup_vfilter( intf_thread_t
> *p_intf, const char* psz_name, Q
> setWidgetValue( ui.widget ); \
> CONNECT( ui.widget, signal, this, updateFilterOptions() );
>
> +static inline void
> +retrieve_filters(intf_thread_t *intf,
> + vlc_object_t *obj, char *psz_filter_type)
> +{
> + char *filters;
> +
> + if (obj)
> + {
> + if ((filters = var_GetString(obj, psz_filter_type)))
> + {
> + config_PutPsz(intf, psz_filter_type, filters);
Filters set from command line should not be saved into the config file.
> + free(filters);
> + }
> + vlc_object_release(obj);
> + }
> +}
> +
> ExtVideo::ExtVideo( intf_thread_t *_p_intf, QTabWidget *_parent ) :
> QObject( _parent ), p_intf( _p_intf )
> {
> @@ -225,6 +242,9 @@ ExtVideo::ExtVideo( intf_thread_t *_p_intf,
> QTabWidget *_parent ) :
> ui.cropBotPx, setDisabled( bool ) );
> CONNECT( ui.leftRightCropSync, toggled( bool ),
> ui.cropRightPx, setDisabled( bool ) );
> +
> + retrieve_filters(p_intf, (vlc_object_t *)THEMIM->getAout(),
> "audio-filter");
> + retrieve_filters(p_intf, (vlc_object_t *)THEMIM->getVout(),
> "video-filter");
> }
>
> void ExtVideo::cropChange()
> --
> 2.12.0
>
> _______________________________________________
> 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