[vlc-devel] [PATCH 08/23] macosx: duplicate video filters options in the playlist
Victorien Le Couviour--Tuffet
victorien.lecouviour.tuffet at gmail.com
Thu Jun 29 14:24:15 CEST 2017
---
modules/gui/macosx/VLCCoreInteraction.m | 13 +++++++++++++
modules/gui/macosx/VLCVideoEffectsWindowController.m | 9 ++++-----
2 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/modules/gui/macosx/VLCCoreInteraction.m b/modules/gui/macosx/VLCCoreInteraction.m
index 222066ac4a..9d1b4a653a 100644
--- a/modules/gui/macosx/VLCCoreInteraction.m
+++ b/modules/gui/macosx/VLCCoreInteraction.m
@@ -798,6 +798,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
{
NSArray<NSValue *> *vouts = getVouts();
intf_thread_t *p_intf = getIntf();
+ playlist_t *p_playlist = pl_Get(p_intf);
if (!p_intf)
return;
int i_type;
@@ -818,13 +819,25 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
i_type &= VLC_VAR_CLASS;
if (i_type == VLC_VAR_BOOL)
+ {
+ var_SetBool(p_playlist, psz_property, value.b_bool);
config_PutInt(p_intf, psz_property, (int64_t)value.b_bool);
+ }
else if (i_type == VLC_VAR_INTEGER)
+ {
+ var_SetInteger(p_playlist, psz_property, value.i_int);
config_PutInt(p_intf, psz_property, value.i_int);
+ }
else if (i_type == VLC_VAR_FLOAT)
+ {
config_PutFloat(p_intf, psz_property, value.f_float);
+ var_SetFloat(p_playlist, psz_property, value.f_float);
+ }
else if (i_type == VLC_VAR_STRING)
+ {
config_PutPsz(p_intf, psz_property, EnsureUTF8(value.psz_string));
+ var_SetString(p_playlist, psz_property, EnsureUTF8(value.psz_string));
+ }
else
{
msg_Err(p_intf,
diff --git a/modules/gui/macosx/VLCVideoEffectsWindowController.m b/modules/gui/macosx/VLCVideoEffectsWindowController.m
index b73569cd17..88674fcc3d 100644
--- a/modules/gui/macosx/VLCVideoEffectsWindowController.m
+++ b/modules/gui/macosx/VLCVideoEffectsWindowController.m
@@ -273,6 +273,7 @@
- (void)setWidgetValue: (id)widget forOption: (char *)psz_option enabled: (bool)b_state
{
intf_thread_t *p_intf = getIntf();
+ playlist_t *p_playlist = pl_Get(p_intf);
vlc_value_t val;
int i_type = config_GetType(p_intf, psz_option) & VLC_VAR_CLASS;
@@ -280,18 +281,16 @@
{
case VLC_VAR_BOOL:
case VLC_VAR_INTEGER:
- val.i_int = config_GetInt(p_intf, psz_option);
- break;
case VLC_VAR_FLOAT:
- val.f_float = config_GetFloat(p_intf, psz_option);
- break;
case VLC_VAR_STRING:
- val.psz_string = config_GetPsz(p_intf, psz_option);
break;
default:
msg_Err(p_intf, "%s variable is of an unsupported type (%d)", psz_option, i_type);
return;
}
+ if (var_Create(p_playlist, psz_option, i_type | VLC_VAR_DOINHERIT) ||
+ var_GetChecked(p_playlist, psz_option, i_type, &val))
+ return;
if (i_type == VLC_VAR_BOOL || i_type == VLC_VAR_INTEGER)
{
--
2.13.1
More information about the vlc-devel
mailing list