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

Commit 084cee38 authored by Cheng Li's avatar Cheng Li Committed by Automerger Merge Worker
Browse files

Merge "Reduce the frequency of calls to get_device_api_level" am: 42afcffc...

Merge "Reduce the frequency of calls to get_device_api_level" am: 42afcffc am: 001ae6fb am: b2561a26

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



Change-Id: I4a85b26b2096c9f031cf00cb975cf441446d2307
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 070e306e b2561a26
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -275,7 +275,8 @@ C2SoftAacDec::C2SoftAacDec(
      mStreamInfo(nullptr),
      mSignalledError(false),
      mOutputPortDelay(kDefaultOutputPortDelay),
      mOutputDelayRingBuffer(nullptr) {
      mOutputDelayRingBuffer(nullptr),
      mDeviceApiLevel(android_get_device_api_level()) {
}

C2SoftAacDec::~C2SoftAacDec() {
@@ -891,7 +892,7 @@ void C2SoftAacDec::process(
            work->worklets.front()->output.configUpdate.push_back(
                    C2Param::Copy(currentBoostFactor));

            if (android_get_device_api_level() < __ANDROID_API_S__) {
            if (mDeviceApiLevel < __ANDROID_API_S__) {
                // We used to report DRC compression mode in the output format
                // in Q and R, but stopped doing that in S
                C2StreamDrcCompressionModeTuning::input currentCompressMode(0u,
+1 −0
Original line number Diff line number Diff line
@@ -97,6 +97,7 @@ private:
    int32_t mOutputDelayRingBufferWritePos;
    int32_t mOutputDelayRingBufferReadPos;
    int32_t mOutputDelayRingBufferFilled;
    int mDeviceApiLevel;
    bool outputDelayRingBufferPutSamples(INT_PCM *samples, int numSamples);
    int32_t outputDelayRingBufferGetSamples(INT_PCM *samples, int numSamples);
    int32_t outputDelayRingBufferSamplesAvailable();