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

Commit ea826c6e 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

Change-Id: I561e64cf886ccde29112f471e657ccada46858f0
parents b84f0142 1dd33eac
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");