summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/include
diff options
context:
space:
mode:
authorWonsik Kim <wonsik@google.com>2015-04-13 10:59:06 +0900
committerWonsik Kim <wonsik@google.com>2015-05-20 21:58:54 +0900
commit540006666b4191cd78391378f1c66c21bcf0c4cd (patch)
tree78f7893bb1716c7f6cfffab681f75394fcc173b7 /media/libstagefright/include
parent6267b539d0d1ee7118aafd976d75cb8db397bc24 (diff)
downloadframeworks_av-540006666b4191cd78391378f1c66c21bcf0c4cd.zip
frameworks_av-540006666b4191cd78391378f1c66c21bcf0c4cd.tar.gz
frameworks_av-540006666b4191cd78391378f1c66c21bcf0c4cd.tar.bz2
Implement seek for MPEG2TSExtractor
TODO: Use bandwidth-based estimation to seek forward long period. Bug: 20126845 Change-Id: I5e2f90784a9ce0dce348715dfcfc4f83ee196170
Diffstat (limited to 'media/libstagefright/include')
-rw-r--r--media/libstagefright/include/MPEG2TSExtractor.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/media/libstagefright/include/MPEG2TSExtractor.h b/media/libstagefright/include/MPEG2TSExtractor.h
index 4dd340c..8eb8f6c 100644
--- a/media/libstagefright/include/MPEG2TSExtractor.h
+++ b/media/libstagefright/include/MPEG2TSExtractor.h
@@ -20,7 +20,9 @@
#include <media/stagefright/foundation/ABase.h>
#include <media/stagefright/MediaExtractor.h>
+#include <media/stagefright/MediaSource.h>
#include <utils/threads.h>
+#include <utils/KeyedVector.h>
#include <utils/Vector.h>
namespace android {
@@ -54,10 +56,21 @@ private:
Vector<sp<AnotherPacketSource> > mSourceImpls;
+ Vector<KeyedVector<int64_t, off64_t> > mSyncPoints;
+ // Sync points used for seeking --- normally one for video track is used.
+ // If no video track is present, audio track will be used instead.
+ KeyedVector<int64_t, off64_t> *mSeekSyncPoints;
+
off64_t mOffset;
void init();
status_t feedMore();
+ status_t seek(int64_t seekTimeUs,
+ const MediaSource::ReadOptions::SeekMode& seekMode);
+ status_t queueDiscontinuityForSeek(int64_t actualSeekTimeUs);
+ status_t seekBeyond(int64_t seekTimeUs);
+
+ status_t feedUntilBufferAvailable(const sp<AnotherPacketSource> &impl);
DISALLOW_EVIL_CONSTRUCTORS(MPEG2TSExtractor);
};