summaryrefslogtreecommitdiffstats
path: root/gtk/src/x264handler.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2008-12-06 17:23:52 +0000
committerjstebbins <[email protected]>2008-12-06 17:23:52 +0000
commitec2c6611b5c0c36c1270e6d3143681281518be8d (patch)
treeccbf4bce2b67ebbf6e1fd7f3bc7ebd59d7ce4b4a /gtk/src/x264handler.c
parent62c5a73bb1983cc97c2c9ab8037a4ff3fc0d111e (diff)
LinGui: fix me_method/me_range dependency
umh, esa, tesa -- me_range 4 - 64 dia, hex -- me_range 4 - 16 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2015 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/x264handler.c')
-rw-r--r--gtk/src/x264handler.c37
1 files changed, 31 insertions, 6 deletions
diff --git a/gtk/src/x264handler.c b/gtk/src/x264handler.c
index 3fbcf49c9..36bed7721 100644
--- a/gtk/src/x264handler.c
+++ b/gtk/src/x264handler.c
@@ -17,6 +17,7 @@
#include "values.h"
#include "callbacks.h"
#include "presets.h"
+#include "hb-backend.h"
#include "x264handler.h"
static void x264_opt_update(signal_user_data_t *ud, GtkWidget *widget);
@@ -40,6 +41,36 @@ x264_widget_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
}
void
+x264_me_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
+{
+ const GValue *gval;
+ gint me;
+
+ ghb_widget_to_setting(ud->settings, widget);
+ if (!ignore_options_update)
+ {
+ ignore_options_update = TRUE;
+ x264_opt_update(ud, widget);
+ ignore_options_update = FALSE;
+ }
+ ghb_check_dependency(ud, widget);
+ ghb_clear_presets_selection(ud);
+ widget = GHB_WIDGET(ud->builder, "x264_merange");
+ gval = ghb_settings_get_value(ud->settings, "x264_me");
+ me = ghb_lookup_combo_int("x264_me", gval);
+ if (me < 2)
+ { // me < umh
+ // me_range 4 - 16
+ gtk_spin_button_set_range(GTK_SPIN_BUTTON(widget), 4, 16);
+ }
+ else
+ {
+ // me_range 4 - 64
+ gtk_spin_button_set_range(GTK_SPIN_BUTTON(widget), 4, 64);
+ }
+}
+
+void
x264_entry_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
{
g_debug("x264_entry_changed_cb ()");
@@ -581,12 +612,6 @@ sanitize_x264opts(signal_user_data_t *ud, const gchar *options)
{
x264_remove_opt(split, x264_bpyramid_syns);
}
- gchar *me = ghb_settings_get_string(ud->settings, "x264_me");
- if (!(strcmp(me, "umh") == 0 || strcmp(me, "esa") == 0))
- {
- x264_remove_opt(split, x264_merange_syns);
- }
- g_free(me);
if (!ghb_settings_get_boolean(ud->settings, "x264_cabac"))
{
x264_remove_opt(split, x264_trellis_syns);