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

Commit ac75e1dd authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge changes Id0c23d90,I38ccd39c

* changes:
  Don't use SDK 31 APIs on APEX
  Fix incorrect use of "# introduced=" tag.
parents c9901ce7 e88c67ff
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -260,7 +260,12 @@ media_status_t VideoTrackTranscoder::configureDestinationFormat(
        return AMEDIA_ERROR_INVALID_PARAMETER;
    }

#if !defined(__ANDROID_APEX__)
    // TODO(jiyong): replace this #ifdef with a __builtin_available check.
    AMediaCodec* encoder = AMediaCodec_createEncoderByTypeForClient(destinationMime, mPid, mUid);
#else
    AMediaCodec* encoder = AMediaCodec_createEncoderByType(destinationMime);
#endif
    if (encoder == nullptr) {
        LOG(ERROR) << "Unable to create encoder for type " << destinationMime;
        return AMEDIA_ERROR_UNSUPPORTED;
@@ -290,7 +295,12 @@ media_status_t VideoTrackTranscoder::configureDestinationFormat(
        return AMEDIA_ERROR_INVALID_PARAMETER;
    }

#if !defined(__ANDROID_APEX__)
    // TODO(jiyong): replace this #ifdef with a __builtin_available check.
    mDecoder = AMediaCodec_createDecoderByTypeForClient(sourceMime, mPid, mUid);
#else
    mDecoder = AMediaCodec_createDecoderByType(sourceMime);
#endif
    if (mDecoder == nullptr) {
        LOG(ERROR) << "Unable to create decoder for type " << sourceMime;
        return AMEDIA_ERROR_UNSUPPORTED;
+4 −0
Original line number Diff line number Diff line
@@ -97,8 +97,12 @@ private:
    BlockingQueue<std::function<void()>> mCodecMessageQueue;
    std::shared_ptr<AMediaFormat> mDestinationFormat;
    std::shared_ptr<AMediaFormat> mActualOutputFormat;
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
    // These could be unused on older platforms
    pid_t mPid;
    uid_t mUid;
#pragma clang diagnostic pop
};

}  // namespace android
+3 −3

File changed.

Contains only whitespace changes.