diff options
author | jstebbins <[email protected]> | 2008-09-24 20:45:35 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2008-09-24 20:45:35 +0000 |
commit | ba295bc18bec81600913c056a8dc31ec26702dd2 (patch) | |
tree | 2ac5f2f645be86fa5da7cec7a681158750a997d6 /gtk | |
parent | f64be95d8eeeef3d6d84469df557836dd86192f0 (diff) |
LinGui: fix my misunderstanding of faac bitrate capabilities.
I wasn't allowing > 160kbps even for 6ch.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1759 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/src/callbacks.c | 22 | ||||
-rw-r--r-- | gtk/src/ghb.ui | 2 | ||||
-rw-r--r-- | gtk/src/hb-backend.c | 18 | ||||
-rw-r--r-- | gtk/src/resource_data.h | 2 | ||||
-rw-r--r-- | gtk/src/resources.plist | 2 |
5 files changed, 26 insertions, 20 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c index 66c1a46bd..708f5686d 100644 --- a/gtk/src/callbacks.c +++ b/gtk/src/callbacks.c @@ -961,7 +961,7 @@ show_title_info(signal_user_data_t *ud, ghb_title_info_t *tinfo) static void adjust_audio_rate_combos(signal_user_data_t *ud) { - gint titleindex, audioindex, acodec; + gint titleindex, audioindex, acodec, mix; ghb_audio_info_t ainfo; GtkWidget *widget; @@ -973,6 +973,8 @@ adjust_audio_rate_combos(signal_user_data_t *ud) widget = GHB_WIDGET(ud->builder, "audio_codec"); acodec = ghb_lookup_combo_int("audio_codec", ghb_widget_value(widget)); + widget = GHB_WIDGET(ud->builder, "audio_mix"); + mix = ghb_lookup_combo_int("audio_mix", ghb_widget_value(widget)); if (ghb_audio_is_passthru (acodec)) { @@ -993,7 +995,7 @@ adjust_audio_rate_combos(signal_user_data_t *ud) ghb_ui_update(ud, "audio_mix", ghb_int64_value(0)); } } - else if (acodec == HB_ACODEC_FAAC) + else if (acodec == HB_ACODEC_FAAC && mix != HB_AMIXDOWN_6CH) { gint br; @@ -1268,6 +1270,22 @@ audio_track_changed_cb(GtkWidget *widget, signal_user_data_t *ud) } void +audio_mix_changed_cb(GtkWidget *widget, signal_user_data_t *ud) +{ + GValue *asettings; + + g_debug("audio_widget_changed_cb ()"); + adjust_audio_rate_combos(ud); + check_dependency(ud, widget); + asettings = get_selected_asettings(ud); + if (asettings != NULL) + { + ghb_widget_to_setting(asettings, widget); + audio_list_refresh_selected(ud); + } +} + +void audio_widget_changed_cb(GtkWidget *widget, signal_user_data_t *ud) { GValue *asettings; diff --git a/gtk/src/ghb.ui b/gtk/src/ghb.ui index e64bda5d1..9772e4ac9 100644 --- a/gtk/src/ghb.ui +++ b/gtk/src/ghb.ui @@ -2194,7 +2194,7 @@ <object class="GtkComboBox" id="audio_mix"> <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> - <signal handler="audio_widget_changed_cb" name="changed"/> + <signal handler="audio_mix_changed_cb" name="changed"/> </object> <packing> <property name="left_attach">4</property> diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c index 3959dce89..f9112e3d4 100644 --- a/gtk/src/hb-backend.c +++ b/gtk/src/hb-backend.c @@ -1886,29 +1886,17 @@ audio_bitrate_opts_clean(GtkBuilder *builder, const gchar *name, gint last_rate) else if (ivalue > last) { ii++; - done = !gtk_list_store_remove(store, &iter); + gtk_list_store_set(store, &iter, 1, FALSE, -1); + done = !gtk_tree_model_iter_next (GTK_TREE_MODEL(store), &iter); } else { ii++; + gtk_list_store_set(store, &iter, 1, TRUE, -1); done = !gtk_tree_model_iter_next (GTK_TREE_MODEL(store), &iter); } } while (!done); } - for (; ii < hb_audio_bitrates_count; ii++) - { - if (hb_audio_bitrates[ii].rate <= last) - { - gtk_list_store_append(store, &iter); - gtk_list_store_set(store, &iter, - 0, hb_audio_bitrates[ii].string, - 1, TRUE, - 2, hb_audio_bitrates[ii].string, - 3, hb_audio_bitrates[ii].rate, - 4, hb_audio_bitrates[ii].string, - -1); - } - } } static void diff --git a/gtk/src/resource_data.h b/gtk/src/resource_data.h index 479744414..e86aae47d 100644 --- a/gtk/src/resource_data.h +++ b/gtk/src/resource_data.h @@ -3530,7 +3530,7 @@ "quot;>GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_B" "UTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>\n" " <signal handler="audio_" -"widget_changed_cb" name="changed"/>\n" +"mix_changed_cb" name="changed"/>\n" " </object>\n" " <packing>\n" " <property name="left_at" diff --git a/gtk/src/resources.plist b/gtk/src/resources.plist index f4bd23c9e..155ce7210 100644 --- a/gtk/src/resources.plist +++ b/gtk/src/resources.plist @@ -2199,7 +2199,7 @@ <object class="GtkComboBox" id="audio_mix"> <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> - <signal handler="audio_widget_changed_cb" name="changed"/> + <signal handler="audio_mix_changed_cb" name="changed"/> </object> <packing> <property name="left_attach">4</property> |