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

Commit 72a7391a authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 11865526 from dcb1770a to 24Q3-release

Change-Id: I1aec0d13a29c9a8206d8cb420667dd68c4deb2be
parents d39ac400 dcb1770a
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -574,7 +574,7 @@ void CameraManagerGlobal::onStatusChanged(
void CameraManagerGlobal::onStatusChangedLocked(
        const CameraDeviceStatus &status, const std::string &cameraId) {
    if (!validStatus(status)) {
        ALOGE("%s: Invalid status %d", __FUNCTION__, status);
        ALOGE("%s: Invalid status %d", __FUNCTION__, static_cast<int>(status));
        return;
    }

@@ -629,7 +629,7 @@ void CameraManagerGlobal::onStatusChangedLocked(
        const CameraDeviceStatus &status, const std::string& cameraId,
        const std::string& physicalCameraId) {
    if (!validStatus(status)) {
        ALOGE("%s: Invalid status %d", __FUNCTION__, status);
        ALOGE("%s: Invalid status %d", __FUNCTION__, static_cast<int>(status));
        return;
    }

@@ -643,7 +643,8 @@ void CameraManagerGlobal::onStatusChangedLocked(
    if (logicalCamStatus != CameraDeviceStatus::STATUS_PRESENT &&
            logicalCamStatus != CameraDeviceStatus::STATUS_NOT_AVAILABLE) {
        ALOGE("%s: Physical camera id %s status %d change for an invalid logical camera state %d",
                __FUNCTION__, physicalCameraId.c_str(), status, logicalCamStatus);
              __FUNCTION__, physicalCameraId.c_str(), static_cast<int>(status),
              static_cast<int>(logicalCamStatus));
        return;
    }

+16 −7
Original line number Diff line number Diff line
@@ -302,13 +302,6 @@ void VideoRenderQualityTracker::onFrameRendered(int64_t contentTimeUs, int64_t a
        mRenderDurationMs += (actualRenderTimeUs - mLastRenderTimeUs) / 1000;
    }

    // Now that a frame has been rendered, the previously skipped frames can be processed as skipped
    // frames since the app is not skipping them to terminate playback.
    for (int64_t contentTimeUs : mPendingSkippedFrameContentTimeUsList) {
        processMetricsForSkippedFrame(contentTimeUs);
    }
    mPendingSkippedFrameContentTimeUsList = {};

    // We can render a pending queued frame if it's the last frame of the video, so release it
    // immediately.
    if (contentTimeUs == mTunnelFrameQueuedContentTimeUs && mTunnelFrameQueuedContentTimeUs != -1) {
@@ -332,9 +325,25 @@ void VideoRenderQualityTracker::onFrameRendered(int64_t contentTimeUs, int64_t a
                  (long long) contentTimeUs, (long long) nextExpectedFrame.contentTimeUs);
            break;
        }
        // Process all skipped frames before the dropped frame.
        while (!mPendingSkippedFrameContentTimeUsList.empty()) {
            if (mPendingSkippedFrameContentTimeUsList.front() >= nextExpectedFrame.contentTimeUs) {
                break;
            }
            processMetricsForSkippedFrame(mPendingSkippedFrameContentTimeUsList.front());
            mPendingSkippedFrameContentTimeUsList.pop_front();
        }
        processMetricsForDroppedFrame(nextExpectedFrame.contentTimeUs,
                                      nextExpectedFrame.desiredRenderTimeUs);
    }
    // Process all skipped frames before the rendered frame.
    while (!mPendingSkippedFrameContentTimeUsList.empty()) {
        if (mPendingSkippedFrameContentTimeUsList.front() >= nextExpectedFrame.contentTimeUs) {
            break;
        }
        processMetricsForSkippedFrame(mPendingSkippedFrameContentTimeUsList.front());
        mPendingSkippedFrameContentTimeUsList.pop_front();
    }
    processMetricsForRenderedFrame(nextExpectedFrame.contentTimeUs,
                                   nextExpectedFrame.desiredRenderTimeUs, actualRenderTimeUs,
                                   freezeEventOut, judderEventOut);
+1 −1
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@
 *   and single call monitoring differently. See function documentation for
 *   more details.
 * To disable/enable:
 *   - adb shell cmd media.camera set-cameraservice-watchdog [0/1]
 *   - adb shell cmd media.camera set-watchdog [0/1]
 */
#pragma once
#include <chrono>