diff options
author | maurj <[email protected]> | 2007-04-12 11:42:51 +0000 |
---|---|---|
committer | maurj <[email protected]> | 2007-04-12 11:42:51 +0000 |
commit | aa88ab8a4f716f88c8c584cd1b98fa76e2bae80b (patch) | |
tree | 5da98c0dfda6a8700bd68773d22d41a2132d2c60 /libhb | |
parent | 51eec61731b2b4b62ac73b94f35cbd3b4d6a758c (diff) |
Updated the Mac GUI to use the new audio mixdowns. This means that the Mac GUI now supports Dolby PRo Logic 2 mixdowns!
The Audio tab now has two mixdown NSPopUpButtons, which are set to display all of the possible mixdowns for the current input audio codec / output audio codec / input audio channel configuration.
A mixdown of HB_AMIXDOWN_DOLBYPLII is used by default (or the next best mixdown if this isn't possible). Ideally this will become a prefs option to specify your choice of default audio mixdown.
For AC3 passthru, a single mixdown of "AC3 Passthru" is displayed.
I've had to update the Xcode project file, to make the Handbrake target look for headers in the "../contrib/include" folder too. This is so that it can find the a52 headers which are now used by Controller.mm.
I've added an ac3flags property to hb_audio_s, to enable us to access the source ac3 flags outside of libhb. This is set in scan.c for each source audio.
I've updated hb_mixdown_s and the hb_audio_mixdowns[] to include the CLI "short name" version of the mixdowns too, ready for the Mac GUI "default mixdown" prefs saving / loading.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@497 b64f7644-9d1e-0410-96f1-a4d463321fa5
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 ), |