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

Commit 44aedd13 authored by hkuang's avatar hkuang Committed by Automerger Merge Worker
Browse files

transcoding: Set codec default complexity to be 1. am: 326fd062

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/av/+/15403973

Change-Id: I9bb4bbb560303d0e1cf6877cc314d24d3e579023
parents 81e9c79d 326fd062
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -50,6 +50,8 @@ static constexpr int32_t kDefaultCodecPriority = 1;
static constexpr int32_t kDefaultBitrateMbps = 10 * 1000 * 1000;
static constexpr int32_t kDefaultBitrateMbps = 10 * 1000 * 1000;
// Default frame rate.
// Default frame rate.
static constexpr int32_t kDefaultFrameRate = 30;
static constexpr int32_t kDefaultFrameRate = 30;
// Default codec complexity
static constexpr int32_t kDefaultCodecComplexity = 1;


template <typename T>
template <typename T>
void VideoTrackTranscoder::BlockingQueue<T>::push(T const& value, bool front) {
void VideoTrackTranscoder::BlockingQueue<T>::push(T const& value, bool front) {
@@ -247,6 +249,7 @@ media_status_t VideoTrackTranscoder::configureDestinationFormat(


    SetDefaultFormatValueInt32(AMEDIAFORMAT_KEY_PRIORITY, encoderFormat, kDefaultCodecPriority);
    SetDefaultFormatValueInt32(AMEDIAFORMAT_KEY_PRIORITY, encoderFormat, kDefaultCodecPriority);
    SetDefaultFormatValueInt32(AMEDIAFORMAT_KEY_FRAME_RATE, encoderFormat, kDefaultFrameRate);
    SetDefaultFormatValueInt32(AMEDIAFORMAT_KEY_FRAME_RATE, encoderFormat, kDefaultFrameRate);
    SetDefaultFormatValueInt32(AMEDIAFORMAT_KEY_COMPLEXITY, encoderFormat, kDefaultCodecComplexity);
    AMediaFormat_setInt32(encoderFormat, AMEDIAFORMAT_KEY_COLOR_FORMAT, kColorFormatSurface);
    AMediaFormat_setInt32(encoderFormat, AMEDIAFORMAT_KEY_COLOR_FORMAT, kColorFormatSurface);


    // Always encode without rotation. The rotation degree will be transferred directly to
    // Always encode without rotation. The rotation degree will be transferred directly to