summaryrefslogtreecommitdiffstats
path: root/include/media/stagefright/MediaSource.h
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2010-07-21 14:51:35 -0700
committerJames Dong <jdong@google.com>2010-07-22 14:51:53 -0700
commit542db5d438988360d491a5add1040a2df9aa90c9 (patch)
tree2780e2456a9b540e245fa3e3c8e62d60c284b8dc /include/media/stagefright/MediaSource.h
parent348a8eab84f4bba76c04ca83b2f5418467aa1a48 (diff)
downloadframeworks_av-542db5d438988360d491a5add1040a2df9aa90c9.zip
frameworks_av-542db5d438988360d491a5add1040a2df9aa90c9.tar.gz
frameworks_av-542db5d438988360d491a5add1040a2df9aa90c9.tar.bz2
Allows the authoring engine to skip frame.
This is 1st part of the work to allow audio and video resync if we found out that audio and video are out of sync during authoring - also fixed a problem in AACEncoder::read() where the buffer acquired from the buffer group does not release when error out at reading from source. Change-Id: I8a2740097fcfdf85e6178869afeb9f3687a99118
Diffstat (limited to 'include/media/stagefright/MediaSource.h')
-rw-r--r--include/media/stagefright/MediaSource.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/media/stagefright/MediaSource.h b/include/media/stagefright/MediaSource.h
index a31395e..dafc621 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