diff options
author | Glenn Kasten <gkasten@google.com> | 2014-03-06 08:00:31 -0800 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2014-03-06 08:40:37 -0800 |
commit | ac3e9db88ddb1f24bc6c8fb744a37dfdeec332bb (patch) | |
tree | 7e569cdaab0966b7e3c1c02118361f223fdaaf98 /include/media | |
parent | 7a0662afeba50b78f43ce24539230cace30c3cfd (diff) | |
download | frameworks_av-ac3e9db88ddb1f24bc6c8fb744a37dfdeec332bb.zip frameworks_av-ac3e9db88ddb1f24bc6c8fb744a37dfdeec332bb.tar.gz frameworks_av-ac3e9db88ddb1f24bc6c8fb744a37dfdeec332bb.tar.bz2 |
Add mFrameSize but do not remove mFrameBitShift yet
Change-Id: Icb1edefeb6a0e659503f6b7a92c9d15784df9865
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/nbaio/NBAIO.h | 4 | ||||
-rw-r--r-- | include/media/nbaio/SourceAudioBufferProvider.h | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/include/media/nbaio/NBAIO.h b/include/media/nbaio/NBAIO.h index 56896b9..be91c3a 100644 --- a/include/media/nbaio/NBAIO.h +++ b/include/media/nbaio/NBAIO.h @@ -126,7 +126,8 @@ public: protected: NBAIO_Port(const NBAIO_Format& format) : mNegotiated(false), mFormat(format), - mBitShift(Format_frameBitShift(format)) { } + mBitShift(Format_frameBitShift(format)), + mFrameSize(Format_frameSize(format)) { } virtual ~NBAIO_Port() { } // Implementations are free to ignore these if they don't need them @@ -134,6 +135,7 @@ protected: bool mNegotiated; // mNegotiated implies (mFormat != Format_Invalid) NBAIO_Format mFormat; // (mFormat != Format_Invalid) does not imply mNegotiated size_t mBitShift; // assign in parallel with any assignment to mFormat + size_t mFrameSize; // assign in parallel with any assignment to mFormat }; // Abstract class (interface) representing a non-blocking data sink, for use by a data provider. diff --git a/include/media/nbaio/SourceAudioBufferProvider.h b/include/media/nbaio/SourceAudioBufferProvider.h index cdfb6fe..7357aa5 100644 --- a/include/media/nbaio/SourceAudioBufferProvider.h +++ b/include/media/nbaio/SourceAudioBufferProvider.h @@ -42,6 +42,7 @@ public: private: const sp<NBAIO_Source> mSource; // the wrapped source /*const*/ size_t mFrameBitShift; // log2(frame size in bytes) + /*const*/ size_t mFrameSize; // frame size in bytes void* mAllocated; // pointer to base of allocated memory size_t mSize; // size of mAllocated in frames size_t mOffset; // frame offset within mAllocated of valid data |