diff options
Diffstat (limited to 'libhb')
-rw-r--r-- | libhb/common.c | 10 | ||||
-rw-r--r-- | libhb/common.h | 4 | ||||
-rw-r--r-- | libhb/scan.c | 5 |
3 files changed, 13 insertions, 6 deletions
diff --git a/libhb/common.c b/libhb/common.c index d0dcef877..e7bc6dbb8 100644 --- a/libhb/common.c +++ b/libhb/common.c @@ -37,11 +37,11 @@ int hb_audio_bitrates_count = sizeof( hb_audio_bitrates ) / int hb_audio_bitrates_default = 8; /* 128 kbps */ hb_mixdown_t hb_audio_mixdowns[] = -{ { "Mono", "HB_AMIXDOWN_MONO", HB_AMIXDOWN_MONO }, - { "Stereo", "HB_AMIXDOWN_STEREO", HB_AMIXDOWN_STEREO }, - { "Dolby Surround", "HB_AMIXDOWN_DOLBY", HB_AMIXDOWN_DOLBY }, - { "Dolby Pro Logic II", "HB_AMIXDOWN_DOLBYPLII", HB_AMIXDOWN_DOLBYPLII }, - { "6-channel discrete", "HB_AMIXDOWN_6CH", HB_AMIXDOWN_6CH } }; +{ { "Mono", "HB_AMIXDOWN_MONO", "mono", HB_AMIXDOWN_MONO }, + { "Stereo", "HB_AMIXDOWN_STEREO", "stereo", HB_AMIXDOWN_STEREO }, + { "Dolby Surround", "HB_AMIXDOWN_DOLBY", "dpl1", HB_AMIXDOWN_DOLBY }, + { "Dolby Pro Logic II", "HB_AMIXDOWN_DOLBYPLII", "dpl2", HB_AMIXDOWN_DOLBYPLII }, + { "6-channel discrete", "HB_AMIXDOWN_6CH", "6ch", HB_AMIXDOWN_6CH } }; int hb_audio_mixdowns_count = sizeof( hb_audio_mixdowns ) / sizeof( hb_mixdown_t ); diff --git a/libhb/common.h b/libhb/common.h index 4934063e5..3ed8f7791 100644 --- a/libhb/common.h +++ b/libhb/common.h @@ -75,6 +75,7 @@ struct hb_mixdown_s { char * human_readable_name; char * internal_name; + char * short_name; int amixdown; }; @@ -271,6 +272,9 @@ struct hb_audio_s int src_discrete_lfe_channels; int src_encoded_front_channels; int src_encoded_rear_channels; + + /* ac3flags is only set when the source audio format is HB_ACODEC_AC3 */ + int ac3flags; #ifdef __LIBHB__ /* Internal data */ diff --git a/libhb/scan.c b/libhb/scan.c index 9e9f9542a..4f28bac6d 100644 --- a/libhb/scan.c +++ b/libhb/scan.c @@ -524,10 +524,13 @@ static void LookForAC3( hb_title_t * title, hb_buffer_t * b ) audio->src_discrete_lfe_channels = 0; } - /* store the AC3 FLAGS for future reference + /* store the AC3 flags for future reference This enables us to find out if we had a stereo or Dolby source later on */ audio->config.a52.ac3flags = flags; + /* store the ac3 flags in the public ac3flags property too, so we can access it from the GUI */ + audio->ac3flags = audio->config.a52.ac3flags; + /* XXX */ if ( (flags & A52_CHANNEL_MASK) == A52_DOLBY ) { sprintf( audio->lang + strlen( audio->lang ), |