diff options
author | jstebbins <[email protected]> | 2011-06-07 21:27:02 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2011-06-07 21:27:02 +0000 |
commit | d40287132815adc74a0d1444a1e7b76e89879f69 (patch) | |
tree | 00c95f36cbe47104a7ad40233c93bc588702251f /libhb/work.c | |
parent | e07dec1ec259a52a893642da14856e16085f3c36 (diff) |
libhb: add support for libav aac encoder (libhb only)
This generalizes the ac3 encoder to make it easy to add support
for any audio encoder that libav supports. Since ffaac is not quite
ready, the cli and gui does not expose ffaac yet.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4029 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/work.c')
-rw-r--r-- | libhb/work.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/libhb/work.c b/libhb/work.c index f1db58b81..f0a81fa75 100644 --- a/libhb/work.c +++ b/libhb/work.c @@ -121,6 +121,7 @@ hb_work_object_t * hb_codec_decoder( int codec ) hb_work_object_t * hb_codec_encoder( int codec ) { + hb_work_object_t * w; switch( codec ) { case HB_ACODEC_FAAC: return hb_get_work( WORK_ENCFAAC ); @@ -128,7 +129,18 @@ hb_work_object_t * hb_codec_encoder( int codec ) case HB_ACODEC_VORBIS: return hb_get_work( WORK_ENCVORBIS ); case HB_ACODEC_CA_AAC: return hb_get_work( WORK_ENC_CA_AAC ); case HB_ACODEC_CA_HAAC:return hb_get_work( WORK_ENC_CA_HAAC ); - case HB_ACODEC_AC3: return hb_get_work( WORK_ENCAC3 ); + case HB_ACODEC_FFAAC: + { + w = hb_get_work( WORK_ENCAVCODEC_AUDIO ); + w->codec_param = CODEC_ID_AAC; + return w; + } + case HB_ACODEC_AC3: + { + w = hb_get_work( WORK_ENCAVCODEC_AUDIO ); + w->codec_param = CODEC_ID_AC3; + return w; + } } return NULL; } @@ -371,8 +383,9 @@ void hb_display_job_info( hb_job_t * job ) ( ( audio->config.out.codec == HB_ACODEC_LAME ) ? "lame" : ( ( audio->config.out.codec == HB_ACODEC_CA_AAC ) ? "ca_aac" : ( ( audio->config.out.codec == HB_ACODEC_CA_HAAC ) ? "ca_haac" : + ( ( audio->config.out.codec == HB_ACODEC_FFAAC ) ? "ffaac" : ( ( audio->config.out.codec == HB_ACODEC_AC3 ) ? "ffac3" : - "vorbis" ) ) ) ) ); + "vorbis" ) ) ) ) ) ); hb_log( " + bitrate: %d kbps, samplerate: %d Hz", audio->config.out.bitrate, audio->config.out.samplerate ); } } |