summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/MPEG4Extractor.cpp
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2010-01-19 10:39:21 -0800
committerAndreas Huber <andih@google.com>2010-01-19 10:39:21 -0800
commitc57b67905c2128ddadfeca96785ee1f593b6605a (patch)
tree7c7fb1b4cc87520eae2ede9229e7fc78d6e88c3e /media/libstagefright/MPEG4Extractor.cpp
parent97419ed670a12f48a7609673da8ee5dc0376f075 (diff)
downloadframeworks_av-c57b67905c2128ddadfeca96785ee1f593b6605a.zip
frameworks_av-c57b67905c2128ddadfeca96785ee1f593b6605a.tar.gz
frameworks_av-c57b67905c2128ddadfeca96785ee1f593b6605a.tar.bz2
Squashed commit of the following:
commit 6689350d7e4dad6d873c1ed95f0a356e3bfd79d1 Author: Andreas Huber <andih@google.com> Date: Tue Jan 19 09:23:02 2010 -0800 Some tweaks to the SampleIterator. commit 5638bff6d31442a219806445c3106d47b081fcab Author: Andreas Huber <andih@google.com> Date: Fri Jan 15 14:46:29 2010 -0800 A much improved implementation of MPEG4 sample table operations through an iterator.
Diffstat (limited to 'media/libstagefright/MPEG4Extractor.cpp')
-rw-r--r--media/libstagefright/MPEG4Extractor.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/media/libstagefright/MPEG4Extractor.cpp b/media/libstagefright/MPEG4Extractor.cpp
index 07a5a82..0e9900b 100644
--- a/media/libstagefright/MPEG4Extractor.cpp
+++ b/media/libstagefright/MPEG4Extractor.cpp
@@ -232,8 +232,9 @@ sp<MetaData> MPEG4Extractor::getTrackMetaData(
uint32_t sampleIndex;
uint32_t sampleTime;
if (track->sampleTable->findThumbnailSample(&sampleIndex) == OK
- && track->sampleTable->getDecodingTime(
- sampleIndex, &sampleTime) == OK) {
+ && track->sampleTable->getMetaDataForSample(
+ sampleIndex, NULL /* offset */, NULL /* size */,
+ &sampleTime) == OK) {
track->meta->setInt64(
kKeyThumbnailTime,
((int64_t)sampleTime * 1000000) / track->timescale);
@@ -929,20 +930,16 @@ status_t MPEG4Source::read(
if (mBuffer == NULL) {
newBuffer = true;
- status_t err = mSampleTable->getSampleOffsetAndSize(
- mCurrentSampleIndex, &offset, &size);
-
- if (err != OK) {
- return err;
- }
-
- err = mSampleTable->getDecodingTime(mCurrentSampleIndex, &dts);
+ status_t err =
+ mSampleTable->getMetaDataForSample(
+ mCurrentSampleIndex, &offset, &size, &dts);
if (err != OK) {
return err;
}
err = mGroup->acquire_buffer(&mBuffer);
+
if (err != OK) {
CHECK_EQ(mBuffer, NULL);
return err;