summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/media/stagefright/MediaSource.h13
-rw-r--r--include/media/stagefright/OMXCodec.h1
-rw-r--r--include/media/stagefright/foundation/ALooper.h4
3 files changed, 17 insertions, 1 deletions
diff --git a/include/media/stagefright/MediaSource.h b/include/media/stagefright/MediaSource.h
index a31395ed9509..dafc621a991a 100644
--- a/include/media/stagefright/MediaSource.h
+++ b/include/media/stagefright/MediaSource.h
@@ -78,18 +78,31 @@ struct MediaSource : public RefBase {
void clearSeekTo();
bool getSeekTo(int64_t *time_us, SeekMode *mode) const;
+ // Option allows encoder to skip some frames until the specified
+ // time stamp.
+ // To prevent from being abused, when the skipFrame timestamp is
+ // found to be more than 1 second later than the current timestamp,
+ // an error will be returned from read().
+ void clearSkipFrame();
+ bool getSkipFrame(int64_t *timeUs) const;
+ void setSkipFrame(int64_t timeUs);
+
void setLateBy(int64_t lateness_us);
int64_t getLateBy() const;
private:
enum Options {
+ // Bit map
kSeekTo_Option = 1,
+ kSkipFrame_Option = 2,
};
uint32_t mOptions;
int64_t mSeekTimeUs;
SeekMode mSeekMode;
int64_t mLatenessUs;
+
+ int64_t mSkipFrameUntilTimeUs;
};
// Causes this source to suspend pulling data from its upstream source
diff --git a/include/media/stagefright/OMXCodec.h b/include/media/stagefright/OMXCodec.h
index 79e7a2f4fb0b..6c6949b1d5bd 100644
--- a/include/media/stagefright/OMXCodec.h
+++ b/include/media/stagefright/OMXCodec.h
@@ -143,6 +143,7 @@ private:
int64_t mSeekTimeUs;
ReadOptions::SeekMode mSeekMode;
int64_t mTargetTimeUs;
+ int64_t mSkipTimeUs;
MediaBuffer *mLeftOverBuffer;
diff --git a/include/media/stagefright/foundation/ALooper.h b/include/media/stagefright/foundation/ALooper.h
index 194f1fc92529..153ead9a4bd7 100644
--- a/include/media/stagefright/foundation/ALooper.h
+++ b/include/media/stagefright/foundation/ALooper.h
@@ -41,7 +41,9 @@ struct ALooper : public RefBase {
status_t start(
bool runOnCallingThread = false,
- bool canCallJava = false);
+ bool canCallJava = false,
+ int32_t priority = PRIORITY_DEFAULT
+ );
status_t stop();