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

Commit 376e8e85 authored by Brian Lindahl's avatar Brian Lindahl Committed by Automerger Merge Worker
Browse files

Merge "Add last video render time to bug reports" into udc-qpr-dev am: 67f1d595 am: 2825109b

parents 9c36ef5a 2825109b
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -209,6 +209,7 @@ static const char *kCodecShapingEnhanced = "android.media.mediacodec.shaped";
// Render metrics
static const char *kCodecPlaybackDurationSec = "android.media.mediacodec.playback-duration-sec";
static const char *kCodecFirstRenderTimeUs = "android.media.mediacodec.first-render-time-us";
static const char *kCodecLastRenderTimeUs = "android.media.mediacodec.last-render-time-us";
static const char *kCodecFramesReleased = "android.media.mediacodec.frames-released";
static const char *kCodecFramesRendered = "android.media.mediacodec.frames-rendered";
static const char *kCodecFramesDropped = "android.media.mediacodec.frames-dropped";
@@ -1296,6 +1297,7 @@ void MediaCodec::updateMediametrics() {
        const VideoRenderQualityMetrics &m = mVideoRenderQualityTracker.getMetrics();
        if (m.frameReleasedCount > 0) {
            mediametrics_setInt64(mMetricsHandle, kCodecFirstRenderTimeUs, m.firstRenderTimeUs);
            mediametrics_setInt64(mMetricsHandle, kCodecLastRenderTimeUs, m.lastRenderTimeUs);
            mediametrics_setInt64(mMetricsHandle, kCodecFramesReleased, m.frameReleasedCount);
            mediametrics_setInt64(mMetricsHandle, kCodecFramesRendered, m.frameRenderedCount);
            mediametrics_setInt64(mMetricsHandle, kCodecFramesSkipped, m.frameSkippedCount);
+2 −0
Original line number Diff line number Diff line
@@ -455,6 +455,8 @@ void VideoRenderQualityTracker::processMetricsForRenderedFrame(int64_t contentTi
    if (mMetrics.firstRenderTimeUs == 0) {
        mMetrics.firstRenderTimeUs = actualRenderTimeUs;
    }
    // Capture the timestamp at which the last frame was rendered
    mMetrics.lastRenderTimeUs = actualRenderTimeUs;

    mMetrics.frameRenderedCount++;

+3 −0
Original line number Diff line number Diff line
@@ -38,6 +38,9 @@ struct VideoRenderQualityMetrics {
    // The render time of the first video frame.
    int64_t firstRenderTimeUs;

    // The render time of the last video frame.
    int64_t lastRenderTimeUs;

    // The number of frames released to be rendered.
    int64_t frameReleasedCount;