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

Commit 76289e4f authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Address minor stylistic issues" into udc-dev

parents d6046eef de012f12
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -247,9 +247,9 @@ static const char *kFreezeEventCount = "android.media.mediacodec.freeze.count";
static const char *kFreezeEventAvgDurationMs = "android.media.mediacodec.freeze.avg-duration-ms";
static const char *kFreezeEventAvgDistanceMs = "android.media.mediacodec.freeze.avg-distance-ms";
static const char *kFreezeEventDetailsDurationMs =
        "android.media.mediacodec.freeze.detail-duration-ms";
        "android.media.mediacodec.freeze.details-duration-ms";
static const char *kFreezeEventDetailsDistanceMs =
        "android.media.mediacodec.freeze.detail-distance-ms";
        "android.media.mediacodec.freeze.details-distance-ms";
// Judder event
static const char *kCodecJudderEventCount = "android.media.mediacodec.judder-event-count";
static const char *kJudderEventKeyName = "judder";
@@ -259,11 +259,11 @@ static const char *kJudderEventCount = "android.media.mediacodec.judder.count";
static const char *kJudderEventAvgScore = "android.media.mediacodec.judder.avg-score";
static const char *kJudderEventAvgDistanceMs = "android.media.mediacodec.judder.avg-distance-ms";
static const char *kJudderEventDetailsActualDurationUs =
        "android.media.mediacodec.judder.detail-actual-duration-us";
        "android.media.mediacodec.judder.details-actual-duration-us";
static const char *kJudderEventDetailsContentDurationUs =
        "android.media.mediacodec.judder.detail-content-duration-us";
        "android.media.mediacodec.judder.details-content-duration-us";
static const char *kJudderEventDetailsDistanceMs =
        "android.media.mediacodec.judder.detail-distance-ms";
        "android.media.mediacodec.judder.details-distance-ms";

// XXX suppress until we get our representation right
static bool kEmitHistogram = false;
@@ -1445,7 +1445,7 @@ void MediaCodec::updateEphemeralMediametrics(mediametrics_handle_t item) {

static std::string emitVector(std::vector<int32_t> vector) {
    std::ostringstream sstr;
    for (int i = 0; i < vector.size(); ++i) {
    for (size_t i = 0; i < vector.size(); ++i) {
        if (i != 0) {
            sstr << ',';
        }
+8 −2
Original line number Diff line number Diff line
@@ -414,6 +414,9 @@ void VideoRenderQualityTracker::processFreeze(int64_t actualRenderTimeUs, int64_
            e.count = 0;
            e.details.durationMs.clear();
            e.details.distanceMs.clear();
        // The first occurrence in the event should not have the distance recorded as part of the
        // event, because it belongs in a vacuum between two events. However we still want the
        // distance recorded in the details to calculate times in all details in all events.
        } else if (distanceMs != -1) {
            e.durationMs += distanceMs;
            e.sumDistanceMs += distanceMs;
@@ -423,7 +426,7 @@ void VideoRenderQualityTracker::processFreeze(int64_t actualRenderTimeUs, int64_
        e.sumDurationMs += durationMs;
        if (e.details.durationMs.size() < c.freezeEventDetailsMax) {
            e.details.durationMs.push_back(durationMs);
            e.details.distanceMs.push_back(distanceMs);
            e.details.distanceMs.push_back(distanceMs); // -1 for first detail in the first event
        }
    }
}
@@ -513,6 +516,9 @@ void VideoRenderQualityTracker::processJudder(int32_t judderScore, int64_t judde
            e.details.contentRenderDurationUs.clear();
            e.details.actualRenderDurationUs.clear();
            e.details.distanceMs.clear();
        // The first occurrence in the event should not have the distance recorded as part of the
        // event, because it belongs in a vacuum between two events. However we still want the
        // distance recorded in the details to calculate the times using all details in all events.
        } else if (distanceMs != -1) {
            e.durationMs += distanceMs;
            e.sumDistanceMs += distanceMs;
@@ -523,7 +529,7 @@ void VideoRenderQualityTracker::processJudder(int32_t judderScore, int64_t judde
        if (e.details.contentRenderDurationUs.size() < c.judderEventDetailsMax) {
            e.details.actualRenderDurationUs.push_back(actualDurationUs[1]);
            e.details.contentRenderDurationUs.push_back(contentDurationUs[1]);
            e.details.distanceMs.push_back(distanceMs);
            e.details.distanceMs.push_back(distanceMs); // -1 for first detail in the first event
        }
    }
}
+2 −4
Original line number Diff line number Diff line
@@ -174,9 +174,8 @@ public:
            // The distance between the beginning of this freeze and the end of the previous freeze.
            std::vector<int32_t> distanceMs;
        };
        FreezeEvent() : valid(false) {}
        // Whether or not the data in this structure is valid.
        bool valid;
        bool valid = false;
        // The time at which the first freeze for this event was detected.
        int64_t initialTimeUs;
        // The total duration from the beginning of the first freeze to the end of the last freeze
@@ -203,9 +202,8 @@ public:
            // The distance from this judder occurrence and the previous judder occurrence.
            std::vector<int32_t> distanceMs;
        };
        JudderEvent() : valid(false) {}
        // Whether or not the data in this structure is valid.
        bool valid;
        bool valid = false;
        // The time at which the first judder occurrence for this event was detected.
        int64_t initialTimeUs;
        // The total duration from the first judder occurrence to the last judder occurrence in this