diff options
author | Andreas Huber <andih@google.com> | 2010-10-12 14:17:45 -0700 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2010-10-12 16:05:23 -0700 |
commit | 59b7dc39ea8332d3418a599e51447d7edb612ac4 (patch) | |
tree | 30d77dd5cca3f58b3902df86e7df1dab42abc0f2 /include | |
parent | 2bc940b4f961e588459c83862b2c6bea314a4027 (diff) | |
download | frameworks_av-59b7dc39ea8332d3418a599e51447d7edb612ac4.zip frameworks_av-59b7dc39ea8332d3418a599e51447d7edb612ac4.tar.gz frameworks_av-59b7dc39ea8332d3418a599e51447d7edb612ac4.tar.bz2 |
Support for writing to MPEG2 transport stream files.
Change-Id: If3b7a807bc224a4b1cb2236537c3ebdc5aee0d97
Diffstat (limited to 'include')
-rw-r--r-- | include/media/mediarecorder.h | 3 | ||||
-rw-r--r-- | include/media/stagefright/MPEG2TSWriter.h | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/include/media/mediarecorder.h b/include/media/mediarecorder.h index 291b18a..5ab1640 100644 --- a/include/media/mediarecorder.h +++ b/include/media/mediarecorder.h @@ -76,6 +76,9 @@ enum output_format { /* Stream over a socket, limited to a single stream */ OUTPUT_FORMAT_RTP_AVP = 7, + /* H.264/AAC data encapsulated in MPEG2/TS */ + OUTPUT_FORMAT_MPEG2TS = 8, + OUTPUT_FORMAT_LIST_END // must be last - used to validate format type }; diff --git a/include/media/stagefright/MPEG2TSWriter.h b/include/media/stagefright/MPEG2TSWriter.h index 551ca01..f2c6505 100644 --- a/include/media/stagefright/MPEG2TSWriter.h +++ b/include/media/stagefright/MPEG2TSWriter.h @@ -25,7 +25,10 @@ namespace android { +struct ABuffer; + struct MPEG2TSWriter : public MediaWriter { + MPEG2TSWriter(int fd); MPEG2TSWriter(const char *filename); virtual status_t addSource(const sp<MediaSource> &source); @@ -59,6 +62,8 @@ private: int64_t mNumTSPacketsWritten; int64_t mNumTSPacketsBeforeMeta; + void init(); + void writeTS(); void writeProgramAssociationTable(); void writeProgramMap(); |