summaryrefslogtreecommitdiffstats
path: root/gtk/src/audiohandler.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2008-10-04 01:22:11 +0000
committerjstebbins <[email protected]>2008-10-04 01:22:11 +0000
commit8383924c732d022f1aabe477fd825836feb56320 (patch)
tree8601c850bd583ac38bf75e6ae05ab74a049efd18 /gtk/src/audiohandler.c
parent19d1f541a0ea4c502ca063607a17a38288bcc037 (diff)
LinGui: queue item editing
editing a pending item loads the item's settings and deletes it from the queue editing a finished or running item just loads it's settings git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1806 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/audiohandler.c')
-rw-r--r--gtk/src/audiohandler.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/gtk/src/audiohandler.c b/gtk/src/audiohandler.c
index e6085d304..82d0f6000 100644
--- a/gtk/src/audiohandler.c
+++ b/gtk/src/audiohandler.c
@@ -599,3 +599,49 @@ audio_remove_clicked_cb(GtkWidget *widget, signal_user_data_t *ud)
}
}
+void
+ghb_set_audio(signal_user_data_t *ud, GValue *settings)
+{
+ gint acodec_code;
+ GtkWidget *button;
+
+ GValue *alist;
+ GValue *track, *audio, *acodec, *bitrate, *rate, *mix, *drc;
+ gint count, ii;
+
+ g_debug("set_audio");
+ // Clear the audio list
+ ghb_clear_audio_list(ud);
+ button = GHB_WIDGET (ud->builder, "audio_add");
+ alist = ghb_settings_get_value(settings, "audio_list");
+
+ count = ghb_array_len(alist);
+ for (ii = 0; ii < count; ii++)
+ {
+ audio = ghb_array_get_nth(alist, ii);
+ track = ghb_settings_get_value(audio, "audio_track");
+ acodec = ghb_settings_get_value(audio, "audio_codec");
+ bitrate = ghb_settings_get_value(audio, "audio_bitrate");
+ rate = ghb_settings_get_value(audio, "audio_rate");
+ mix = ghb_settings_get_value(audio, "audio_mix");
+ drc = ghb_settings_get_value(audio, "audio_drc");
+ acodec_code = ghb_lookup_combo_int("audio_codec", acodec);
+
+ if (acodec_code != 0)
+ {
+ // Add to audio list
+ g_signal_emit_by_name(button, "clicked", ud);
+ ghb_ui_update(ud, "audio_track", track);
+ ghb_ui_update(ud, "audio_codec", acodec);
+ if (!ghb_audio_is_passthru (acodec_code))
+ {
+ // This gets set autimatically if the codec is passthru
+ ghb_ui_update(ud, "audio_bitrate", bitrate);
+ ghb_ui_update(ud, "audio_rate", rate);
+ ghb_ui_update(ud, "audio_mix", mix);
+ }
+ ghb_ui_update(ud, "audio_drc", drc);
+ }
+ }
+}
+