Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8dc4ee85 authored by Hangyu Kuang's avatar Hangyu Kuang Committed by Android (Google) Code Review
Browse files

Merge "media: Add 3gp output format to MediaMuxer."

parents a2db0cb9 49dcfd20
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ public:
    enum OutputFormat {
        OUTPUT_FORMAT_MPEG_4      = 0,
        OUTPUT_FORMAT_WEBM        = 1,
        OUTPUT_FORMAT_THREE_GPP   = 2,
        OUTPUT_FORMAT_LIST_END // must be last - used to validate format type
    };

+3 −3
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ namespace android {
MediaMuxer::MediaMuxer(int fd, OutputFormat format)
    : mFormat(format),
      mState(UNINITIALIZED) {
    if (format == OUTPUT_FORMAT_MPEG_4) {
    if (format == OUTPUT_FORMAT_MPEG_4 || format == OUTPUT_FORMAT_THREE_GPP) {
        mWriter = new MPEG4Writer(fd);
    } else if (format == OUTPUT_FORMAT_WEBM) {
        mWriter = new WebmWriter(fd);
@@ -108,8 +108,8 @@ status_t MediaMuxer::setLocation(int latitude, int longitude) {
        ALOGE("setLocation() must be called before start().");
        return INVALID_OPERATION;
    }
    if (mFormat != OUTPUT_FORMAT_MPEG_4) {
        ALOGE("setLocation() is only supported for .mp4 output.");
    if (mFormat != OUTPUT_FORMAT_MPEG_4 && mFormat != OUTPUT_FORMAT_THREE_GPP) {
        ALOGE("setLocation() is only supported for .mp4 pr .3gp output.");
        return INVALID_OPERATION;
    }