Commit 8f7e58d2 authored by David Fuhrmann's avatar David Fuhrmann

macosx: constify char* parameters for setVideoFilter*

(cherry picked from commit 3b20c97bb99345ac77614d5690cb22728b5fc7fd)
Signed-off-by: default avatarDavid Fuhrmann <dfuhrmann@videolan.org>
parent af7ffe10
......@@ -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
......@@ -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;
......
......@@ -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 {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment