Loading include/media/mediarecorder.h +3 −0 Original line number Diff line number Diff line Loading @@ -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 }; Loading include/media/stagefright/DataSource.h +1 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ public: enum Flags { kWantsPrefetching = 1, kStreamedFromLocalHost = 2, kIsCachingDataSource = 4, }; static sp<DataSource> CreateFromURI( Loading include/media/stagefright/MPEG2TSWriter.h +5 −0 Original line number Diff line number Diff line Loading @@ -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); Loading Loading @@ -59,6 +62,8 @@ private: int64_t mNumTSPacketsWritten; int64_t mNumTSPacketsBeforeMeta; void init(); void writeTS(); void writeProgramAssociationTable(); void writeProgramMap(); Loading media/libmedia/Metadata.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ namespace { // All these constants below must be kept in sync with Metadata.java. enum MetadataId { FIRST_SYSTEM_ID = 1, LAST_SYSTEM_ID = 31, LAST_SYSTEM_ID = 32, FIRST_CUSTOM_ID = 8192 }; Loading media/libmedia/mediarecorder.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -181,7 +181,7 @@ status_t MediaRecorder::setOutputFormat(int of) LOGE("setOutputFormat called in an invalid state: %d", mCurrentState); return INVALID_OPERATION; } if (mIsVideoSourceSet && of >= OUTPUT_FORMAT_AUDIO_ONLY_START && of != OUTPUT_FORMAT_RTP_AVP) { //first non-video output format if (mIsVideoSourceSet && of >= OUTPUT_FORMAT_AUDIO_ONLY_START && of != OUTPUT_FORMAT_RTP_AVP && of != OUTPUT_FORMAT_MPEG2TS) { //first non-video output format LOGE("output format (%d) is meant for audio recording only and incompatible with video recording", of); return INVALID_OPERATION; } Loading Loading
include/media/mediarecorder.h +3 −0 Original line number Diff line number Diff line Loading @@ -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 }; Loading
include/media/stagefright/DataSource.h +1 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ public: enum Flags { kWantsPrefetching = 1, kStreamedFromLocalHost = 2, kIsCachingDataSource = 4, }; static sp<DataSource> CreateFromURI( Loading
include/media/stagefright/MPEG2TSWriter.h +5 −0 Original line number Diff line number Diff line Loading @@ -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); Loading Loading @@ -59,6 +62,8 @@ private: int64_t mNumTSPacketsWritten; int64_t mNumTSPacketsBeforeMeta; void init(); void writeTS(); void writeProgramAssociationTable(); void writeProgramMap(); Loading
media/libmedia/Metadata.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ namespace { // All these constants below must be kept in sync with Metadata.java. enum MetadataId { FIRST_SYSTEM_ID = 1, LAST_SYSTEM_ID = 31, LAST_SYSTEM_ID = 32, FIRST_CUSTOM_ID = 8192 }; Loading
media/libmedia/mediarecorder.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -181,7 +181,7 @@ status_t MediaRecorder::setOutputFormat(int of) LOGE("setOutputFormat called in an invalid state: %d", mCurrentState); return INVALID_OPERATION; } if (mIsVideoSourceSet && of >= OUTPUT_FORMAT_AUDIO_ONLY_START && of != OUTPUT_FORMAT_RTP_AVP) { //first non-video output format if (mIsVideoSourceSet && of >= OUTPUT_FORMAT_AUDIO_ONLY_START && of != OUTPUT_FORMAT_RTP_AVP && of != OUTPUT_FORMAT_MPEG2TS) { //first non-video output format LOGE("output format (%d) is meant for audio recording only and incompatible with video recording", of); return INVALID_OPERATION; } Loading