summaryrefslogtreecommitdiffstats
path: root/gtk/src
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
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')
-rw-r--r--gtk/src/audiohandler.c2
-rw-r--r--gtk/src/callbacks.c43
-rw-r--r--gtk/src/ghb.ui2
-rw-r--r--gtk/src/hb-backend.c12
-rw-r--r--gtk/src/makedeps.py4
-rw-r--r--gtk/src/queuehandler.c2
6 files changed, 39 insertions, 26 deletions
diff --git a/gtk/src/audiohandler.c b/gtk/src/audiohandler.c
index c25cfe1f3..c90e67239 100644
--- a/gtk/src/audiohandler.c
+++ b/gtk/src/audiohandler.c
@@ -71,7 +71,7 @@ ghb_select_audio_codec(gint mux, hb_audio_config_t *aconfig, gint acodec, gint f
if (enc->codec == fallback &&
!(enc->muxers & mux))
{
- if ( mux == HB_MUX_MKV )
+ if ( mux & HB_MUX_MASK_MKV )
fallback = HB_ACODEC_LAME;
else
fallback = HB_ACODEC_FAAC;
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)
{
diff --git a/gtk/src/ghb.ui b/gtk/src/ghb.ui
index ba8f46856..ad999da0b 100644
--- a/gtk/src/ghb.ui
+++ b/gtk/src/ghb.ui
@@ -1192,7 +1192,7 @@ This setting allows you to synchronize the files.</property>
</object>
<packing>
<property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
+ <property name="y_options"></property>
</packing>
</child>
<child>
diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c
index ace8291b4..0787b26ff 100644
--- a/gtk/src/hb-backend.c
+++ b/gtk/src/hb-backend.c
@@ -4433,7 +4433,7 @@ ghb_validate_video(GValue *settings)
mux = ghb_settings_combo_int(settings, "FileFormat");
vcodec = ghb_settings_combo_int(settings, "VideoEncoder");
- if ((mux == HB_MUX_MP4) && (vcodec == HB_VCODEC_THEORA))
+ if ((mux & HB_MUX_MASK_MP4) && (vcodec == HB_VCODEC_THEORA))
{
// mp4/theora combination is not supported.
message = g_strdup_printf(
@@ -4581,7 +4581,7 @@ ghb_validate_audio(GValue *settings)
{
codec = HB_ACODEC_AC3;
}
- else if (mux == HB_MUX_MKV)
+ else if (mux & HB_MUX_MASK_MKV)
{
codec = HB_ACODEC_LAME;
}
@@ -4594,7 +4594,7 @@ ghb_validate_audio(GValue *settings)
}
gchar *a_unsup = NULL;
gchar *mux_s = NULL;
- if (mux == HB_MUX_MP4)
+ if (mux & HB_MUX_MASK_MP4)
{
mux_s = "MP4";
// mp4/vorbis|DTS combination is not supported.
@@ -4761,7 +4761,7 @@ add_job(hb_handle_t *h, GValue *js, gint unique_id, gint titleindex)
}
job->mux = ghb_settings_combo_int(js, "FileFormat");
- if (job->mux == HB_MUX_MP4)
+ if (job->mux & HB_MUX_MASK_MP4)
{
job->largeFileSize = ghb_settings_get_boolean(js, "Mp4LargeFile");
job->mp4_optimize = ghb_settings_get_boolean(js, "Mp4HttpOptimize");
@@ -4957,12 +4957,12 @@ add_job(hb_handle_t *h, GValue *js, gint unique_id, gint titleindex)
}
job->vcodec = ghb_settings_combo_int(js, "VideoEncoder");
- if ((job->mux == HB_MUX_MP4 ) && (job->vcodec == HB_VCODEC_THEORA))
+ if ((job->mux & HB_MUX_MASK_MP4 ) && (job->vcodec == HB_VCODEC_THEORA))
{
// mp4/theora combination is not supported.
job->vcodec = HB_VCODEC_FFMPEG_MPEG4;
}
- if ((job->vcodec == HB_VCODEC_X264) && (job->mux == HB_MUX_MP4))
+ if ((job->vcodec == HB_VCODEC_X264) && (job->mux & HB_MUX_MASK_MP4))
{
job->ipod_atom = ghb_settings_get_boolean(js, "Mp4iPodCompatible");
}
diff --git a/gtk/src/makedeps.py b/gtk/src/makedeps.py
index 4557732ca..79914ef5f 100644
--- a/gtk/src/makedeps.py
+++ b/gtk/src/makedeps.py
@@ -28,9 +28,6 @@ dep_map = (
DepEntry("VideoFramerate", "VideoFrameratePFR", "source", True, True),
DepEntry("VideoFramerate", "VideoFramerateVFR", "source", False, True),
DepEntry("VideoTwoPass", "VideoTurboTwoPass", "TRUE", False, False),
- DepEntry("FileFormat", "Mp4LargeFile", "mp4", False, True),
- DepEntry("FileFormat", "Mp4HttpOptimize", "mp4", False, True),
- DepEntry("FileFormat", "Mp4iPodCompatible", "mp4", False, True),
DepEntry("PictureDecombDeinterlace", "PictureDeinterlace", "TRUE", True, True),
DepEntry("PictureDecombDeinterlace", "PictureDeinterlaceCustom", "TRUE", True, True),
DepEntry("PictureDecombDeinterlace", "PictureDeinterlaceLabel", "TRUE", True, True),
@@ -50,7 +47,6 @@ dep_map = (
DepEntry("VideoEncoder", "x264_tab", "x264", False, True),
DepEntry("VideoEncoder", "x264VideoSettings", "x264", False, True),
DepEntry("VideoEncoder", "lavc_mpeg4_tab", "ffmpeg|ffmpeg4|ffmpeg2", False, True),
- DepEntry("VideoEncoder", "Mp4iPodCompatible", "x264", False, False),
DepEntry("AudioTrackQualityEnable", "AudioBitrateLabel", "TRUE", True, False),
DepEntry("AudioTrackQualityEnable", "AudioBitrate", "TRUE", True, False),
DepEntry("AudioEncoderActual", "AudioBitrateLabel", "copy:mp3|copy:aac|copy:ac3|copy:dts|copy:dtshd", True, False),
diff --git a/gtk/src/queuehandler.c b/gtk/src/queuehandler.c
index d8d1e18a6..d8b6f6d2c 100644
--- a/gtk/src/queuehandler.c
+++ b/gtk/src/queuehandler.c
@@ -172,7 +172,7 @@ add_to_queue_list(signal_user_data_t *ud, GValue *settings, GtkTreeIter *piter)
g_string_append_printf(str,
"<b>Format:</b> <small>%s Container</small>\n", container);
}
- if (mux == HB_MUX_MP4)
+ if (mux & HB_MUX_MASK_MP4)
{
gboolean ipod, http, large;