diff options
author | SathishKumar Mani <smani@codeaurora.org> | 2015-08-13 11:01:56 -0700 |
---|---|---|
committer | Satish Kamuju <skamuj@codeaurora.org> | 2015-10-06 17:33:13 +0530 |
commit | 9079a349be70e7c7a5fa8e5bf98be22eeb054db7 (patch) | |
tree | 3dfff72ba11fb3bc3687a8c3558969d16228be70 /media/libstagefright | |
parent | 68ec69bc44e7d362a3f88fec3459654b270f86cd (diff) | |
download | frameworks_av-9079a349be70e7c7a5fa8e5bf98be22eeb054db7.zip frameworks_av-9079a349be70e7c7a5fa8e5bf98be22eeb054db7.tar.gz frameworks_av-9079a349be70e7c7a5fa8e5bf98be22eeb054db7.tar.bz2 |
audio: add support for HW AAC encoder
Add support for HW AAC encoder by including it in the list of
available encoders and use it for encoding only if system
property 'qcom.hw.aac.encoder' is set
Change-Id: I08279fb077f4675736ed76d26c2681a2d1776aab
Diffstat (limited to 'media/libstagefright')
-rw-r--r-- | media/libstagefright/MediaCodecSource.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/media/libstagefright/MediaCodecSource.cpp b/media/libstagefright/MediaCodecSource.cpp index b91660a..ac25683 100644 --- a/media/libstagefright/MediaCodecSource.cpp +++ b/media/libstagefright/MediaCodecSource.cpp @@ -401,10 +401,14 @@ status_t MediaCodecSource::initEncoder() { } AString outputMIME; + AString role; CHECK(mOutputFormat->findString("mime", &outputMIME)); - - mEncoder = MediaCodec::CreateByType( + if (AVUtils::get()->useQCHWEncoder(mOutputFormat, role)) { + mEncoder = MediaCodec::CreateByComponentName(mCodecLooper, role.c_str()); + } else { + mEncoder = MediaCodec::CreateByType( mCodecLooper, outputMIME.c_str(), true /* encoder */); + } if (mEncoder == NULL) { return NO_INIT; |