summaryrefslogtreecommitdiffstats
path: root/gtk/src/callbacks.c
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2017-06-02 08:51:21 -0700
committerBradley Sepos <[email protected]>2017-06-13 17:22:11 -0400
commit16cc03076330b23a0e8744ea125db61a5a2bd2e8 (patch)
tree9f3f38746c96dc2d70395f7b02e56aa60ae5d9b0 /gtk/src/callbacks.c
parente018cdea0566e22edf72de4b82a6634c791a90bc (diff)
sync: work-around players with broken edit list support
This adds a preset key AlignAVStart that enables this work-around. When enabled, blank frames are inserted or frames are dropped to force alignment of the initial timestamp of every audio and video stream. Aligning the start times minimizes the impact of broken edit list support in players. Closes #763. Squashed: sync: improve alignment when passthru audio is present presets: enable AlignAVStart for General and Gmail presets LinGui: Improve AlignAVStart tooltip sync: avoid inserting a black frame < nominal frame duration sync: fix start alignment when doing p-to-p encoding sync: add comments
Diffstat (limited to 'gtk/src/callbacks.c')
-rw-r--r--gtk/src/callbacks.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c
index c195a2584..5f7c04b8e 100644
--- a/gtk/src/callbacks.c
+++ b/gtk/src/callbacks.c
@@ -1014,7 +1014,8 @@ update_title_duration(signal_user_data_t *ud)
void ghb_show_container_options(signal_user_data_t *ud)
{
- GtkWidget *w2, *w3;
+ GtkWidget *w1, *w2, *w3;
+ w1 = GHB_WIDGET(ud->builder, "AlignAVStart");
w2 = GHB_WIDGET(ud->builder, "Mp4HttpOptimize");
w3 = GHB_WIDGET(ud->builder, "Mp4iPodCompatible");
@@ -1026,6 +1027,7 @@ void ghb_show_container_options(signal_user_data_t *ud)
gint enc = ghb_settings_video_encoder_codec(ud->settings, "VideoEncoder");
+ gtk_widget_set_visible(w1, (mux->format & HB_MUX_MASK_MP4));
gtk_widget_set_visible(w2, (mux->format & HB_MUX_MASK_MP4));
gtk_widget_set_visible(w3, (mux->format & HB_MUX_MASK_MP4) &&
(enc == HB_VCODEC_X264_8BIT));
@@ -1648,9 +1650,15 @@ container_changed_cb(GtkWidget *widget, signal_user_data_t *ud)
{
g_debug("container_changed_cb ()");
ghb_widget_to_setting(ud->settings, widget);
- const char * mux = ghb_dict_get_string(ud->settings, "FileFormat");
+ const char * mux_id = ghb_dict_get_string(ud->settings, "FileFormat");
GhbValue *dest_dict = ghb_get_job_dest_settings(ud->settings);
- ghb_dict_set_string(dest_dict, "Mux", mux);
+ ghb_dict_set_string(dest_dict, "Mux", mux_id);
+
+ const hb_container_t *mux = ghb_lookup_container_by_name(mux_id);
+ if (!(mux->format & HB_MUX_MASK_MP4))
+ {
+ ghb_ui_update(ud, "AlignAVStart", ghb_boolean_value(FALSE));
+ }
ghb_check_dependency(ud, widget, NULL);
ghb_show_container_options(ud);