Loading cmds/screenrecord/Overlay.cpp +5 −4 Original line number Diff line number Diff line Loading @@ -14,6 +14,10 @@ * limitations under the License. */ #include <assert.h> #include <inttypes.h> #include <stdlib.h> #define LOG_TAG "ScreenRecord" //#define LOG_NDEBUG 0 #include <utils/Log.h> Loading @@ -27,9 +31,6 @@ #include <GLES2/gl2.h> #include <GLES2/gl2ext.h> #include <stdlib.h> #include <assert.h> #include "screenrecord.h" #include "Overlay.h" #include "TextRenderer.h" Loading Loading @@ -235,7 +236,7 @@ void Overlay::processFrame_l() { char textBuf[64]; getTimeString_l(monotonicNsec, textBuf, sizeof(textBuf)); String8 timeStr(String8::format("%s f=%lld (%zd)", String8 timeStr(String8::format("%s f=%" PRId64 " (%zd)", textBuf, frameNumber, mTotalDroppedFrames)); mTextRenderer.drawString(mTexProgram, Program::kIdentity, 0, 0, timeStr); Loading cmds/screenrecord/TextRenderer.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -353,6 +353,6 @@ char* TextRenderer::breakString(const char* str, float maxWidth) const { } } ALOGV("goodPos=%d for str='%s'", goodPos, str); ALOGV("goodPos=%zu for str='%s'", goodPos, str); return const_cast<char*>(str + goodPos); } cmds/screenrecord/screenrecord.cpp +16 −15 Original line number Diff line number Diff line Loading @@ -14,6 +14,19 @@ * limitations under the License. */ #include <assert.h> #include <ctype.h> #include <fcntl.h> #include <inttypes.h> #include <getopt.h> #include <signal.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/wait.h> #include <termios.h> #include <unistd.h> #define LOG_TAG "ScreenRecord" #define ATRACE_TAG ATRACE_TAG_GRAPHICS //#define LOG_NDEBUG 0 Loading @@ -36,18 +49,6 @@ #include <media/stagefright/MediaMuxer.h> #include <media/ICrypto.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <stdio.h> #include <ctype.h> #include <fcntl.h> #include <signal.h> #include <getopt.h> #include <sys/wait.h> #include <termios.h> #include <assert.h> #include "screenrecord.h" #include "Overlay.h" #include "FrameOutput.h" Loading Loading @@ -354,7 +355,7 @@ static status_t runEncoder(const sp<MediaCodec>& encoder, case NO_ERROR: // got a buffer if ((flags & MediaCodec::BUFFER_FLAG_CODECCONFIG) != 0) { ALOGV("Got codec config buffer (%u bytes)", size); ALOGV("Got codec config buffer (%zu bytes)", size); if (muxer != NULL) { // ignore this -- we passed the CSD into MediaMuxer when // we got the format change notification Loading @@ -362,7 +363,7 @@ static status_t runEncoder(const sp<MediaCodec>& encoder, } } if (size != 0) { ALOGV("Got data in buffer %d, size=%d, pts=%lld", ALOGV("Got data in buffer %zu, size=%zu, pts=%" PRId64, bufIndex, size, ptsUsec); { // scope Loading Loading @@ -473,7 +474,7 @@ static status_t runEncoder(const sp<MediaCodec>& encoder, ALOGV("Encoder stopping (req=%d)", gStopRequested); if (gVerbose) { printf("Encoder stopping; recorded %u frames in %lld seconds\n", printf("Encoder stopping; recorded %u frames in %" PRId64 " seconds\n", debugNumFrames, nanoseconds_to_seconds( systemTime(CLOCK_MONOTONIC) - startWhenNsec)); } Loading Loading
cmds/screenrecord/Overlay.cpp +5 −4 Original line number Diff line number Diff line Loading @@ -14,6 +14,10 @@ * limitations under the License. */ #include <assert.h> #include <inttypes.h> #include <stdlib.h> #define LOG_TAG "ScreenRecord" //#define LOG_NDEBUG 0 #include <utils/Log.h> Loading @@ -27,9 +31,6 @@ #include <GLES2/gl2.h> #include <GLES2/gl2ext.h> #include <stdlib.h> #include <assert.h> #include "screenrecord.h" #include "Overlay.h" #include "TextRenderer.h" Loading Loading @@ -235,7 +236,7 @@ void Overlay::processFrame_l() { char textBuf[64]; getTimeString_l(monotonicNsec, textBuf, sizeof(textBuf)); String8 timeStr(String8::format("%s f=%lld (%zd)", String8 timeStr(String8::format("%s f=%" PRId64 " (%zd)", textBuf, frameNumber, mTotalDroppedFrames)); mTextRenderer.drawString(mTexProgram, Program::kIdentity, 0, 0, timeStr); Loading
cmds/screenrecord/TextRenderer.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -353,6 +353,6 @@ char* TextRenderer::breakString(const char* str, float maxWidth) const { } } ALOGV("goodPos=%d for str='%s'", goodPos, str); ALOGV("goodPos=%zu for str='%s'", goodPos, str); return const_cast<char*>(str + goodPos); }
cmds/screenrecord/screenrecord.cpp +16 −15 Original line number Diff line number Diff line Loading @@ -14,6 +14,19 @@ * limitations under the License. */ #include <assert.h> #include <ctype.h> #include <fcntl.h> #include <inttypes.h> #include <getopt.h> #include <signal.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/wait.h> #include <termios.h> #include <unistd.h> #define LOG_TAG "ScreenRecord" #define ATRACE_TAG ATRACE_TAG_GRAPHICS //#define LOG_NDEBUG 0 Loading @@ -36,18 +49,6 @@ #include <media/stagefright/MediaMuxer.h> #include <media/ICrypto.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <stdio.h> #include <ctype.h> #include <fcntl.h> #include <signal.h> #include <getopt.h> #include <sys/wait.h> #include <termios.h> #include <assert.h> #include "screenrecord.h" #include "Overlay.h" #include "FrameOutput.h" Loading Loading @@ -354,7 +355,7 @@ static status_t runEncoder(const sp<MediaCodec>& encoder, case NO_ERROR: // got a buffer if ((flags & MediaCodec::BUFFER_FLAG_CODECCONFIG) != 0) { ALOGV("Got codec config buffer (%u bytes)", size); ALOGV("Got codec config buffer (%zu bytes)", size); if (muxer != NULL) { // ignore this -- we passed the CSD into MediaMuxer when // we got the format change notification Loading @@ -362,7 +363,7 @@ static status_t runEncoder(const sp<MediaCodec>& encoder, } } if (size != 0) { ALOGV("Got data in buffer %d, size=%d, pts=%lld", ALOGV("Got data in buffer %zu, size=%zu, pts=%" PRId64, bufIndex, size, ptsUsec); { // scope Loading Loading @@ -473,7 +474,7 @@ static status_t runEncoder(const sp<MediaCodec>& encoder, ALOGV("Encoder stopping (req=%d)", gStopRequested); if (gVerbose) { printf("Encoder stopping; recorded %u frames in %lld seconds\n", printf("Encoder stopping; recorded %u frames in %" PRId64 " seconds\n", debugNumFrames, nanoseconds_to_seconds( systemTime(CLOCK_MONOTONIC) - startWhenNsec)); } Loading