summaryrefslogtreecommitdiffstats
path: root/gtk/src/callbacks.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2013-06-30 20:44:21 +0000
committerjstebbins <[email protected]>2013-06-30 20:44:21 +0000
commitba3674603258b9bd9662af2b8f2225f9e9395ca1 (patch)
tree69cf3e5d77d21f07a57554ae5d1dd2bfa78e7f8b /gtk/src/callbacks.c
parentd6fcba15d04322d3b6495cae70b813be5c3243b4 (diff)
libhb: add experimental avformat muxer for mkv and mp4
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5620 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/callbacks.c')
-rw-r--r--gtk/src/callbacks.c43
1 files changed, 30 insertions, 13 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c
index fed28a22a..603c23fc4 100644
--- a/gtk/src/callbacks.c
+++ b/gtk/src/callbacks.c
@@ -1280,12 +1280,41 @@ update_acodec_combo(signal_user_data_t *ud)
ghb_grey_combo_options (ud);
}
+static void
+set_visible(GtkWidget *widget, gboolean visible)
+{
+ if (visible)
+ {
+ gtk_widget_show_now(widget);
+ }
+ else
+ {
+ gtk_widget_hide(widget);
+ }
+}
+
+static void show_container_options(signal_user_data_t *ud)
+{
+ GtkWidget *w1, *w2, *w3;
+ w1 = GHB_WIDGET(ud->builder, "Mp4LargeFile");
+ w2 = GHB_WIDGET(ud->builder, "Mp4HttpOptimize");
+ w3 = GHB_WIDGET(ud->builder, "Mp4iPodCompatible");
+
+ gint mux = ghb_settings_combo_int(ud->settings, "FileFormat");
+ gint enc = ghb_settings_combo_int(ud->settings, "VideoEncoder");
+
+ set_visible(w1, (mux == HB_MUX_MP4V2));
+ set_visible(w2, (mux & HB_MUX_MASK_MP4));
+ set_visible(w3, (mux & HB_MUX_MASK_MP4) && (enc == HB_VCODEC_X264));
+}
+
G_MODULE_EXPORT void
container_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
{
g_debug("container_changed_cb ()");
ghb_widget_to_setting(ud->settings, widget);
ghb_check_dependency(ud, widget, NULL);
+ show_container_options(ud);
update_acodec_combo(ud);
ghb_update_destination_extension(ud);
ghb_clear_presets_selection(ud);
@@ -1879,6 +1908,7 @@ vcodec_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
ghb_widget_to_setting(ud->settings, widget);
ghb_check_dependency(ud, widget, NULL);
+ show_container_options(ud);
ghb_clear_presets_selection(ud);
ghb_live_reset(ud);
ghb_vquality_range(ud, &vqmin, &vqmax, &step, &page, &digits, &inverted);
@@ -3361,19 +3391,6 @@ ghb_log_cb(GIOChannel *source, GIOCondition cond, gpointer data)
return TRUE;
}
-static void
-set_visible(GtkWidget *widget, gboolean visible)
-{
- if (visible)
- {
- gtk_widget_show_now(widget);
- }
- else
- {
- gtk_widget_hide(widget);
- }
-}
-
G_MODULE_EXPORT void
show_activity_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud)
{