Commit 52babf6e authored by David Fuhrmann's avatar David Fuhrmann

macosx: video effects: fix for applying profile settings with different filter strings (refs #9010)

parent 181ea34b
...@@ -763,34 +763,35 @@ static VLCVideoEffects *_o_sharedInstance = nil; ...@@ -763,34 +763,35 @@ static VLCVideoEffects *_o_sharedInstance = nil;
NSString *tempString = [NSString stringWithFormat:@"%s", vlc_b64_decode([[items objectAtIndex:0] UTF8String])]; NSString *tempString = [NSString stringWithFormat:@"%s", vlc_b64_decode([[items objectAtIndex:0] UTF8String])];
NSArray *tempArray; NSArray *tempArray;
NSUInteger count; NSUInteger count;
/* enable the new filters */ /* enable the new filters */
config_PutPsz(p_intf, "video-filter", "");
if ([tempString length] > 0) { if ([tempString length] > 0) {
tempArray = [tempString componentsSeparatedByString:@":"]; tempArray = [tempString componentsSeparatedByString:@":"];
count = [tempArray count]; count = [tempArray count];
for (NSUInteger x = 0; x < count; x++) for (NSUInteger x = 0; x < count; x++)
[self setVideoFilter:(char *)[[tempArray objectAtIndex:x] UTF8String] on:YES]; [self setVideoFilter:(char *)[[tempArray objectAtIndex:x] UTF8String] on:YES];
} }
config_PutPsz(p_intf, "video-filter", [tempString UTF8String]);
tempString = [NSString stringWithFormat:@"%s", vlc_b64_decode([[items objectAtIndex:1] UTF8String])]; tempString = [NSString stringWithFormat:@"%s", vlc_b64_decode([[items objectAtIndex:1] UTF8String])];
/* enable another round of new filters */ /* enable another round of new filters */
config_PutPsz(p_intf,"sub-source", "");
if ([tempString length] > 0) { if ([tempString length] > 0) {
tempArray = [tempString componentsSeparatedByString:@":"]; tempArray = [tempString componentsSeparatedByString:@":"];
count = [tempArray count]; count = [tempArray count];
for (NSUInteger x = 0; x < count; x++) for (NSUInteger x = 0; x < count; x++)
[self setVideoFilter:(char *)[[tempArray objectAtIndex:x] UTF8String] on:YES]; [self setVideoFilter:(char *)[[tempArray objectAtIndex:x] UTF8String] on:YES];
} }
config_PutPsz(p_intf,"sub-source", [tempString UTF8String]);
tempString = [NSString stringWithFormat:@"%s", vlc_b64_decode([[items objectAtIndex:2] UTF8String])]; tempString = [NSString stringWithFormat:@"%s", vlc_b64_decode([[items objectAtIndex:2] UTF8String])];
/* enable another round of new filters */ /* enable another round of new filters */
config_PutPsz(p_intf,"video-splitter", "");
if ([tempString length] > 0) { if ([tempString length] > 0) {
tempArray = [tempString componentsSeparatedByString:@":"]; tempArray = [tempString componentsSeparatedByString:@":"];
count = [tempArray count]; count = [tempArray count];
for (NSUInteger x = 0; x < count; x++) for (NSUInteger x = 0; x < count; x++)
[self setVideoFilter:(char *)[[tempArray objectAtIndex:x] UTF8String] on:YES]; [self setVideoFilter:(char *)[[tempArray objectAtIndex:x] UTF8String] on:YES];
} }
config_PutPsz(p_intf,"video-splitter", [tempString UTF8String]);
/* try to set filter values on-the-fly and store them appropriately */ /* try to set filter values on-the-fly and store them appropriately */
[self setVideoFilterProperty:"hue" forFilter:"adjust" integer:[[items objectAtIndex:3] intValue]]; [self setVideoFilterProperty:"hue" forFilter:"adjust" integer:[[items objectAtIndex:3] intValue]];
......
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