summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2010-07-21 10:36:08 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-07-21 10:36:08 -0700
commitef3f986ebeee48af0e8cbfa651260974bbd1ed4d (patch)
treefd724e069bae865cd2f21eb877772f71586084f3 /include
parent2beeb50b1bba9e92f6cacfeca37fe9fa9d36ead1 (diff)
parentabd1f4f870925d6776dbe4b930b759a1ab6595ca (diff)
downloadframeworks_av-ef3f986ebeee48af0e8cbfa651260974bbd1ed4d.zip
frameworks_av-ef3f986ebeee48af0e8cbfa651260974bbd1ed4d.tar.gz
frameworks_av-ef3f986ebeee48af0e8cbfa651260974bbd1ed4d.tar.bz2
Merge "Support finer seek control on MediaSources." into gingerbread
Diffstat (limited to 'include')
-rw-r--r--include/media/stagefright/MediaSource.h12
-rw-r--r--include/media/stagefright/MetaData.h1
-rw-r--r--include/media/stagefright/OMXCodec.h2
3 files changed, 13 insertions, 2 deletions
diff --git a/include/media/stagefright/MediaSource.h b/include/media/stagefright/MediaSource.h
index 9cc94c8..a31395e 100644
--- a/include/media/stagefright/MediaSource.h
+++ b/include/media/stagefright/MediaSource.h
@@ -62,14 +62,21 @@ struct MediaSource : public RefBase {
// a) not request a seek
// b) not be late, i.e. lateness_us = 0
struct ReadOptions {
+ enum SeekMode {
+ SEEK_PREVIOUS_SYNC,
+ SEEK_NEXT_SYNC,
+ SEEK_CLOSEST_SYNC,
+ SEEK_CLOSEST,
+ };
+
ReadOptions();
// Reset everything back to defaults.
void reset();
- void setSeekTo(int64_t time_us);
+ void setSeekTo(int64_t time_us, SeekMode mode = SEEK_CLOSEST_SYNC);
void clearSeekTo();
- bool getSeekTo(int64_t *time_us) const;
+ bool getSeekTo(int64_t *time_us, SeekMode *mode) const;
void setLateBy(int64_t lateness_us);
int64_t getLateBy() const;
@@ -81,6 +88,7 @@ struct MediaSource : public RefBase {
uint32_t mOptions;
int64_t mSeekTimeUs;
+ SeekMode mSeekMode;
int64_t mLatenessUs;
};
diff --git a/include/media/stagefright/MetaData.h b/include/media/stagefright/MetaData.h
index cdbf483..e631c7f 100644
--- a/include/media/stagefright/MetaData.h
+++ b/include/media/stagefright/MetaData.h
@@ -46,6 +46,7 @@ enum {
kKeyIsSyncFrame = 'sync', // int32_t (bool)
kKeyIsCodecConfig = 'conf', // int32_t (bool)
kKeyTime = 'time', // int64_t (usecs)
+ kKeyTargetTime = 'tarT', // int64_t (usecs)
kKeyDuration = 'dura', // int64_t (usecs)
kKeyColorFormat = 'colf',
kKeyPlatformPrivate = 'priv', // pointer
diff --git a/include/media/stagefright/OMXCodec.h b/include/media/stagefright/OMXCodec.h
index 214f43a..79e7a2f 100644
--- a/include/media/stagefright/OMXCodec.h
+++ b/include/media/stagefright/OMXCodec.h
@@ -141,6 +141,8 @@ private:
bool mNoMoreOutputData;
bool mOutputPortSettingsHaveChanged;
int64_t mSeekTimeUs;
+ ReadOptions::SeekMode mSeekMode;
+ int64_t mTargetTimeUs;
MediaBuffer *mLeftOverBuffer;