summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authoraarti jadhav-gaikwad <agaikwad@nvidia.com>2014-08-05 17:39:51 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-08-05 17:39:51 +0000
commitdd49ca9c117b75afe70f78b6d458eaece2952bf7 (patch)
treeb3e7755f5cd94eb4a26f3cbb846e8f8fa2cc28a4 /media
parent043bdaaf5affbc51cf87e29fadd47e2e05630ae8 (diff)
parentccad786f3497f223cbc5af981b08b460433ee622 (diff)
downloadframeworks_av-dd49ca9c117b75afe70f78b6d458eaece2952bf7.zip
frameworks_av-dd49ca9c117b75afe70f78b6d458eaece2952bf7.tar.gz
frameworks_av-dd49ca9c117b75afe70f78b6d458eaece2952bf7.tar.bz2
am ccad786f: stagefright: Pass audio aac subformats in offloadinfo
* commit 'ccad786f3497f223cbc5af981b08b460433ee622': stagefright: Pass audio aac subformats in offloadinfo
Diffstat (limited to 'media')
-rw-r--r--media/libmediaplayerservice/nuplayer/NuPlayer.cpp9
-rw-r--r--media/libstagefright/Utils.cpp5
2 files changed, 14 insertions, 0 deletions
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
index 58d0138..29f57d6 100644
--- a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
+++ b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
@@ -749,6 +749,15 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) {
ALOGV("Mime \"%s\" mapped to audio_format 0x%x",
mime.c_str(), audioFormat);
+ int32_t aacProfile = -1;
+ if (audioFormat == AUDIO_FORMAT_AAC
+ && format->findInt32("aac-profile", &aacProfile)) {
+ // Redefine AAC format as per aac profile
+ mapAACProfileToAudioFormat(
+ audioFormat,
+ aacProfile);
+ }
+
flags |= AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD;
offloadInfo.duration_us = -1;
diff --git a/media/libstagefright/Utils.cpp b/media/libstagefright/Utils.cpp
index 587e264..5f1d1c6 100644
--- a/media/libstagefright/Utils.cpp
+++ b/media/libstagefright/Utils.cpp
@@ -135,6 +135,11 @@ status_t convertMetaDataToMessage(
if (meta->findInt32(kKeyIsADTS, &isADTS)) {
msg->setInt32("is-adts", true);
}
+
+ int32_t aacProfile = -1;
+ if (meta->findInt32(kKeyAACAOT, &aacProfile)) {
+ msg->setInt32("aac-profile", aacProfile);
+ }
}
int32_t maxInputSize;