summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/ACodec.cpp
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2015-11-18 16:42:19 -0800
committerSteve Kondik <steve@cyngn.com>2015-11-23 17:08:28 -0800
commit186221ad96a20d975cfb41a91023cfde37e95872 (patch)
treeb796376df5f13979af034eaba8898bb06eebeeaa /media/libstagefright/ACodec.cpp
parent25c999ffe823890b1e0c86f64ee427e4ecae1c39 (diff)
downloadframeworks_av-186221ad96a20d975cfb41a91023cfde37e95872.zip
frameworks_av-186221ad96a20d975cfb41a91023cfde37e95872.tar.gz
frameworks_av-186221ad96a20d975cfb41a91023cfde37e95872.tar.bz2
stagefright: Don't break the ABI in ACodec
* Qualcomm's proprietary extension is doing some seriously bad stuff. This is not going to be fun to maintain. Change-Id: I7d9d709e7a1dfb3107a4c3ae7b2f15ddaa0fab74
Diffstat (limited to 'media/libstagefright/ACodec.cpp')
-rw-r--r--media/libstagefright/ACodec.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp
index eddd7ba..7f6bcb1 100644
--- a/media/libstagefright/ACodec.cpp
+++ b/media/libstagefright/ACodec.cpp
@@ -2020,7 +2020,7 @@ status_t ACodec::configureCodec(
} else {
int32_t bitsPerSample = 16;
msg->findInt32("bit-width", &bitsPerSample);
- err = setupRawAudioFormat(
+ err = setupRawAudioFormatInternal(
encoder ? kPortIndexInput : kPortIndexOutput,
sampleRate,
numChannels, bitsPerSample);
@@ -2140,7 +2140,7 @@ status_t ACodec::configureCodec(
} else {
int32_t bitsPerSample = 16;
msg->findInt32("bit-width", &bitsPerSample);
- err = setupRawAudioFormat(kPortIndexInput, sampleRate, numChannels, bitsPerSample);
+ err = setupRawAudioFormatInternal(kPortIndexInput, sampleRate, numChannels, bitsPerSample);
}
} else if (!strncmp(mComponentName.c_str(), "OMX.google.", 11)
&& !strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_AC3)) {
@@ -2481,7 +2481,7 @@ status_t ACodec::setupAACCodec(
status_t ACodec::setupAC3Codec(
bool encoder, int32_t numChannels, int32_t sampleRate, int32_t bitsPerSample) {
- status_t err = setupRawAudioFormat(
+ status_t err = setupRawAudioFormatInternal(
encoder ? kPortIndexInput : kPortIndexOutput, sampleRate, numChannels, bitsPerSample);
if (err != OK) {
@@ -2519,7 +2519,7 @@ status_t ACodec::setupAC3Codec(
status_t ACodec::setupEAC3Codec(
bool encoder, int32_t numChannels, int32_t sampleRate, int32_t bitsPerSample) {
- status_t err = setupRawAudioFormat(
+ status_t err = setupRawAudioFormatInternal(
encoder ? kPortIndexInput : kPortIndexOutput, sampleRate, numChannels, bitsPerSample);
if (err != OK) {
@@ -2666,6 +2666,11 @@ status_t ACodec::setupFlacCodec(
}
status_t ACodec::setupRawAudioFormat(
+ OMX_U32 portIndex, int32_t sampleRate, int32_t numChannels) {
+ return setupRawAudioFormatInternal(portIndex, sampleRate, numChannels, 16);
+}
+
+status_t ACodec::setupRawAudioFormatInternal(
OMX_U32 portIndex, int32_t sampleRate, int32_t numChannels, int32_t bitsPerSample) {
OMX_PARAM_PORTDEFINITIONTYPE def;
InitOMXParams(&def);