diff options
author | James Dong <jdong@google.com> | 2010-04-21 16:14:15 -0700 |
---|---|---|
committer | James Dong <jdong@google.com> | 2010-05-05 11:34:43 -0700 |
commit | 13aec890216948b0c364f8f92792129d0335f506 (patch) | |
tree | 73b6a98aa3a58fc4091129448561403098acb218 /include/media/stagefright/MPEG4Writer.h | |
parent | aa9ca29395eebfcfa64e070dc71009b99131769f (diff) | |
download | frameworks_av-13aec890216948b0c364f8f92792129d0335f506.zip frameworks_av-13aec890216948b0c364f8f92792129d0335f506.tar.gz frameworks_av-13aec890216948b0c364f8f92792129d0335f506.tar.bz2 |
Support audio and video track interleaving in the recorded mp4 file
Change-Id: Ifa27eb23ee265f84fe06773b29b0eb2b0b075b60
Diffstat (limited to 'include/media/stagefright/MPEG4Writer.h')
-rw-r--r-- | include/media/stagefright/MPEG4Writer.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/media/stagefright/MPEG4Writer.h b/include/media/stagefright/MPEG4Writer.h index 6b93f19..27d0f50 100644 --- a/include/media/stagefright/MPEG4Writer.h +++ b/include/media/stagefright/MPEG4Writer.h @@ -49,6 +49,8 @@ public: void writeFourcc(const char *fourcc); void write(const void *data, size_t size); void endBox(); + uint32_t interleaveDuration() const { return mInterleaveDurationUs; } + status_t setInterleaveDuration(uint32_t duration); protected: virtual ~MPEG4Writer(); @@ -59,14 +61,19 @@ private: FILE *mFile; off_t mOffset; off_t mMdatOffset; + uint32_t mInterleaveDurationUs; Mutex mLock; List<Track *> mTracks; List<off_t> mBoxes; - off_t addSample(MediaBuffer *buffer); - off_t addLengthPrefixedSample(MediaBuffer *buffer); + void lock(); + void unlock(); + + // Acquire lock before calling these methods + off_t addSample_l(MediaBuffer *buffer); + off_t addLengthPrefixedSample_l(MediaBuffer *buffer); MPEG4Writer(const MPEG4Writer &); MPEG4Writer &operator=(const MPEG4Writer &); |