diff options
author | jstebbins <[email protected]> | 2008-12-06 17:23:52 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2008-12-06 17:23:52 +0000 |
commit | ec2c6611b5c0c36c1270e6d3143681281518be8d (patch) | |
tree | ccbf4bce2b67ebbf6e1fd7f3bc7ebd59d7ce4b4a /gtk/src | |
parent | 62c5a73bb1983cc97c2c9ab8037a4ff3fc0d111e (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')
-rw-r--r-- | gtk/src/audiohandler.c | 4 | ||||
-rw-r--r-- | gtk/src/callbacks.c | 4 | ||||
-rw-r--r-- | gtk/src/ghb.ui | 2 | ||||
-rw-r--r-- | gtk/src/hb-backend.c | 9 | ||||
-rw-r--r-- | gtk/src/makedeps.c | 1 | ||||
-rw-r--r-- | gtk/src/queuehandler.c | 2 | ||||
-rw-r--r-- | gtk/src/resource_data.h | 14 | ||||
-rw-r--r-- | gtk/src/resources.plist | 14 | ||||
-rw-r--r-- | gtk/src/settings.c | 16 | ||||
-rw-r--r-- | gtk/src/settings.h | 16 | ||||
-rw-r--r-- | gtk/src/values.c | 2 | ||||
-rw-r--r-- | gtk/src/values.h | 2 | ||||
-rw-r--r-- | gtk/src/widget_deps | 4 | ||||
-rw-r--r-- | gtk/src/widget_reverse_deps | 8 | ||||
-rw-r--r-- | gtk/src/x264handler.c | 37 |
15 files changed, 62 insertions, 73 deletions
diff --git a/gtk/src/audiohandler.c b/gtk/src/audiohandler.c index 53c96919b..3c369566b 100644 --- a/gtk/src/audiohandler.c +++ b/gtk/src/audiohandler.c @@ -93,8 +93,8 @@ ghb_set_pref_audio(gint titleindex, signal_user_data_t *ud) GHashTable *track_indicies; gint *iptr; - GValue *pref_audio; - GValue *audio, *acodec, *bitrate, *rate, *mix, *drc; + const GValue *pref_audio; + const GValue *audio, *acodec, *bitrate, *rate, *mix, *drc; gint count, ii, list_count; g_debug("set_pref_audio"); diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c index b48e1568a..d69992fae 100644 --- a/gtk/src/callbacks.c +++ b/gtk/src/callbacks.c @@ -1368,7 +1368,7 @@ submit_job(GValue *settings) { static gint unique_id = 1; gchar *type, *modified, *preset; - GValue *path; + const GValue *path; gboolean preset_modified; g_debug("submit_job"); @@ -2184,7 +2184,7 @@ chapter_edited_cb( -1); gtk_tree_model_get(GTK_TREE_MODEL(store), &iter, 0, &index, -1); - GValue *chapters; + const GValue *chapters; GValue *chapter; chapters = ghb_settings_get_value(ud->settings, "chapter_list"); diff --git a/gtk/src/ghb.ui b/gtk/src/ghb.ui index e5f59ac97..978f2a0c1 100644 --- a/gtk/src/ghb.ui +++ b/gtk/src/ghb.ui @@ -2480,7 +2480,7 @@ no-fast-pskip=0:no-dct-decimate=0:cabac=1</property> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="tooltip-text" translatable="yes">This sets the shape of the area x264 searches when estimating motion. Your choices are a diamond, a hexagon, a more complex hexagonal shape, or searching the entire frame. You are best off using Uneven Multi-Hexagonal searching.</property> - <signal handler="x264_widget_changed_cb" name="changed"/> + <signal handler="x264_me_changed_cb" name="changed"/> </object> </child> </object> diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c index 8579872e4..53188820f 100644 --- a/gtk/src/hb-backend.c +++ b/gtk/src/hb-backend.c @@ -157,10 +157,11 @@ combo_opts_t direct_opts = static options_map_t d_me_opts[] = { - {"Diamond", "dia", 0, "dia"}, - {"Hexagon", "hex", 1, "hex"}, - {"Uneven Multi-Hexagon", "umh", 2, "umh"}, - {"Exhaustive", "esa", 3, "esa"}, + {"Diamond", "dia", 0, "dia"}, + {"Hexagon", "hex", 1, "hex"}, + {"Uneven Multi-Hexagon", "umh", 2, "umh"}, + {"Exhaustive", "esa", 3, "esa"}, + {"Hadamard Exhaustive", "tesa", 4, "tesa"}, }; combo_opts_t me_opts = { diff --git a/gtk/src/makedeps.c b/gtk/src/makedeps.c index b094054e8..1cb5f2479 100644 --- a/gtk/src/makedeps.c +++ b/gtk/src/makedeps.c @@ -61,7 +61,6 @@ static dependency_t dep_map[] = {"x264_bframes", "x264_direct", "0", TRUE}, {"x264_refs", "x264_mixed_refs", "<2", TRUE}, {"x264_cabac", "x264_trellis", "TRUE", FALSE}, - {"x264_me", "x264_merange", "umh|esa", FALSE}, {"ChapterMarkers", "chapters_list", "TRUE", FALSE}, {"use_source_name", "chapters_in_destination", "TRUE", FALSE}, }; diff --git a/gtk/src/queuehandler.c b/gtk/src/queuehandler.c index f8687b7fb..adf409e16 100644 --- a/gtk/src/queuehandler.c +++ b/gtk/src/queuehandler.c @@ -392,7 +392,7 @@ audio_list_refresh(signal_user_data_t *ud) GtkListStore *store; gboolean done; gint row = 0; - GValue *audio_list; + const GValue *audio_list; g_debug("ghb_audio_list_refresh ()"); treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "audio_list")); diff --git a/gtk/src/resource_data.h b/gtk/src/resource_data.h index 3b20169fc..010d4f00f 100644 --- a/gtk/src/resource_data.h +++ b/gtk/src/resource_data.h @@ -4027,7 +4027,7 @@ "ire frame. You are best off using Uneven Multi-Hexagonal searching.<" "/property>\n" " <signal handler=&quo" -"t;x264_widget_changed_cb" name="changed"/>\n" +"t;x264_me_changed_cb" name="changed"/>\n" " </object>\n" " </child>\n" " </object>\n" @@ -12570,10 +12570,6 @@ " <array>\n" " <string>x264_trellis</string>\n" " </array>\n" -" <key>x264_me</key>\n" -" <array>\n" -" <string>x264_merange</string>\n" -" </array>\n" " <key>x264_refs</key>\n" " <array>\n" " <string>x264_mixed_refs</string>\n" @@ -12913,14 +12909,6 @@ " <true />\n" " </array>\n" " </array>\n" -" <key>x264_merange</key>\n" -" <array>\n" -" <array>\n" -" <string>x264_me</string>\n" -" <string>umh|esa</string>\n" -" <false />\n" -" </array>\n" -" </array>\n" " <key>x264_mixed_refs</key>\n" " <array>\n" " <array>\n" diff --git a/gtk/src/resources.plist b/gtk/src/resources.plist index ffb34613d..7948a3aee 100644 --- a/gtk/src/resources.plist +++ b/gtk/src/resources.plist @@ -2485,7 +2485,7 @@ no-fast-pskip=0:no-dct-decimate=0:cabac=1</property> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="tooltip-text" translatable="yes">This sets the shape of the area x264 searches when estimating motion. Your choices are a diamond, a hexagon, a more complex hexagonal shape, or searching the entire frame. You are best off using Uneven Multi-Hexagonal searching.</property> - <signal handler="x264_widget_changed_cb" name="changed"/> + <signal handler="x264_me_changed_cb" name="changed"/> </object> </child> </object> @@ -7159,10 +7159,6 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A <array> <string>x264_trellis</string> </array> - <key>x264_me</key> - <array> - <string>x264_merange</string> - </array> <key>x264_refs</key> <array> <string>x264_mixed_refs</string> @@ -7502,14 +7498,6 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A <true /> </array> </array> - <key>x264_merange</key> - <array> - <array> - <string>x264_me</string> - <string>umh|esa</string> - <false /> - </array> - </array> <key>x264_mixed_refs</key> <array> <array> diff --git a/gtk/src/settings.c b/gtk/src/settings.c index 03d65c766..20c1416a6 100644 --- a/gtk/src/settings.c +++ b/gtk/src/settings.c @@ -98,7 +98,7 @@ ghb_settings_set_boolean(GValue *settings, const gchar *key, gboolean bval) } GValue* -ghb_settings_get_value(GValue *settings, const gchar *key) +ghb_settings_get_value(const GValue *settings, const gchar *key) { GValue *value; value = ghb_dict_lookup(settings, key); @@ -108,7 +108,7 @@ ghb_settings_get_value(GValue *settings, const gchar *key) } gboolean -ghb_settings_get_boolean(GValue *settings, const gchar *key) +ghb_settings_get_boolean(const GValue *settings, const gchar *key) { const GValue* value; value = ghb_settings_get_value(settings, key); @@ -117,7 +117,7 @@ ghb_settings_get_boolean(GValue *settings, const gchar *key) } gint64 -ghb_settings_get_int64(GValue *settings, const gchar *key) +ghb_settings_get_int64(const GValue *settings, const gchar *key) { const GValue* value; value = ghb_settings_get_value(settings, key); @@ -126,7 +126,7 @@ ghb_settings_get_int64(GValue *settings, const gchar *key) } gint -ghb_settings_get_int(GValue *settings, const gchar *key) +ghb_settings_get_int(const GValue *settings, const gchar *key) { const GValue* value; value = ghb_settings_get_value(settings, key); @@ -135,7 +135,7 @@ ghb_settings_get_int(GValue *settings, const gchar *key) } gdouble -ghb_settings_get_double(GValue *settings, const gchar *key) +ghb_settings_get_double(const GValue *settings, const gchar *key) { const GValue* value; value = ghb_settings_get_value(settings, key); @@ -144,7 +144,7 @@ ghb_settings_get_double(GValue *settings, const gchar *key) } gchar* -ghb_settings_get_string(GValue *settings, const gchar *key) +ghb_settings_get_string(const GValue *settings, const gchar *key) { const GValue* value; value = ghb_settings_get_value(settings, key); @@ -153,13 +153,13 @@ ghb_settings_get_string(GValue *settings, const gchar *key) } gint -ghb_settings_combo_int(GValue *settings, const gchar *key) +ghb_settings_combo_int(const GValue *settings, const gchar *key) { return ghb_lookup_combo_int(key, ghb_settings_get_value(settings, key)); } const gchar* -ghb_settings_combo_option(GValue *settings, const gchar *key) +ghb_settings_combo_option(const GValue *settings, const gchar *key) { return ghb_lookup_combo_option(key, ghb_settings_get_value(settings, key)); } diff --git a/gtk/src/settings.h b/gtk/src/settings.h index 4d6eb22df..55584ca70 100644 --- a/gtk/src/settings.h +++ b/gtk/src/settings.h @@ -77,14 +77,14 @@ void ghb_settings_set_boolean( GValue *settings, const gchar *key, gboolean bval); void ghb_settings_copy( GValue *settings, const gchar *key, const GValue *value); -GValue* ghb_settings_get_value(GValue *settings, const gchar *key); -gboolean ghb_settings_get_boolean(GValue *settings, const gchar *key); -gint64 ghb_settings_get_int64(GValue *settings, const gchar *key); -gint ghb_settings_get_int(GValue *settings, const gchar *key); -gdouble ghb_settings_get_double(GValue *settings, const gchar *key); -gchar* ghb_settings_get_string(GValue *settings, const gchar *key); -gint ghb_settings_combo_int(GValue *settings, const gchar *key); -const gchar* ghb_settings_combo_option(GValue *settings, const gchar *key); +GValue* ghb_settings_get_value(const GValue *settings, const gchar *key); +gboolean ghb_settings_get_boolean(const GValue *settings, const gchar *key); +gint64 ghb_settings_get_int64(const GValue *settings, const gchar *key); +gint ghb_settings_get_int(const GValue *settings, const gchar *key); +gdouble ghb_settings_get_double(const GValue *settings, const gchar *key); +gchar* ghb_settings_get_string(const GValue *settings, const gchar *key); +gint ghb_settings_combo_int(const GValue *settings, const gchar *key); +const gchar* ghb_settings_combo_option(const GValue *settings, const gchar *key); GValue* ghb_widget_value(GtkWidget *widget); gchar* ghb_widget_string(GtkWidget *widget); diff --git a/gtk/src/values.c b/gtk/src/values.c index 94b417f6d..ad723ee68 100644 --- a/gtk/src/values.c +++ b/gtk/src/values.c @@ -533,7 +533,7 @@ ghb_dict_iter_init(GHashTableIter *iter, GValue *gval) } GValue* -ghb_dict_lookup(GValue *gval, const gchar *key) +ghb_dict_lookup(const GValue *gval, const gchar *key) { GHashTable *dict = g_value_get_boxed(gval); return g_hash_table_lookup(dict, key); diff --git a/gtk/src/values.h b/gtk/src/values.h index 4000ad6f8..ecf676cdd 100644 --- a/gtk/src/values.h +++ b/gtk/src/values.h @@ -67,7 +67,7 @@ GValue* ghb_rawdata_value_new(ghb_rawdata_t *data); void ghb_dict_insert(GValue *gval, gchar *key, GValue *val); void ghb_dict_iter_init(GHashTableIter *iter, GValue *gval); -GValue* ghb_dict_lookup(GValue *gval, const gchar *key); +GValue* ghb_dict_lookup(const GValue *gval, const gchar *key); gboolean ghb_dict_remove(GValue *gval, const gchar *key); void ghb_register_transforms(void); diff --git a/gtk/src/widget_deps b/gtk/src/widget_deps index eb9ef27d2..092a46a26 100644 --- a/gtk/src/widget_deps +++ b/gtk/src/widget_deps @@ -100,10 +100,6 @@ <array> <string>x264_trellis</string> </array> - <key>x264_me</key> - <array> - <string>x264_merange</string> - </array> <key>x264_refs</key> <array> <string>x264_mixed_refs</string> diff --git a/gtk/src/widget_reverse_deps b/gtk/src/widget_reverse_deps index fa9c804c4..ff2da3841 100644 --- a/gtk/src/widget_reverse_deps +++ b/gtk/src/widget_reverse_deps @@ -334,14 +334,6 @@ <true /> </array> </array> - <key>x264_merange</key> - <array> - <array> - <string>x264_me</string> - <string>umh|esa</string> - <false /> - </array> - </array> <key>x264_mixed_refs</key> <array> <array> 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); |