summaryrefslogtreecommitdiffstats
path: root/gtk/src/hb-backend.c
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2019-07-31 10:59:25 -0700
committerJohn Stebbins <[email protected]>2019-08-11 15:36:40 -0700
commitcc33883b8a62e501d33c716f1e805601744d744f (patch)
treeebbec5d763cd5ccb693873d94ff12627eef9c2a2 /gtk/src/hb-backend.c
parent6125d196cacf967e90ab499327dbcb83588778c1 (diff)
libhb: make source audio track name available to frontends
It gets stored in new hb_audio_config_t.in.name field. It is available in the title dict read through hb_title_to_dict() or hb_title_to_json() in AudioList[].Name. When a job is initialized with hb_preset_job_init or hb_preset_job_init_json(), output audio tracks are initialized with the source track name. Also adds output track name initialization to LinGui.
Diffstat (limited to 'gtk/src/hb-backend.c')
-rw-r--r--gtk/src/hb-backend.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c
index e5d4fe54a..9f842ee89 100644
--- a/gtk/src/hb-backend.c
+++ b/gtk/src/hb-backend.c
@@ -1268,19 +1268,17 @@ ghb_grey_combo_options(signal_user_data_t *ud)
acodec = ghb_settings_audio_encoder_codec(ud->settings, "AudioEncoder");
gint64 layout = aconfig != NULL ? aconfig->in.channel_layout : ~0;
+ guint32 in_codec = aconfig != NULL ? aconfig->in.codec : 0;
fallback = ghb_select_fallback(ud->settings, acodec);
gint copy_mask = ghb_get_copy_mask(ud->settings);
- acodec = ghb_select_audio_codec(mux->format, aconfig, acodec,
+ acodec = ghb_select_audio_codec(mux->format, in_codec, acodec,
fallback, copy_mask);
grey_mix_opts(ud, acodec, layout);
}
gint
-ghb_get_best_mix(hb_audio_config_t *aconfig, gint acodec, gint mix)
+ghb_get_best_mix(uint64_t layout, gint acodec, gint mix)
{
- gint layout;
- layout = aconfig ? aconfig->in.channel_layout : AV_CH_LAYOUT_5POINT1;
-
if (mix == HB_AMIXDOWN_NONE)
mix = HB_INVALID_AMIXDOWN;