[vlc-commits] macosx: save/retrieve video filters to/from the playlist
Victorien Le Couviour--Tuffet
git at videolan.org
Thu Jul 13 11:23:34 CEST 2017
vlc | branch: master | Victorien Le Couviour--Tuffet <victorien.lecouviour.tuffet at gmail.com> | Fri Jun 16 11:19:55 2017 +0200| [441bac0aced01ad7822aff9ebc4ee14f7a4bec5d] | committer: Jean-Baptiste Kempf
macosx: save/retrieve video filters to/from the playlist
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=441bac0aced01ad7822aff9ebc4ee14f7a4bec5d
---
modules/gui/macosx/VLCCoreInteraction.m | 13 +++++--------
modules/gui/macosx/VLCVideoEffectsWindowController.m | 7 ++++---
2 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/modules/gui/macosx/VLCCoreInteraction.m b/modules/gui/macosx/VLCCoreInteraction.m
index 912ff8bc25..abda75c6fd 100644
--- a/modules/gui/macosx/VLCCoreInteraction.m
+++ b/modules/gui/macosx/VLCCoreInteraction.m
@@ -735,6 +735,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
intf_thread_t *p_intf = getIntf();
if (!p_intf)
return;
+ playlist_t *p_playlist = pl_Get(p_intf);
char *psz_string, *psz_parser;
const char *psz_filter_type = [self getFilterType:psz_name];
@@ -745,8 +746,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
msg_Dbg(p_intf, "will set filter '%s'", psz_name);
-
- psz_string = config_GetPsz(p_intf, psz_filter_type);
+ psz_string = var_InheritString(p_playlist, psz_filter_type);
if (b_on) {
if (psz_string == NULL) {
@@ -777,13 +777,10 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
return;
}
}
- config_PutPsz(p_intf, psz_filter_type, psz_string);
+ var_SetString(p_playlist, psz_filter_type, psz_string);
- /* Try to set on the fly */
- if (!strcmp(psz_filter_type, "video-splitter")) {
- playlist_t *p_playlist = pl_Get(p_intf);
- var_SetString(p_playlist, psz_filter_type, psz_string);
- } else {
+ /* Try to set non splitter filters on the fly */
+ if (strcmp(psz_filter_type, "video-splitter")) {
vout_thread_t *p_vout = getVout();
if (p_vout) {
var_SetString(p_vout, psz_filter_type, psz_string);
diff --git a/modules/gui/macosx/VLCVideoEffectsWindowController.m b/modules/gui/macosx/VLCVideoEffectsWindowController.m
index cb347b63f8..19ed86fa89 100644
--- a/modules/gui/macosx/VLCVideoEffectsWindowController.m
+++ b/modules/gui/macosx/VLCVideoEffectsWindowController.m
@@ -253,13 +253,14 @@
- (void)resetValues
{
intf_thread_t *p_intf = getIntf();
+ playlist_t *p_playlist = pl_Get(p_intf);
NSString *tmpString;
char *tmpChar;
BOOL b_state;
/* do we have any filter enabled? if yes, show it. */
char * psz_vfilters;
- psz_vfilters = config_GetPsz(p_intf, "video-filter");
+ psz_vfilters = var_InheritString(p_playlist, "video-filter");
if (psz_vfilters) {
[_adjustCheckbox setState: (NSInteger)strstr(psz_vfilters, "adjust")];
[_sharpenCheckbox setState: (NSInteger)strstr(psz_vfilters, "sharpen")];
@@ -305,7 +306,7 @@
[_anaglyphCheckbox setState: NSOffState];
}
- psz_vfilters = config_GetPsz(p_intf, "sub-source");
+ psz_vfilters = var_InheritString(p_playlist, "sub-source");
if (psz_vfilters) {
[_addTextCheckbox setState: (NSInteger)strstr(psz_vfilters, "marq")];
[_addLogoCheckbox setState: (NSInteger)strstr(psz_vfilters, "logo")];
@@ -315,7 +316,7 @@
[_addLogoCheckbox setState: NSOffState];
}
- psz_vfilters = config_GetPsz(p_intf, "video-splitter");
+ psz_vfilters = var_InheritString(p_playlist, "video-splitter");
if (psz_vfilters) {
[_cloneCheckbox setState: (NSInteger)strstr(psz_vfilters, "clone")];
[_wallCheckbox setState: (NSInteger)strstr(psz_vfilters, "wall")];
More information about the vlc-commits
mailing list