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

Commit cf47b026 authored by Kodi Obika's avatar Kodi Obika Committed by android-build-merger
Browse files

Merge "Added trace event to screenrecord" am: e9239dbe am: 1dd33eac am: ea826c6e

am: 5f6132f7

Change-Id: I8c4b582568f740c953e588f1e2194aedd549fb70
parents 50f1e17d 5f6132f7
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -368,6 +368,7 @@ static status_t runEncoder(const sp<MediaCodec>& encoder,
    int64_t startWhenNsec = systemTime(CLOCK_MONOTONIC);
    int64_t endWhenNsec = startWhenNsec + seconds_to_nanoseconds(gTimeLimitSec);
    DisplayInfo mainDpyInfo;
    bool firstFrame = true;

    assert((rawFp == NULL && muxer != NULL) || (rawFp != NULL && muxer == NULL));

@@ -384,6 +385,11 @@ static status_t runEncoder(const sp<MediaCodec>& encoder,
        int64_t ptsUsec;
        uint32_t flags;

        if (firstFrame) {
            ATRACE_NAME("first_frame");
            firstFrame = false;
        }

        if (systemTime(CLOCK_MONOTONIC) > endWhenNsec) {
            if (gVerbose) {
                printf("Time limit reached\n");