summaryrefslogtreecommitdiffstats
path: root/include/media/stagefright
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2009-08-20 11:16:40 -0700
committerAndreas Huber <andih@google.com>2009-08-20 11:16:40 -0700
commit7530e9c708275c273c134c36c68179f511c1940e (patch)
treef9b20729ecf6a6f3acdd27ebade2bbae94f50aef /include/media/stagefright
parentbde3caae211e215e4bbfef1a267f8d680efa4764 (diff)
downloadframeworks_av-7530e9c708275c273c134c36c68179f511c1940e.zip
frameworks_av-7530e9c708275c273c134c36c68179f511c1940e.tar.gz
frameworks_av-7530e9c708275c273c134c36c68179f511c1940e.tar.bz2
Dynamically allocate a pair of MemoryHeaps according buffer count/sizes required by the OMX component, respect JPEG compressed size.
Diffstat (limited to 'include/media/stagefright')
-rw-r--r--include/media/stagefright/MetaData.h1
-rw-r--r--include/media/stagefright/OMXCodec.h5
2 files changed, 5 insertions, 1 deletions
diff --git a/include/media/stagefright/MetaData.h b/include/media/stagefright/MetaData.h
index 6ce2581..be60565 100644
--- a/include/media/stagefright/MetaData.h
+++ b/include/media/stagefright/MetaData.h
@@ -45,6 +45,7 @@ enum {
kKeyPlatformPrivate = 'priv',
kKeyDecoderComponent = 'decC',
kKeyBufferID = 'bfID',
+ kKeyCompressedSize = 'cmpS',
};
enum {
diff --git a/include/media/stagefright/OMXCodec.h b/include/media/stagefright/OMXCodec.h
index c8ee255..0b94118 100644
--- a/include/media/stagefright/OMXCodec.h
+++ b/include/media/stagefright/OMXCodec.h
@@ -108,7 +108,7 @@ private:
Vector<CodecSpecificData *> mCodecSpecificData;
size_t mCodecSpecificDataIndex;
- sp<MemoryDealer> mDealer;
+ sp<MemoryDealer> mDealer[2];
State mState;
Vector<BufferInfo> mPortBuffers[2];
@@ -148,6 +148,9 @@ private:
void setImageOutputFormat(
OMX_COLOR_FORMATTYPE format, OMX_U32 width, OMX_U32 height);
+ void setJPEGInputFormat(
+ OMX_U32 width, OMX_U32 height, OMX_U32 compressedSize);
+
status_t allocateBuffers();
status_t allocateBuffersOnPort(OMX_U32 portIndex);