diff options
author | Rodeo <[email protected]> | 2012-06-18 21:11:48 +0000 |
---|---|---|
committer | Rodeo <[email protected]> | 2012-06-18 21:11:48 +0000 |
commit | fc3e44b2ba28772fa559d39bd57b7a595a83292f (patch) | |
tree | 738449c393dcd8da6edf6881e53353b35e5c47b8 /libhb/sync.c | |
parent | 510564b19b5a6d7ac77091cd02ec9c557941399f (diff) |
libhb: drop HB_INPUT_CH_LAYOUT_*
AV_CH_LAYOUT_* works for us, and as its usage becomes more widespread in libhb, translating between the two formats gets increasingly tedious.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4754 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/sync.c')
-rw-r--r-- | libhb/sync.c | 43 |
1 files changed, 5 insertions, 38 deletions
diff --git a/libhb/sync.c b/libhb/sync.c index af228e03f..181d0acb3 100644 --- a/libhb/sync.c +++ b/libhb/sync.c @@ -948,49 +948,16 @@ static void InitAudio( hb_job_t * job, hb_sync_common_t * common, int i ) c->bit_rate = w->audio->config.in.bitrate; c->sample_rate = w->audio->config.in.samplerate; - c->channels = HB_INPUT_CH_LAYOUT_GET_DISCRETE_COUNT( w->audio->config.in.channel_layout ); + c->channels = av_get_channel_layout_nb_channels(w->audio->config.in.channel_layout); hb_ff_set_sample_fmt( c, codec ); - switch( w->audio->config.in.channel_layout & HB_INPUT_CH_LAYOUT_DISCRETE_NO_LFE_MASK ) + if (w->audio->config.in.channel_layout == AV_CH_LAYOUT_STEREO_DOWNMIX) { - case HB_INPUT_CH_LAYOUT_MONO: - c->channel_layout = AV_CH_LAYOUT_MONO; - break; - - case HB_INPUT_CH_LAYOUT_STEREO: - case HB_INPUT_CH_LAYOUT_DOLBY: - c->channel_layout = AV_CH_LAYOUT_STEREO; - break; - - case HB_INPUT_CH_LAYOUT_3F2R: - c->channel_layout = AV_CH_LAYOUT_5POINT0; - break; - - case HB_INPUT_CH_LAYOUT_3F1R: - c->channel_layout = AV_CH_LAYOUT_4POINT0; - break; - - case HB_INPUT_CH_LAYOUT_3F: - c->channel_layout = AV_CH_LAYOUT_SURROUND; - break; - - case HB_INPUT_CH_LAYOUT_2F1R: - c->channel_layout = AV_CH_LAYOUT_2_1; - break; - - case HB_INPUT_CH_LAYOUT_2F2R: - c->channel_layout = AV_CH_LAYOUT_QUAD; - break; - - default: - c->channel_layout = AV_CH_LAYOUT_STEREO; - hb_log("sync: unrecognized channel layout" ); - break; + c->channel_layout = AV_CH_LAYOUT_STEREO; } - - if ( w->audio->config.in.channel_layout & HB_INPUT_CH_LAYOUT_HAS_LFE ) + else { - c->channel_layout |= AV_CH_LOW_FREQUENCY; + c->channel_layout = w->audio->config.in.channel_layout; } if( hb_avcodec_open( c, codec, NULL, 0 ) < 0 ) |