From 884989c67081190ff864419328e9e81506db67ca Mon Sep 17 00:00:00 2001 From: Mark Salyzyn Date: Wed, 18 Jun 2014 16:30:26 -0700 Subject: screenrecord: 64-bit compile warnings Change-Id: I708e48e24719b2c4bb023069164aafd4c2ad639b --- cmds/screenrecord/Overlay.cpp | 9 +++++---- cmds/screenrecord/TextRenderer.cpp | 2 +- cmds/screenrecord/screenrecord.cpp | 31 ++++++++++++++++--------------- 3 files changed, 22 insertions(+), 20 deletions(-) (limited to 'cmds') diff --git a/cmds/screenrecord/Overlay.cpp b/cmds/screenrecord/Overlay.cpp index c2a8f1b..af84069 100644 --- a/cmds/screenrecord/Overlay.cpp +++ b/cmds/screenrecord/Overlay.cpp @@ -14,6 +14,10 @@ * limitations under the License. */ +#include +#include +#include + #define LOG_TAG "ScreenRecord" //#define LOG_NDEBUG 0 #include @@ -27,9 +31,6 @@ #include #include -#include -#include - #include "screenrecord.h" #include "Overlay.h" #include "TextRenderer.h" @@ -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); diff --git a/cmds/screenrecord/TextRenderer.cpp b/cmds/screenrecord/TextRenderer.cpp index 784055c..6a9176b 100644 --- a/cmds/screenrecord/TextRenderer.cpp +++ b/cmds/screenrecord/TextRenderer.cpp @@ -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(str + goodPos); } diff --git a/cmds/screenrecord/screenrecord.cpp b/cmds/screenrecord/screenrecord.cpp index 02ed53a..02df1d2 100644 --- a/cmds/screenrecord/screenrecord.cpp +++ b/cmds/screenrecord/screenrecord.cpp @@ -14,6 +14,19 @@ * limitations under the License. */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + #define LOG_TAG "ScreenRecord" #define ATRACE_TAG ATRACE_TAG_GRAPHICS //#define LOG_NDEBUG 0 @@ -36,18 +49,6 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include "screenrecord.h" #include "Overlay.h" #include "FrameOutput.h" @@ -354,7 +355,7 @@ static status_t runEncoder(const sp& 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 @@ -362,7 +363,7 @@ static status_t runEncoder(const sp& 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 @@ -473,7 +474,7 @@ static status_t runEncoder(const sp& 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)); } -- cgit v1.1