diff options
author | Andreas Huber <andih@google.com> | 2012-05-03 16:08:56 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-05-03 16:08:56 -0700 |
commit | f53c36c6463d899895719b8b17ba45bd2d552cee (patch) | |
tree | 1d0b57eb5c3c1abe836f0a109bdbfbd47f7b3334 /media/libstagefright/ACodec.cpp | |
parent | ef7f379497199148b5694615e75b3fb2bf666a18 (diff) | |
parent | 9806555d3930be43e11106281dee354820ac1c88 (diff) | |
download | frameworks_av-f53c36c6463d899895719b8b17ba45bd2d552cee.zip frameworks_av-f53c36c6463d899895719b8b17ba45bd2d552cee.tar.gz frameworks_av-f53c36c6463d899895719b8b17ba45bd2d552cee.tar.bz2 |
Merge "Respect channel mask in ACodec and NuPlayer." into jb-dev
Diffstat (limited to 'media/libstagefright/ACodec.cpp')
-rw-r--r-- | media/libstagefright/ACodec.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp index 0de2d0a..7d99064 100644 --- a/media/libstagefright/ACodec.cpp +++ b/media/libstagefright/ACodec.cpp @@ -333,7 +333,11 @@ ACodec::ACodec() mNode(NULL), mSentFormat(false), mIsEncoder(false), - mShutdownInProgress(false) { + mShutdownInProgress(false), + mEncoderDelay(0), + mEncoderPadding(0), + mChannelMaskPresent(false), + mChannelMask(0) { mUninitializedState = new UninitializedState(this); mLoadedState = new LoadedState(this); mLoadedToIdleState = new LoadedToIdleState(this); @@ -892,10 +896,17 @@ status_t ACodec::configureCodec( if (!msg->findInt32("encoder-delay", &mEncoderDelay)) { mEncoderDelay = 0; } + if (!msg->findInt32("encoder-padding", &mEncoderPadding)) { mEncoderPadding = 0; } + if (msg->findInt32("channel-mask", &mChannelMask)) { + mChannelMaskPresent = true; + } else { + mChannelMaskPresent = false; + } + int32_t maxInputSize; if (msg->findInt32("max-input-size", &maxInputSize)) { err = setMinBufferSize(kPortIndexInput, (size_t)maxInputSize); @@ -2021,6 +2032,11 @@ void ACodec::sendFormatChange() { mSkipCutBuffer = new SkipCutBuffer(mEncoderDelay * frameSize, mEncoderPadding * frameSize); } + + if (mChannelMaskPresent) { + notify->setInt32("channel-mask", mChannelMask); + } + break; } |