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

Commit 5f6132f7 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

Change-Id: I2ff9fd706b33c920d0bea42044d7edfbfc49965f
parents e7330ce7 ea826c6e
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line 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 startWhenNsec = systemTime(CLOCK_MONOTONIC);
    int64_t endWhenNsec = startWhenNsec + seconds_to_nanoseconds(gTimeLimitSec);
    int64_t endWhenNsec = startWhenNsec + seconds_to_nanoseconds(gTimeLimitSec);
    DisplayInfo mainDpyInfo;
    DisplayInfo mainDpyInfo;
    bool firstFrame = true;


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


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


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

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