summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
Diffstat (limited to 'libhb')
-rw-r--r--libhb/common.c1
-rw-r--r--libhb/common.h1
-rw-r--r--libhb/muxmp4.c34
-rw-r--r--libhb/work.c3
4 files changed, 30 insertions, 9 deletions
diff --git a/libhb/common.c b/libhb/common.c
index 073abb977..7cb6ec9a6 100644
--- a/libhb/common.c
+++ b/libhb/common.c
@@ -739,6 +739,7 @@ void hb_audio_config_init(hb_audio_config_t * audiocfg)
audiocfg->out.samplerate = 44100;
audiocfg->out.mixdown = HB_AMIXDOWN_DOLBYPLII;
audiocfg->out.dynamic_range_compression = 0;
+ audiocfg->out.name = NULL;
}
/**********************************************************************
diff --git a/libhb/common.h b/libhb/common.h
index a5cfcf493..47f5503a0 100644
--- a/libhb/common.h
+++ b/libhb/common.h
@@ -329,6 +329,7 @@ struct hb_audio_config_s
int bitrate; /* Output bitrate (kbps) */
int mixdown; /* The mixdown format to be used for this audio track (see HB_AMIXDOWN_*) */
double dynamic_range_compression; /* Amount of DRC that gets applied to this track */
+ char * name; /* Output track name */
} out;
/* Input */
diff --git a/libhb/muxmp4.c b/libhb/muxmp4.c
index febeb0194..807bc24cd 100644
--- a/libhb/muxmp4.c
+++ b/libhb/muxmp4.c
@@ -309,18 +309,36 @@ static int MP4Init( hb_mux_object_t * m )
mux_data->track = MP4AddAC3AudioTrack(
m->file,
m->samplerate, 1536, MP4_MPEG4_AUDIO_TYPE );
- MP4SetTrackBytesProperty(
- m->file, mux_data->track,
- "udta.name.value",
- (const u_int8_t*)"Surround", strlen("Surround"));
+ if (audio->config.out.name == NULL) {
+ MP4SetTrackBytesProperty(
+ m->file, mux_data->track,
+ "udta.name.value",
+ (const u_int8_t*)"Surround", strlen("Surround"));
+ }
+ else {
+ MP4SetTrackBytesProperty(
+ m->file, mux_data->track,
+ "udta.name.value",
+ (const u_int8_t*)(audio->config.out.name),
+ strlen(audio->config.out.name));
+ }
} else {
mux_data->track = MP4AddAudioTrack(
m->file,
m->samplerate, 1024, MP4_MPEG4_AUDIO_TYPE );
- MP4SetTrackBytesProperty(
- m->file, mux_data->track,
- "udta.name.value",
- (const u_int8_t*)"Stereo", strlen("Stereo"));
+ if (audio->config.out.name == NULL) {
+ MP4SetTrackBytesProperty(
+ m->file, mux_data->track,
+ "udta.name.value",
+ (const u_int8_t*)"Stereo", strlen("Stereo"));
+ }
+ else {
+ MP4SetTrackBytesProperty(
+ m->file, mux_data->track,
+ "udta.name.value",
+ (const u_int8_t*)(audio->config.out.name),
+ strlen(audio->config.out.name));
+ }
MP4SetAudioProfileLevel( m->file, 0x0F );
MP4SetTrackESConfiguration(
diff --git a/libhb/work.c b/libhb/work.c
index 64b061718..91da97aea 100644
--- a/libhb/work.c
+++ b/libhb/work.c
@@ -285,7 +285,8 @@ hb_display_job_info( hb_job_t * job )
{
audio = hb_list_item( title->list_audio, i );
- hb_log( " * audio track %d", audio->config.out.track );
+ hb_log( " * audio track %d (%s)", audio->config.out.track,
+ audio->config.out.name ? audio->config.out.name : "no-name" );
hb_log( " + decoder: %s (track %d, id %x)", audio->config.lang.description, audio->config.in.track, audio->id );