[vlc-commits] macosx: constify char* parameters for setVideoFilter*

David Fuhrmann git at videolan.org
Tue Aug 5 19:02:09 CEST 2014


vlc/vlc-2.2 | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Sun Jul  6 18:39:57 2014 +0200| [8f7e58d22b1a36cf76eebf090e26f6a32f91c6d9] | committer: David Fuhrmann

macosx: constify char* parameters for setVideoFilter*

(cherry picked from commit 3b20c97bb99345ac77614d5690cb22728b5fc7fd)
Signed-off-by: David Fuhrmann <dfuhrmann at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=8f7e58d22b1a36cf76eebf090e26f6a32f91c6d9
---

 modules/gui/macosx/CoreInteraction.h |   10 +++++-----
 modules/gui/macosx/CoreInteraction.m |   14 +++++++-------
 modules/gui/macosx/VideoEffects.m    |   12 ++++++------
 3 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/modules/gui/macosx/CoreInteraction.h b/modules/gui/macosx/CoreInteraction.h
index 421d9fe..d2abdb5 100644
--- a/modules/gui/macosx/CoreInteraction.h
+++ b/modules/gui/macosx/CoreInteraction.h
@@ -80,9 +80,9 @@
 
 - (BOOL)fixPreferences;
 
-- (void)setVideoFilter: (char *)psz_name on:(BOOL)b_on;
-- (void)setVideoFilterProperty: (char *)psz_name forFilter: (char*)psz_filter integer: (int)i_value;
-- (void)setVideoFilterProperty: (char *)psz_name forFilter: (char*)psz_filter float: (float)f_value;
-- (void)setVideoFilterProperty: (char *)psz_name forFilter: (char *)psz_filter string: (const char *)psz_value;
-- (void)setVideoFilterProperty: (char *)psz_name forFilter: (char *)psz_filter boolean: (BOOL)b_value;
+- (void)setVideoFilter: (const char *)psz_name on:(BOOL)b_on;
+- (void)setVideoFilterProperty: (const char *)psz_name forFilter: (const char *)psz_filter integer: (int)i_value;
+- (void)setVideoFilterProperty: (const char *)psz_name forFilter: (const char *)psz_filter float: (float)f_value;
+- (void)setVideoFilterProperty: (const char *)psz_name forFilter: (const char *)psz_filter string: (const char *)psz_value;
+- (void)setVideoFilterProperty: (const char *)psz_name forFilter: (const char *)psz_filter boolean: (BOOL)b_value;
 @end
diff --git a/modules/gui/macosx/CoreInteraction.m b/modules/gui/macosx/CoreInteraction.m
index 7928a84..1fc4d6e 100644
--- a/modules/gui/macosx/CoreInteraction.m
+++ b/modules/gui/macosx/CoreInteraction.m
@@ -680,7 +680,7 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
 
 #pragma mark - video filter handling
 
-- (const char *)getFilterType:(char *)psz_name
+- (const char *)getFilterType:(const char *)psz_name
 {
     module_t *p_obj = module_find(psz_name);
     if (!p_obj) {
@@ -701,7 +701,7 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
     }
 }
 
-- (void)setVideoFilter: (char *)psz_name on:(BOOL)b_on
+- (void)setVideoFilter: (const char *)psz_name on:(BOOL)b_on
 {
     intf_thread_t *p_intf = VLCIntf;
     if (!p_intf)
@@ -765,7 +765,7 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
     free(psz_string);
 }
 
-- (void)restartFilterIfNeeded: (char *)psz_filter option: (char *)psz_name
+- (void)restartFilterIfNeeded: (const char *)psz_filter option: (const char *)psz_name
 {
     vout_thread_t *p_vout = getVout();
     intf_thread_t *p_intf = VLCIntf;
@@ -819,7 +819,7 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
     }
 }
 
-- (void)setVideoFilterProperty: (char *)psz_name forFilter: (char *)psz_filter integer: (int)i_value
+- (void)setVideoFilterProperty: (const char *)psz_name forFilter: (const char *)psz_filter integer: (int)i_value
 {
     vout_thread_t *p_vout = getVout();
     vlc_object_t *p_filter;
@@ -845,7 +845,7 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
     }
 }
 
-- (void)setVideoFilterProperty: (char *)psz_name forFilter: (char *)psz_filter float: (float)f_value
+- (void)setVideoFilterProperty: (const char *)psz_name forFilter: (const char *)psz_filter float: (float)f_value
 {
     vout_thread_t *p_vout = getVout();
     vlc_object_t *p_filter;
@@ -871,7 +871,7 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
     }
 }
 
-- (void)setVideoFilterProperty: (char *)psz_name forFilter: (char *)psz_filter string: (const char *)psz_value
+- (void)setVideoFilterProperty: (const char *)psz_name forFilter: (const char *)psz_filter string: (const char *)psz_value
 {
     char *psz_new_value = strdup(psz_value);
     vout_thread_t *p_vout = getVout();
@@ -900,7 +900,7 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
     free(psz_new_value);
 }
 
-- (void)setVideoFilterProperty: (char *)psz_name forFilter: (char *)psz_filter boolean: (BOOL)b_value
+- (void)setVideoFilterProperty: (const char *)psz_name forFilter: (const char *)psz_filter boolean: (BOOL)b_value
 {
     vout_thread_t *p_vout = getVout();
     vlc_object_t *p_filter;
diff --git a/modules/gui/macosx/VideoEffects.m b/modules/gui/macosx/VideoEffects.m
index cb59787..674c5ee 100644
--- a/modules/gui/macosx/VideoEffects.m
+++ b/modules/gui/macosx/VideoEffects.m
@@ -618,7 +618,7 @@ static VLCVideoEffects *_o_sharedInstance = nil;
         tempArray = [tempString componentsSeparatedByString:@":"];
         count = [tempArray count];
         for (NSUInteger x = 0; x < count; x++)
-            [vci_si setVideoFilter:(char *)[[tempArray objectAtIndex:x] UTF8String] on:YES];
+            [vci_si setVideoFilter:[[tempArray objectAtIndex:x] UTF8String] on:YES];
     }
 
     tempString = B64DecNSStr([items objectAtIndex:1]);
@@ -628,7 +628,7 @@ static VLCVideoEffects *_o_sharedInstance = nil;
         tempArray = [tempString componentsSeparatedByString:@":"];
         count = [tempArray count];
         for (NSUInteger x = 0; x < count; x++)
-            [vci_si setVideoFilter:(char *)[[tempArray objectAtIndex:x] UTF8String] on:YES];
+            [vci_si setVideoFilter:[[tempArray objectAtIndex:x] UTF8String] on:YES];
     }
 
     tempString = B64DecNSStr([items objectAtIndex:2]);
@@ -638,7 +638,7 @@ static VLCVideoEffects *_o_sharedInstance = nil;
         tempArray = [tempString componentsSeparatedByString:@":"];
         count = [tempArray count];
         for (NSUInteger x = 0; x < count; x++)
-            [vci_si setVideoFilter:(char *)[[tempArray objectAtIndex:x] UTF8String] on:YES];
+            [vci_si setVideoFilter:[[tempArray objectAtIndex:x] UTF8String] on:YES];
     }
 
     /* try to set filter values on-the-fly and store them appropriately */
@@ -1175,14 +1175,14 @@ static VLCVideoEffects *_o_sharedInstance = nil;
     [o_addtext_text_lbl setEnabled: b_state];
     [o_addtext_text_fld setEnabled: b_state];
     [vci_si setVideoFilter: "marq" on: b_state];
-    [vci_si setVideoFilterProperty: "marq-marquee" forFilter: "marq" string: (char *)[[o_addtext_text_fld stringValue] UTF8String]];
+    [vci_si setVideoFilterProperty: "marq-marquee" forFilter: "marq" string: [[o_addtext_text_fld stringValue] UTF8String]];
     [vci_si setVideoFilterProperty: "marq-position" forFilter: "marq" integer: [[o_addtext_pos_pop selectedItem] tag]];
 }
 
 - (IBAction)addTextModifierChanged:(id)sender
 {
     if (sender == o_addtext_text_fld)
-        [[VLCCoreInteraction sharedInstance] setVideoFilterProperty: "marq-marquee" forFilter: "marq" string: (char *)[[o_addtext_text_fld stringValue] UTF8String]];
+        [[VLCCoreInteraction sharedInstance] setVideoFilterProperty: "marq-marquee" forFilter: "marq" string:[[o_addtext_text_fld stringValue] UTF8String]];
     else
         [[VLCCoreInteraction sharedInstance] setVideoFilterProperty: "marq-position" forFilter: "marq" integer: [[o_addtext_pos_pop selectedItem] tag]];
 }
@@ -1203,7 +1203,7 @@ static VLCVideoEffects *_o_sharedInstance = nil;
 - (IBAction)addLogoModifierChanged:(id)sender
 {
     if (sender == o_addlogo_logo_fld)
-        [[VLCCoreInteraction sharedInstance] setVideoFilterProperty: "logo-file" forFilter: "logo" string: (char *)[[o_addlogo_logo_fld stringValue] UTF8String]];
+        [[VLCCoreInteraction sharedInstance] setVideoFilterProperty: "logo-file" forFilter: "logo" string: [[o_addlogo_logo_fld stringValue] UTF8String]];
     else if (sender == o_addlogo_pos_pop)
         [[VLCCoreInteraction sharedInstance] setVideoFilterProperty: "logo-position" forFilter: "logo" integer: [[o_addlogo_pos_pop selectedItem] tag]];
     else {



More information about the vlc-commits mailing list