summaryrefslogtreecommitdiffstats
path: root/gtk/src
diff options
context:
space:
mode:
authorRodeo <[email protected]>2014-01-25 23:24:48 +0000
committerRodeo <[email protected]>2014-01-25 23:24:48 +0000
commitd7ad9c9682d83dc8f59bd6ff86d3ec422c1f6adb (patch)
tree2dffccb32b266858c1d52f3d63463e83c049937a /gtk/src
parentebf885ce8a75dd392e2acab9a8a0e29032e05f71 (diff)
decavcodec: DRC support.
Adds DRC support for E-AC-3 audio (as well as any future libavcodec decoders with DRC support). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5995 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src')
-rw-r--r--gtk/src/audiohandler.c32
-rw-r--r--gtk/src/makedeps.py3
2 files changed, 32 insertions, 3 deletions
diff --git a/gtk/src/audiohandler.c b/gtk/src/audiohandler.c
index cdf1d16e3..67e979d14 100644
--- a/gtk/src/audiohandler.c
+++ b/gtk/src/audiohandler.c
@@ -29,6 +29,35 @@ static void ghb_clear_audio_list_ui(GtkBuilder *builder);
static gboolean block_updates = FALSE;
+static void audio_deps(signal_user_data_t *ud)
+{
+ gint track = -1, encoder = 0;
+ hb_audio_config_t *aconfig = NULL;
+ gint titleindex = ghb_settings_combo_int(ud->settings, "title");
+ GValue *asettings = get_selected_asettings(ud);
+
+ if (asettings != NULL)
+ {
+ track = ghb_settings_combo_int(asettings, "AudioTrack");
+ encoder = ghb_settings_combo_int(asettings, "AudioEncoderActual");
+ aconfig = ghb_get_scan_audio_info(titleindex, track);
+ }
+
+ gboolean enable_drc = TRUE;
+ if (aconfig != NULL)
+ {
+ enable_drc = hb_audio_can_apply_drc(aconfig->in.codec,
+ aconfig->in.codec_param, encoder);
+ }
+
+ GtkWidget * widget = GHB_WIDGET(ud->builder, "AudioTrackDRCSlider");
+ gtk_widget_set_sensitive(widget, enable_drc);
+ widget = GHB_WIDGET(ud->builder, "AudioTrackDRCSliderLabel");
+ gtk_widget_set_sensitive(widget, enable_drc);
+ widget = GHB_WIDGET(ud->builder, "AudioTrackDRCValue");
+ gtk_widget_set_sensitive(widget, enable_drc);
+}
+
void
ghb_show_hide_advanced_audio( signal_user_data_t *ud )
{
@@ -731,6 +760,7 @@ audio_codec_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
ghb_adjust_audio_rate_combos(ud);
ghb_grey_combo_options (ud);
ghb_check_dependency(ud, widget, NULL);
+ audio_deps(ud);
prev_acodec = acodec_code;
if (asettings != NULL)
{
@@ -771,6 +801,7 @@ audio_track_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
ghb_adjust_audio_rate_combos(ud);
ghb_check_dependency(ud, widget, NULL);
+ audio_deps(ud);
ghb_grey_combo_options(ud);
asettings = get_selected_asettings(ud);
if (asettings != NULL)
@@ -1117,6 +1148,7 @@ audio_list_selection_changed_cb(GtkTreeSelection *selection, signal_user_data_t
widget = GHB_WIDGET (ud->builder, "audio_remove");
gtk_widget_set_sensitive(widget, FALSE);
}
+ audio_deps(ud);
}
static gboolean
diff --git a/gtk/src/makedeps.py b/gtk/src/makedeps.py
index 6ab44ccd4..c0f791d1c 100644
--- a/gtk/src/makedeps.py
+++ b/gtk/src/makedeps.py
@@ -56,9 +56,6 @@ dep_map = (
DepEntry("AudioEncoderActual", "AudioSamplerate", "copy:mp3|copy:aac|copy:ac3|copy:dts|copy:dtshd", True, False),
DepEntry("AudioEncoderActual", "AudioMixdownLabel", "copy:mp3|copy:aac|copy:ac3|copy:dts|copy:dtshd", True, False),
DepEntry("AudioEncoderActual", "AudioMixdown", "copy:mp3|copy:aac|copy:ac3|copy:dts|copy:dtshd", True, False),
- DepEntry("AudioEncoderActual", "AudioTrackDRCSliderLabel", "copy:mp3|copy:aac|copy:ac3|copy:dts|copy:dtshd", True, False),
- DepEntry("AudioEncoderActual", "AudioTrackDRCSlider", "copy:mp3|copy:aac|copy:ac3|copy:dts|copy:dtshd", True, False),
- DepEntry("AudioEncoderActual", "AudioTrackDRCValue", "copy:mp3|copy:aac|copy:ac3|copy:dts|copy:dtshd", True, False),
DepEntry("AudioEncoderActual", "AudioTrackGainLabel", "copy:mp3|copy:aac|copy:ac3|copy:dts|copy:dtshd", True, False),
DepEntry("AudioEncoderActual", "AudioTrackGain", "copy:mp3|copy:aac|copy:ac3|copy:dts|copy:dtshd", True, False),
DepEntry("AudioEncoderActual", "AudioTrackGainValue", "copy:mp3|copy:aac|copy:ac3|copy:dts|copy:dtshd", True, False),