summaryrefslogtreecommitdiff
path: root/cmds/screenrecord/screenrecord.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cmds/screenrecord/screenrecord.cpp')
-rw-r--r--cmds/screenrecord/screenrecord.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmds/screenrecord/screenrecord.cpp b/cmds/screenrecord/screenrecord.cpp
index 7aa655ff37..df2884228d 100644
--- a/cmds/screenrecord/screenrecord.cpp
+++ b/cmds/screenrecord/screenrecord.cpp
@@ -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");