summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/ACodec.cpp
diff options
context:
space:
mode:
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);