]> git.sesse.net Git - vlc/commitdiff
macosx: constify char* parameters for setVideoFilter*
authorDavid Fuhrmann <dfuhrmann@videolan.org>
Sun, 6 Jul 2014 16:39:57 +0000 (18:39 +0200)
committerDavid Fuhrmann <dfuhrmann@videolan.org>
Sun, 6 Jul 2014 16:45:33 +0000 (18:45 +0200)
modules/gui/macosx/CoreInteraction.h
modules/gui/macosx/CoreInteraction.m
modules/gui/macosx/VideoEffects.m

index 421d9feccadcfb2731227914366407935d38ef72..d2abdb56b9d7e62fceac6d054af50fe30750f11e 100644 (file)
@@ -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
index 7928a84c42c53e705ecbcec8f863647acc3e7649..1fc4d6efddc2baed1ac32c9599bcb63f1595bc22 100644 (file)
@@ -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;
index f124eae9d9e91b355c23119d18a21283ad984c7e..707b221110e9a779fa78e487bc37b353337e1e53 100644 (file)
@@ -585,7 +585,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]);
@@ -595,7 +595,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]);
@@ -605,7 +605,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 */
@@ -1138,14 +1138,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]];
 }
@@ -1166,7 +1166,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 {