Commit c16ab7a4 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: move video filter control code to the global libvlccore control object...

macosx: move video filter control code to the global libvlccore control object since it does not belong in a window controller
parent e6578e3d
/*****************************************************************************
* CoreInteraction.h: MacOS X interface module
*****************************************************************************
* Copyright (C) 2011-2012 Felix Paul Kühne
* Copyright (C) 2011-2014 Felix Paul Kühne
* $Id$
*
* Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
......@@ -79,4 +79,10 @@
- (void)toggleFullscreen;
- (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;
@end
/*****************************************************************************
* CoreInteraction.m: MacOS X interface module
*****************************************************************************
* Copyright (C) 2011-2013 Felix Paul Kühne
* Copyright (C) 2011-2014 Felix Paul Kühne
* $Id$
*
* Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
......@@ -34,6 +34,8 @@
#import <vlc/vlc.h>
#import <vlc_strings.h>
#import <vlc_url.h>
#import <vlc_modules.h>
#import <vlc_charset.h>
@implementation VLCCoreInteraction
......@@ -44,8 +46,7 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
return _o_sharedInstance ? _o_sharedInstance : [[self alloc] init];
}
#pragma mark -
#pragma mark Initialization
#pragma mark - Initialization
- (id)init
{
......@@ -65,8 +66,7 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
}
#pragma mark -
#pragma mark Playback Controls
#pragma mark - Playback Controls
- (void)playOrPause
{
......@@ -565,8 +565,7 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
vlc_object_release(p_input);
}
#pragma mark -
#pragma mark drag and drop support for VLCVoutView, VLCDragDropView and VLCThreePartDropView
#pragma mark - drag and drop support for VLCVoutView, VLCDragDropView and VLCThreePartDropView
- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
{
NSPasteboard *o_paste = [sender draggingPasteboard];
......@@ -614,8 +613,7 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
return NO;
}
#pragma mark -
#pragma mark video output stuff
#pragma mark - video output stuff
- (void)setAspectRatioIsLocked:(BOOL)b_value
{
......@@ -644,8 +642,7 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
}
}
#pragma mark -
#pragma mark uncommon stuff
#pragma mark - uncommon stuff
- (BOOL)fixPreferences
{
......@@ -681,4 +678,250 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
return b_needsRestart;
}
#pragma mark - video filter handling
- (const char *)getFilterType:(char *)psz_name
{
module_t *p_obj = module_find(psz_name);
if (!p_obj) {
return NULL;
}
if (module_provides(p_obj, "video splitter")) {
return "video-splitter";
} else if (module_provides(p_obj, "video filter2")) {
return "video-filter";
} else if (module_provides(p_obj, "sub source")) {
return "sub-source";
} else if (module_provides(p_obj, "sub filter")) {
return "sub-filter";
} else {
msg_Err(VLCIntf, "Unknown video filter type.");
return NULL;
}
}
- (void)setVideoFilter: (char *)psz_name on:(BOOL)b_on
{
intf_thread_t *p_intf = VLCIntf;
if (!p_intf)
return;
char *psz_string, *psz_parser;
const char *psz_filter_type = [self getFilterType:psz_name];
if (!psz_filter_type) {
msg_Err(p_intf, "Unable to find filter module \"%s\".", psz_name);
return;
}
msg_Dbg(p_intf, "will set filter '%s'", psz_name);
psz_string = config_GetPsz(p_intf, psz_filter_type);
if (b_on) {
if (psz_string == NULL) {
psz_string = strdup(psz_name);
} else if (strstr(psz_string, psz_name) == NULL) {
char *psz_tmp = strdup([[NSString stringWithFormat: @"%s:%s", psz_string, psz_name] UTF8String]);
free(psz_string);
psz_string = psz_tmp;
}
} else {
if (!psz_string)
return;
psz_parser = strstr(psz_string, psz_name);
if (psz_parser) {
if (*(psz_parser + strlen(psz_name)) == ':') {
memmove(psz_parser, psz_parser + strlen(psz_name) + 1,
strlen(psz_parser + strlen(psz_name) + 1) + 1);
} else {
*psz_parser = '\0';
}
/* Remove trailing : : */
if (strlen(psz_string) > 0 && *(psz_string + strlen(psz_string) -1) == ':')
*(psz_string + strlen(psz_string) -1) = '\0';
} else {
free(psz_string);
return;
}
}
config_PutPsz(p_intf, 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 {
vout_thread_t *p_vout = getVout();
if (p_vout) {
var_SetString(p_vout, psz_filter_type, psz_string);
vlc_object_release(p_vout);
}
}
free(psz_string);
}
- (void)restartFilterIfNeeded: (char *)psz_filter option: (char *)psz_name
{
vout_thread_t *p_vout = getVout();
intf_thread_t *p_intf = VLCIntf;
if (!p_intf)
return;
if (p_vout == NULL)
return;
else
vlc_object_release(p_vout);
vlc_object_t *p_filter = vlc_object_find_name(pl_Get(p_intf), psz_filter);
if (p_filter) {
/* we cannot rely on the p_filter existence.
This filter might be just
disabled, but the object still exists. Therefore, the string
is checked, additionally.
*/
const char *psz_filter_type = [self getFilterType:psz_filter];
if (!psz_filter_type) {
msg_Err(p_intf, "Unable to find filter module \"%s\".", psz_name);
goto out;
}
char *psz_string = config_GetPsz(p_intf, psz_filter_type);
if (!psz_string) {
goto out;
}
if (strstr(psz_string, psz_filter) == NULL) {
free(psz_string);
goto out;
}
free(psz_string);
int i_type;
i_type = var_Type(p_filter, psz_name);
if (i_type == 0)
i_type = config_GetType(p_intf, psz_name);
if (!(i_type & VLC_VAR_ISCOMMAND)) {
msg_Warn(p_intf, "Brute-restarting filter '%s', because the last changed option isn't a command", psz_name);
[self setVideoFilter: psz_filter on: NO];
[self setVideoFilter: psz_filter on: YES];
} else
msg_Dbg(p_intf, "restart not needed");
out:
vlc_object_release(p_filter);
}
}
- (void)setVideoFilterProperty: (char *)psz_name forFilter: (char *)psz_filter integer: (int)i_value
{
vout_thread_t *p_vout = getVout();
vlc_object_t *p_filter;
intf_thread_t *p_intf = VLCIntf;
if (!p_intf)
return;
config_PutInt(p_intf, psz_name, i_value);
if (p_vout) {
p_filter = vlc_object_find_name(pl_Get(p_intf), psz_filter);
if (!p_filter) {
msg_Warn(p_intf, "filter '%s' isn't enabled", psz_filter);
vlc_object_release(p_vout);
return;
}
var_SetInteger(p_filter, psz_name, i_value);
vlc_object_release(p_vout);
vlc_object_release(p_filter);
[self restartFilterIfNeeded: psz_filter option: psz_name];
}
}
- (void)setVideoFilterProperty: (char *)psz_name forFilter: (char *)psz_filter float: (float)f_value
{
vout_thread_t *p_vout = getVout();
vlc_object_t *p_filter;
intf_thread_t *p_intf = VLCIntf;
if (!p_intf)
return;
config_PutFloat(p_intf, psz_name, f_value);
if (p_vout) {
p_filter = vlc_object_find_name(pl_Get(p_intf), psz_filter);
if (!p_filter) {
msg_Warn(p_intf, "filter '%s' isn't enabled", psz_filter);
vlc_object_release(p_vout);
return;
}
var_SetFloat(p_filter, psz_name, f_value);
vlc_object_release(p_vout);
vlc_object_release(p_filter);
[self restartFilterIfNeeded: psz_filter option: psz_name];
}
}
- (void)setVideoFilterProperty: (char *)psz_name forFilter: (char *)psz_filter string: (const char *)psz_value
{
char *psz_new_value = strdup(psz_value);
vout_thread_t *p_vout = getVout();
vlc_object_t *p_filter;
intf_thread_t *p_intf = VLCIntf;
if (!p_intf)
return;
config_PutPsz(p_intf, psz_name, EnsureUTF8(psz_new_value));
if (p_vout) {
p_filter = vlc_object_find_name(pl_Get(p_intf), psz_filter);
if (!p_filter) {
msg_Warn(p_intf, "filter '%s' isn't enabled", psz_filter);
vlc_object_release(p_vout);
return;
}
var_SetString(p_filter, psz_name, EnsureUTF8(psz_new_value));
vlc_object_release(p_vout);
vlc_object_release(p_filter);
[self restartFilterIfNeeded: psz_filter option: psz_name];
}
free(psz_new_value);
}
- (void)setVideoFilterProperty: (char *)psz_name forFilter: (char *)psz_filter boolean: (BOOL)b_value
{
vout_thread_t *p_vout = getVout();
vlc_object_t *p_filter;
intf_thread_t *p_intf = VLCIntf;
if (!p_intf)
return;
config_PutInt(p_intf, psz_name, b_value);
if (p_vout) {
p_filter = vlc_object_find_name(pl_Get(p_intf), psz_filter);
if (!p_filter) {
msg_Warn(p_intf, "filter '%s' isn't enabled", psz_filter);
vlc_object_release(p_vout);
return;
}
var_SetBool(p_filter, psz_name, b_value);
vlc_object_release(p_vout);
vlc_object_release(p_filter);
}
}
@end
......@@ -151,11 +151,6 @@
- (void)updateCocoaWindowLevel:(NSInteger)i_level;
- (void)resetValues;
- (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)saveCurrentProfile;
......
<
......@@ -23,11 +23,9 @@
#import "CompatibilityFixes.h"
#import "intf.h"
#import <vlc_common.h>
#import <vlc_modules.h>
#import <vlc_charset.h>
#import "VideoEffects.h"
#import "SharedDialogs.h"
#import "CoreInteraction.h"
@interface VLCVideoEffects (Internal)
- (void)resetProfileSelector;
......@@ -483,232 +481,6 @@ static VLCVideoEffects *_o_sharedInstance = nil;
[o_addlogo_transparency_lbl setEnabled: b_state];
}
- (const char *)getFilterType:(char *)psz_name
{
module_t *p_obj = module_find(psz_name);
if (!p_obj) {
return NULL;
}
if (module_provides(p_obj, "video splitter")) {
return "video-splitter";
} else if (module_provides(p_obj, "video filter2")) {
return "video-filter";
} else if (module_provides(p_obj, "sub source")) {
return "sub-source";
} else if (module_provides(p_obj, "sub filter")) {
return "sub-filter";
} else {
msg_Err(p_intf, "Unknown video filter type.");
return NULL;
}
}
- (void)setVideoFilter: (char *)psz_name on:(BOOL)b_on
{
char *psz_string, *psz_parser;
const char *psz_filter_type = [self getFilterType:psz_name];
if (!psz_filter_type) {
msg_Err(p_intf, "Unable to find filter module \"%s\".", psz_name);
return;
}
msg_Dbg(p_intf, "will set filter '%s'", psz_name);
psz_string = config_GetPsz(p_intf, psz_filter_type);
if (b_on) {
if (psz_string == NULL) {
psz_string = strdup(psz_name);
} else if (strstr(psz_string, psz_name) == NULL) {
char *psz_tmp = strdup([[NSString stringWithFormat: @"%s:%s", psz_string, psz_name] UTF8String]);
free(psz_string);
psz_string = psz_tmp;
}
} else {
if (!psz_string)
return;
psz_parser = strstr(psz_string, psz_name);
if (psz_parser) {
if (*(psz_parser + strlen(psz_name)) == ':') {
memmove(psz_parser, psz_parser + strlen(psz_name) + 1,
strlen(psz_parser + strlen(psz_name) + 1) + 1);
} else {
*psz_parser = '\0';
}
/* Remove trailing : : */
if (strlen(psz_string) > 0 && *(psz_string + strlen(psz_string) -1) == ':')
*(psz_string + strlen(psz_string) -1) = '\0';
} else {
free(psz_string);
return;
}
}
config_PutPsz(p_intf, 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 {
vout_thread_t *p_vout = getVout();
if (p_vout) {
var_SetString(p_vout, psz_filter_type, psz_string);
vlc_object_release(p_vout);
}
}
free(psz_string);
}
- (void)restartFilterIfNeeded: (char *)psz_filter option: (char *)psz_name
{
vout_thread_t *p_vout = getVout();
if (p_vout == NULL)
return;
else
vlc_object_release(p_vout);
vlc_object_t *p_filter = vlc_object_find_name(pl_Get(p_intf), psz_filter);
if (p_filter) {
/* we cannot rely on the p_filter existence.
This filter might be just
disabled, but the object still exists. Therefore, the string
is checked, additionally.
*/
const char *psz_filter_type = [self getFilterType:psz_filter];
if (!psz_filter_type) {
msg_Err(p_intf, "Unable to find filter module \"%s\".", psz_name);
goto out;
}
char *psz_string = config_GetPsz(p_intf, psz_filter_type);
if (!psz_string) {
goto out;
}
if (strstr(psz_string, psz_filter) == NULL) {
free(psz_string);
goto out;
}
free(psz_string);
int i_type;
i_type = var_Type(p_filter, psz_name);
if (i_type == 0)
i_type = config_GetType(p_intf, psz_name);
if (!(i_type & VLC_VAR_ISCOMMAND)) {
msg_Warn(p_intf, "Brute-restarting filter '%s', because the last changed option isn't a command", psz_name);
[self setVideoFilter: psz_filter on: NO];
[self setVideoFilter: psz_filter on: YES];
} else
msg_Dbg(p_intf, "restart not needed");
out:
vlc_object_release(p_filter);
}
}
- (void)setVideoFilterProperty: (char *)psz_name forFilter: (char *)psz_filter integer: (int)i_value
{
vout_thread_t *p_vout = getVout();
vlc_object_t *p_filter;
config_PutInt(p_intf, psz_name, i_value);
if (p_vout) {
p_filter = vlc_object_find_name(pl_Get(p_intf), psz_filter);
if (!p_filter) {
msg_Warn(p_intf, "filter '%s' isn't enabled", psz_filter);
vlc_object_release(p_vout);
return;
}
var_SetInteger(p_filter, psz_name, i_value);
vlc_object_release(p_vout);
vlc_object_release(p_filter);
[self restartFilterIfNeeded: psz_filter option: psz_name];
}
}
- (void)setVideoFilterProperty: (char *)psz_name forFilter: (char *)psz_filter float: (float)f_value
{
vout_thread_t *p_vout = getVout();
vlc_object_t *p_filter;
config_PutFloat(p_intf, psz_name, f_value);
if (p_vout) {
p_filter = vlc_object_find_name(pl_Get(p_intf), psz_filter);
if (!p_filter) {
msg_Warn(p_intf, "filter '%s' isn't enabled", psz_filter);
vlc_object_release(p_vout);
return;
}
var_SetFloat(p_filter, psz_name, f_value);
vlc_object_release(p_vout);
vlc_object_release(p_filter);
[self restartFilterIfNeeded: psz_filter option: psz_name];
}
}
- (void)setVideoFilterProperty: (char *)psz_name forFilter: (char *)psz_filter string: (const char *)psz_value
{
char *psz_new_value = strdup(psz_value);
vout_thread_t *p_vout = getVout();
vlc_object_t *p_filter;
config_PutPsz(p_intf, psz_name, EnsureUTF8(psz_new_value));
if (p_vout) {
p_filter = vlc_object_find_name(pl_Get(p_intf), psz_filter);
if (!p_filter) {
msg_Warn(p_intf, "filter '%s' isn't enabled", psz_filter);
vlc_object_release(p_vout);
return;
}
var_SetString(p_filter, psz_name, EnsureUTF8(psz_new_value));
vlc_object_release(p_vout);
vlc_object_release(p_filter);
[self restartFilterIfNeeded: psz_filter option: psz_name];
}
free(psz_new_value);
}
- (void)setVideoFilterProperty: (char *)psz_name forFilter: (char *)psz_filter boolean: (BOOL)b_value
{
vout_thread_t *p_vout = getVout();
vlc_object_t *p_filter;
config_PutInt(p_intf, psz_name, b_value);
if (p_vout) {
p_filter = vlc_object_find_name(pl_Get(p_intf), psz_filter);
if (!p_filter) {
msg_Warn(p_intf, "filter '%s' isn't enabled", psz_filter);
vlc_object_release(p_vout);
return;
}
var_SetBool(p_filter, psz_name, b_value);
vlc_object_release(p_vout);
vlc_object_release(p_filter);
}
}
- (NSString *)generateProfileString
{
return [NSString stringWithFormat:@"%@;%@;%@;%lli;%f;%f;%f;%f;%f;%lli;%f;%@;%lli;%lli;%lli;%lli;%lli;%lli;%@;%lli;%lli;%lli;%lli;%lli;%@;%lli;%@;%lli;%lli;%lli;%lli;%lli",
......@@ -783,6 +555,7 @@ static VLCVideoEffects *_o_sharedInstance = nil;
{
[self saveCurrentProfile];
i_old_profile_index = [o_profile_pop indexOfSelectedItem];
VLCCoreInteraction *vci_si = [VLCCoreInteraction sharedInstance];
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSUInteger selectedProfile = [o_profile_pop indexOfSelectedItem];
......@@ -810,7 +583,7 @@ static VLCVideoEffects *_o_sharedInstance = nil;
tempArray = [tempString componentsSeparatedByString:@":"];
count = [tempArray count];
for (NSUInteger x = 0; x < count; x++)
[self setVideoFilter:(char *)[[tempArray objectAtIndex:x] UTF8String] on:YES];
[vci_si setVideoFilter:(char *)[[tempArray objectAtIndex:x] UTF8String] on:YES];
}
tempString = B64DecNSStr([items objectAtIndex:1]);
......@@ -820,7 +593,7 @@ static VLCVideoEffects *_o_sharedInstance = nil;
tempArray = [tempString componentsSeparatedByString:@":"];
count = [tempArray count];
for (NSUInteger x = 0; x < count; x++)
[self setVideoFilter:(char *)[[tempArray objectAtIndex:x] UTF8String] on:YES];
[vci_si setVideoFilter:(char *)[[tempArray objectAtIndex:x] UTF8String] on:YES];
}
tempString = B64DecNSStr([items objectAtIndex:2]);
......@@ -830,39 +603,39 @@ static VLCVideoEffects *_o_sharedInstance = nil;
tempArray = [tempString componentsSeparatedByString:@":"];
count = [tempArray count];
for (NSUInteger x = 0; x < count; x++)
[self setVideoFilter:(char *)[[tempArray objectAtIndex:x] UTF8String] on:YES];
[vci_si setVideoFilter:(char *)[[tempArray objectAtIndex:x] UTF8String] on:YES];
}
/* try to set filter values on-the-fly and store them appropriately */
[self setVideoFilterProperty:"hue" forFilter:"adjust" integer:[[items objectAtIndex:3] intValue]];
[self setVideoFilterProperty:"contrast" forFilter:"adjust" float:[[items objectAtIndex:4] floatValue]];
[self setVideoFilterProperty:"brightness" forFilter:"adjust" float:[[items objectAtIndex:5] floatValue]];
[self setVideoFilterProperty:"saturation" forFilter:"adjust" float:[[items objectAtIndex:6] floatValue]];
[self setVideoFilterProperty:"gamma" forFilter:"adjust" float:[[items objectAtIndex:7] floatValue]];
[self setVideoFilterProperty:"sharpen-sigma" forFilter:"sharpen" float:[[items objectAtIndex:8] floatValue]];
[self setVideoFilterProperty:"gradfun-radius" forFilter:"gradfun" integer:[[items objectAtIndex:9] intValue]];
[self setVideoFilterProperty:"grain-variance" forFilter:"grain" float:[[items objectAtIndex:10] floatValue]];
[self setVideoFilterProperty:"transform-type" forFilter:"transform" string:[B64DecNSStr([items objectAtIndex:11]) UTF8String]];
[self setVideoFilterProperty:"puzzle-rows" forFilter:"puzzle" integer:[[items objectAtIndex:12] intValue]];
[self setVideoFilterProperty:"puzzle-cols" forFilter:"puzzle" integer:[[items objectAtIndex:13] intValue]];
[self setVideoFilterProperty:"colorthres-color" forFilter:"colorthres" integer:[[items objectAtIndex:14] intValue]];
[self setVideoFilterProperty:"colorthres-saturationthres" forFilter:"colorthres" integer:[[items objectAtIndex:15] intValue]];
[self setVideoFilterProperty:"colorthres-similaritythres" forFilter:"colorthres" integer:[[items objectAtIndex:16] intValue]];
[self setVideoFilterProperty:"sepia-intensity" forFilter:"sepia" integer:[[items objectAtIndex:17] intValue]];
[self setVideoFilterProperty:"gradient-mode" forFilter:"gradient" string:[B64DecNSStr([items objectAtIndex:18]) UTF8String]];
[self setVideoFilterProperty:"gradient-cartoon" forFilter:"gradient" integer:[[items objectAtIndex:19] intValue]];
[self setVideoFilterProperty:"gradient-type" forFilter:"gradient" integer:[[items objectAtIndex:20] intValue]];
[self setVideoFilterProperty:"extract-component" forFilter:"extract" integer:[[items objectAtIndex:21] intValue]];
[self setVideoFilterProperty:"posterize-level" forFilter:"posterize" integer:[[items objectAtIndex:22] intValue]];
[self setVideoFilterProperty:"blur-factor" forFilter:"motionblur" integer:[[items objectAtIndex:23] intValue]];
[self setVideoFilterProperty:"marq-marquee" forFilter:"marq" string:[B64DecNSStr([items objectAtIndex:24]) UTF8String]];
[self setVideoFilterProperty:"marq-position" forFilter:"marq" integer:[[items objectAtIndex:25] intValue]];
[self setVideoFilterProperty:"logo-file" forFilter:"logo" string:[B64DecNSStr([items objectAtIndex:26]) UTF8String]];
[self setVideoFilterProperty:"logo-position" forFilter:"logo" integer:[[items objectAtIndex:27] intValue]];
[self setVideoFilterProperty:"logo-opacity" forFilter:"logo" integer:[[items objectAtIndex:28] intValue]];
[self setVideoFilterProperty:"clone-count" forFilter:"clone" integer:[[items objectAtIndex:29] intValue]];
[self setVideoFilterProperty:"wall-rows" forFilter:"wall" integer:[[items objectAtIndex:30] intValue]];
[self setVideoFilterProperty:"wall-cols" forFilter:"wall" integer:[[items objectAtIndex:31] intValue]];
[vci_si setVideoFilterProperty:"hue" forFilter:"adjust" integer:[[items objectAtIndex:3] intValue]];
[vci_si setVideoFilterProperty:"contrast" forFilter:"adjust" float:[[items objectAtIndex:4] floatValue]];
[vci_si setVideoFilterProperty:"brightness" forFilter:"adjust" float:[[items objectAtIndex:5] floatValue]];
[vci_si setVideoFilterProperty:"saturation" forFilter:"adjust" float:[[items objectAtIndex:6] floatValue]];
[vci_si setVideoFilterProperty:"gamma" forFilter:"adjust" float:[[items objectAtIndex:7] floatValue]];
[vci_si setVideoFilterProperty:"sharpen-sigma" forFilter:"sharpen" float:[[items objectAtIndex:8] floatValue]];
[vci_si setVideoFilterProperty:"gradfun-radius" forFilter:"gradfun" integer:[[items objectAtIndex:9] intValue]];
[vci_si setVideoFilterProperty:"grain-variance" forFilter:"grain" float:[[items objectAtIndex:10] floatValue]];
[vci_si setVideoFilterProperty:"transform-type" forFilter:"transform" string:[B64DecNSStr([items objectAtIndex:11]) UTF8String]];
[vci_si setVideoFilterProperty:"puzzle-rows" forFilter:"puzzle" integer:[[items objectAtIndex:12] intValue]];
[vci_si setVideoFilterProperty:"puzzle-cols" forFilter:"puzzle" integer:[[items objectAtIndex:13] intValue]];
[vci_si setVideoFilterProperty:"colorthres-color" forFilter:"colorthres" integer:[[items objectAtIndex:14] intValue]];
[vci_si setVideoFilterProperty:"colorthres-saturationthres" forFilter:"colorthres" integer:[[items objectAtIndex:15] intValue]];
[vci_si setVideoFilterProperty:"colorthres-similaritythres" forFilter:"colorthres" integer:[[items objectAtIndex:16] intValue]];
[vci_si setVideoFilterProperty:"sepia-intensity" forFilter:"sepia" integer:[[items objectAtIndex:17] intValue]];
[vci_si setVideoFilterProperty:"gradient-mode" forFilter:"gradient" string:[B64DecNSStr([items objectAtIndex:18]) UTF8String]];
[vci_si setVideoFilterProperty:"gradient-cartoon" forFilter:"gradient" integer:[[items objectAtIndex:19] intValue]];
[vci_si setVideoFilterProperty:"gradient-type" forFilter:"gradient" integer:[[items objectAtIndex:20] intValue]];
[vci_si setVideoFilterProperty:"extract-component" forFilter:"extract" integer:[[items objectAtIndex:21] intValue]];
[vci_si setVideoFilterProperty:"posterize-level" forFilter:"posterize" integer:[[items objectAtIndex:22] intValue]];
[vci_si setVideoFilterProperty:"blur-factor" forFilter:"motionblur" integer:[[items objectAtIndex:23] intValue]];
[vci_si setVideoFilterProperty:"marq-marquee" forFilter:"marq" string:[B64DecNSStr([items objectAtIndex:24]) UTF8String]];
[vci_si setVideoFilterProperty:"marq-position" forFilter:"marq" integer:[[items objectAtIndex:25] intValue]];
[vci_si setVideoFilterProperty:"logo-file" forFilter:"logo" string:[B64DecNSStr([items objectAtIndex:26]) UTF8String]];
[vci_si setVideoFilterProperty:"logo-position" forFilter:"logo" integer:[[items objectAtIndex:27] intValue]];
[vci_si setVideoFilterProperty:"logo-opacity" forFilter:"logo" integer:[[items objectAtIndex:28] intValue]];
[vci_si setVideoFilterProperty:"clone-count" forFilter:"clone" integer:[[items objectAtIndex:29] intValue]];
[vci_si setVideoFilterProperty:"wall-rows" forFilter:"wall" integer:[[items objectAtIndex:30] intValue]];
[vci_si setVideoFilterProperty:"wall-cols" forFilter:"wall" integer:[[items objectAtIndex:31] intValue]];