summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2011-09-24 22:24:42 +0000
committerjstebbins <[email protected]>2011-09-24 22:24:42 +0000
commit00255539943a572592557a66aa2a186de67b5020 (patch)
tree295d5d15ab95f98eaa00e26958ebd91aab166c34
parent6edc65ef71072a5ebc519cecf267dbf457bee2a6 (diff)
LinGui: use hb_*_encoders table to disable options
Which encoders where active for which muxer was hard coded. Now it relies on the information in the encoder tables. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4248 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--gtk/src/hb-backend.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c
index a4034143d..cb06177e0 100644
--- a/gtk/src/hb-backend.c
+++ b/gtk/src/hb-backend.c
@@ -1625,7 +1625,8 @@ ghb_grey_combo_options(signal_user_data_t *ud)
gint mux, track, titleindex, acodec, fallback;
hb_audio_config_t *aconfig = NULL;
GValue *gval;
-
+ int ii;
+
widget = GHB_WIDGET (ud->builder, "title");
gval = ghb_widget_value(widget);
titleindex = ghb_lookup_combo_int("title", gval);
@@ -1683,11 +1684,23 @@ ghb_grey_combo_options(signal_user_data_t *ud)
acodec = ghb_lookup_combo_int("AudioEncoder", gval);
ghb_value_free(gval);
grey_combo_box_item(ud->builder, "AudioMixdown", 0, TRUE);
- if (mux == HB_MUX_MP4)
+ for (ii = 0; ii < hb_audio_encoders_count; ii++)
{
- grey_combo_box_item(ud->builder, "AudioEncoder", HB_ACODEC_VORBIS, TRUE);
- grey_combo_box_item(ud->builder, "AudioEncoderFallback", HB_ACODEC_VORBIS, TRUE);
- grey_combo_box_item(ud->builder, "VideoEncoder", HB_VCODEC_THEORA, TRUE);
+ if (!(mux & hb_audio_encoders[ii].muxers))
+ {
+ grey_combo_box_item(ud->builder, "AudioEncoder",
+ hb_audio_encoders[ii].encoder, TRUE);
+ grey_combo_box_item(ud->builder, "AudioEncoderFallback",
+ hb_audio_encoders[ii].encoder, TRUE);
+ }
+ }
+ for (ii = 0; ii < hb_video_encoders_count; ii++)
+ {
+ if (!(mux & hb_video_encoders[ii].muxers))
+ {
+ grey_combo_box_item(ud->builder, "VideoEncoder",
+ hb_video_encoders[ii].encoder, TRUE);
+ }
}
gboolean allow_mono = TRUE;