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

Commit 67f1d595 authored by Brian Lindahl's avatar Brian Lindahl Committed by Android (Google) Code Review
Browse files

Merge "Add last video render time to bug reports" into udc-qpr-dev

parents 77d31f5c 4c88e716
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -210,6 +210,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";
@@ -1168,6 +1169,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;