summaryrefslogtreecommitdiffstats
path: root/cmds/stagefright
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-08-20 13:58:17 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-08-20 13:58:17 -0700
commitcc4f3424e5b5227d0711ae7d3850a8b903c15a07 (patch)
tree6206eed37830af328aabedc72371691f40ffa915 /cmds/stagefright
parente0616ffb741b64e3bc7a1e3ad9def3d50eee53fd (diff)
parent5c0a9133d2e8049f8952a190df91febf6b92064c (diff)
downloadframeworks_base-cc4f3424e5b5227d0711ae7d3850a8b903c15a07.zip
frameworks_base-cc4f3424e5b5227d0711ae7d3850a8b903c15a07.tar.gz
frameworks_base-cc4f3424e5b5227d0711ae7d3850a8b903c15a07.tar.bz2
Merge change 22092 into eclair
* changes: Dynamically allocate a pair of MemoryHeaps according buffer count/sizes required by the OMX component, respect JPEG compressed size.
Diffstat (limited to 'cmds/stagefright')
-rw-r--r--cmds/stagefright/JPEGSource.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/cmds/stagefright/JPEGSource.cpp b/cmds/stagefright/JPEGSource.cpp
index 338a3d5..a7994ed 100644
--- a/cmds/stagefright/JPEGSource.cpp
+++ b/cmds/stagefright/JPEGSource.cpp
@@ -60,6 +60,7 @@ JPEGSource::JPEGSource(const sp<DataSource> &source)
mHeight(0),
mOffset(0) {
CHECK_EQ(parseJPEG(), OK);
+ CHECK(mSource->getSize(&mSize) == OK);
}
JPEGSource::~JPEGSource() {
@@ -73,10 +74,6 @@ status_t JPEGSource::start(MetaData *) {
return UNKNOWN_ERROR;
}
- if (mSource->getSize(&mSize) != OK) {
- return UNKNOWN_ERROR;
- }
-
mGroup = new MediaBufferGroup;
mGroup->add_buffer(new MediaBuffer(mSize));
@@ -105,6 +102,7 @@ sp<MetaData> JPEGSource::getFormat() {
meta->setCString(kKeyMIMEType, "image/jpeg");
meta->setInt32(kKeyWidth, mWidth);
meta->setInt32(kKeyHeight, mHeight);
+ meta->setInt32(kKeyCompressedSize, mSize);
return meta;
}