summaryrefslogtreecommitdiffstats
path: root/include
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
commit5c0a9133d2e8049f8952a190df91febf6b92064c (patch)
tree8fa8bed2be04e927b7298a2f1535918d5923fe95 /include
parent1c1629da30bd1b125c59ab9bbcecff3bb3e74324 (diff)
downloadframeworks_base-5c0a9133d2e8049f8952a190df91febf6b92064c.zip
frameworks_base-5c0a9133d2e8049f8952a190df91febf6b92064c.tar.gz
frameworks_base-5c0a9133d2e8049f8952a190df91febf6b92064c.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')
-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);