From 5883d53cf8300d8b13a1a6ef3310d72a55e191c0 Mon Sep 17 00:00:00 2001 From: James Dong Date: Tue, 12 Mar 2013 10:40:20 -0700 Subject: Make limitations of MPEG4Writer explicit o No more than 2 tracks will be supported o No more than one video and/or one audio tracks will be supported o Only take video and/or audio track (for instance, no text tracks) o If there is no track before start() is called, bail out. At the same time, make sure the errors from addSource() report to addTrack(), not to start(). Bug: 7991013 Change-Id: I1ca35aaeb75b5448d75ed2c6c10dd12ecea720ab --- include/media/stagefright/MPEG4Writer.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/media/stagefright/MPEG4Writer.h b/include/media/stagefright/MPEG4Writer.h index 3596b38..88df6b0 100644 --- a/include/media/stagefright/MPEG4Writer.h +++ b/include/media/stagefright/MPEG4Writer.h @@ -35,7 +35,13 @@ public: MPEG4Writer(const char *filename); MPEG4Writer(int fd); + // Limitations + // 1. No more than 2 tracks can be added + // 2. Only video or audio source can be added + // 3. No more than one video and/or one audio source can be added. virtual status_t addSource(const sp &source); + + // Returns INVALID_OPERATION if there is no source or track. virtual status_t start(MetaData *param = NULL); virtual status_t stop() { return reset(); } virtual status_t pause(); -- cgit v1.1