summaryrefslogtreecommitdiffstats
path: root/cmds
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2014-06-18 16:30:26 -0700
committerMark Salyzyn <salyzyn@google.com>2014-06-19 13:03:56 -0700
commit884989c67081190ff864419328e9e81506db67ca (patch)
treea46458be5913073f6055e72765607736c3389d8b /cmds
parentab5cdbaf65ca509681d2726aacdf3ac8bfb6b3fa (diff)
downloadframeworks_av-884989c67081190ff864419328e9e81506db67ca.zip
frameworks_av-884989c67081190ff864419328e9e81506db67ca.tar.gz
frameworks_av-884989c67081190ff864419328e9e81506db67ca.tar.bz2
screenrecord: 64-bit compile warnings
Change-Id: I708e48e24719b2c4bb023069164aafd4c2ad639b
Diffstat (limited to 'cmds')
-rw-r--r--cmds/screenrecord/Overlay.cpp9
-rw-r--r--cmds/screenrecord/TextRenderer.cpp2
-rw-r--r--cmds/screenrecord/screenrecord.cpp31
3 files changed, 22 insertions, 20 deletions
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 <assert.h>
+#include <inttypes.h>
+#include <stdlib.h>
+
#define LOG_TAG "ScreenRecord"
//#define LOG_NDEBUG 0
#include <utils/Log.h>
@@ -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"
@@ -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<char*>(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 <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
@@ -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"
@@ -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
@@ -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
@@ -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));
}