From afde4e56566af19b36f1fe5e7aa7f226bf1703dd Mon Sep 17 00:00:00 2001 From: ztenghui Date: Fri, 22 Feb 2013 14:32:59 -0800 Subject: Clean up the native code to match Java update 1. Add flags to match the java side change. 2. Update the interface. bug:7991013 Change-Id: I8ffe84c466b2a68e2e1e48b35b78db9e44640265 --- include/media/stagefright/MediaMuxer.h | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/media/stagefright/MediaMuxer.h b/include/media/stagefright/MediaMuxer.h index 27a141e..167d0d9 100644 --- a/include/media/stagefright/MediaMuxer.h +++ b/include/media/stagefright/MediaMuxer.h @@ -40,11 +40,25 @@ struct MPEG4Writer; // deleting the output file after stop. struct MediaMuxer : public RefBase { public: + // Please update media/java/android/media/MediaMuxer.java if the + // SampleFlags is updated. + enum SampleFlags { + SAMPLE_FLAG_SYNC = 1, + }; + + // Please update media/java/android/media/MediaMuxer.java if the + // OutputFormat is updated. + enum OutputFormat { + OUTPUT_FORMAT_MPEG_4 = 0, + OUTPUT_FORMAT_LIST_END // must be last - used to validate format type + }; + // Construct the muxer with the output file path. - MediaMuxer(const char* pathOut); + MediaMuxer(const char *path, OutputFormat format); + // Construct the muxer with the file descriptor. Note that the MediaMuxer // will close this file at stop(). - MediaMuxer(int fd); + MediaMuxer(int fd, OutputFormat format); virtual ~MediaMuxer(); @@ -94,6 +108,7 @@ private: Mutex mMuxerLock; enum State { + UNINITED, INITED, STARTED, STOPPED -- cgit v1.1