summaryrefslogtreecommitdiffstats
path: root/gtk/src/presets.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2012-12-28 19:39:12 +0000
committerjstebbins <[email protected]>2012-12-28 19:39:12 +0000
commita27835f8854129a45b8e9f3c28614966848ff9dd (patch)
tree9ddfde534f58f3c8b4d8c98575e7b7e39d771027 /gtk/src/presets.c
parent93235d2c7d15e031015ebbbfeefa14778fe9a56e (diff)
LinGui: preset import/export robustness
Upon import, if x264Preset is missing, force x264UseAdvancedOptions enabled. Upon export, if x264UseAdvancedOptions is true, do not output x264Preset, x264Tune, x264Level, x264Profile, or x264OptionExtra. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5114 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/presets.c')
-rw-r--r--gtk/src/presets.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gtk/src/presets.c b/gtk/src/presets.c
index 2adcfdead..216015f3c 100644
--- a/gtk/src/presets.c
+++ b/gtk/src/presets.c
@@ -2866,6 +2866,8 @@ import_xlat_preset(GValue *dict)
ghb_int_value_new(ii));
}
}
+ ghb_dict_insert(dict, g_strdup("x264UseAdvancedOptions"),
+ ghb_boolean_value_new(TRUE));
}
const char *x264Tune = dict_get_string(dict, "x264Tune");
@@ -3002,6 +3004,14 @@ export_xlat_preset(GValue *dict)
}
}
+ if (ghb_value_boolean(preset_dict_get_value(dict, "x264UseAdvancedOptions")))
+ {
+ ghb_dict_remove(dict, "x264Preset");
+ ghb_dict_remove(dict, "x264Tune");
+ ghb_dict_remove(dict, "h264Profile");
+ ghb_dict_remove(dict, "h264Level");
+ ghb_dict_remove(dict, "x264OptionExtra");
+ }
const char *tune = dict_get_string(dict, "x264Tune");
if (tune != NULL)
{