summaryrefslogtreecommitdiffstats
path: root/cmds
diff options
context:
space:
mode:
authorKévin PETIT <kevin.petit@arm.com>2014-02-03 12:35:36 +0000
committerNarayan Kamath <narayan@google.com>2014-02-11 11:40:06 +0000
commit377b2ec9a2885f9b6405b07ba900a9e3f4349c38 (patch)
treeb938e1d75a1beefae86244f287ca22f4a277740d /cmds
parentcdda7bf4d3ca9cad6979374a18dd5be79ea83d80 (diff)
downloadframeworks_av-377b2ec9a2885f9b6405b07ba900a9e3f4349c38.zip
frameworks_av-377b2ec9a2885f9b6405b07ba900a9e3f4349c38.tar.gz
frameworks_av-377b2ec9a2885f9b6405b07ba900a9e3f4349c38.tar.bz2
Make frameworks/av 64-bit compatible
Contains the necessary changes to make frameworks/av build and work on a 64-bit machine. Signed-off-by: Craig Barber <craig.barber@arm.com> Signed-off-by: Kévin PETIT <kevin.petit@arm.com> Signed-off-by: Ashok Bhat <ashok.bhat@arm.com> Signed-off-by: Marcus Oakland <marcus.oakland@arm.com> Change-Id: I725feaae50ed8eee25ca2c947cf15aee1f395c43
Diffstat (limited to 'cmds')
-rw-r--r--cmds/stagefright/codec.cpp7
-rw-r--r--cmds/stagefright/muxer.cpp3
-rw-r--r--cmds/stagefright/recordvideo.cpp3
-rw-r--r--cmds/stagefright/sf2.cpp5
-rw-r--r--cmds/stagefright/stagefright.cpp18
5 files changed, 21 insertions, 15 deletions
diff --git a/cmds/stagefright/codec.cpp b/cmds/stagefright/codec.cpp
index fdfefdf..d125ad1 100644
--- a/cmds/stagefright/codec.cpp
+++ b/cmds/stagefright/codec.cpp
@@ -16,6 +16,7 @@
//#define LOG_NDEBUG 0
#define LOG_TAG "codec"
+#include <inttypes.h>
#include <utils/Log.h>
#include "SimplePlayer.h"
@@ -291,13 +292,13 @@ static int decode(
CHECK_EQ((status_t)OK, state->mCodec->release());
if (state->mIsAudio) {
- printf("track %d: %lld bytes received. %.2f KB/sec\n",
+ printf("track %zu: %" PRId64 " bytes received. %.2f KB/sec\n",
i,
state->mNumBytesDecoded,
state->mNumBytesDecoded * 1E6 / 1024 / elapsedTimeUs);
} else {
- printf("track %d: %lld frames decoded, %.2f fps. %lld bytes "
- "received. %.2f KB/sec\n",
+ printf("track %zu: %" PRId64 " frames decoded, %.2f fps. %" PRId64
+ " bytes received. %.2f KB/sec\n",
i,
state->mNumBuffersDecoded,
state->mNumBuffersDecoded * 1E6 / elapsedTimeUs,
diff --git a/cmds/stagefright/muxer.cpp b/cmds/stagefright/muxer.cpp
index cca33e0..90daea2 100644
--- a/cmds/stagefright/muxer.cpp
+++ b/cmds/stagefright/muxer.cpp
@@ -16,6 +16,7 @@
//#define LOG_NDEBUG 0
#define LOG_TAG "muxer"
+#include <inttypes.h>
#include <utils/Log.h>
#include <binder/ProcessState.h>
@@ -198,7 +199,7 @@ static int muxing(
trackIndexMap.clear();
int64_t elapsedTimeUs = ALooper::GetNowUs() - muxerStartTimeUs;
- fprintf(stderr, "SUCCESS: muxer generate the video in %lld ms\n",
+ fprintf(stderr, "SUCCESS: muxer generate the video in %" PRId64 " ms\n",
elapsedTimeUs / 1000);
return 0;
diff --git a/cmds/stagefright/recordvideo.cpp b/cmds/stagefright/recordvideo.cpp
index c30c122..1d267f9 100644
--- a/cmds/stagefright/recordvideo.cpp
+++ b/cmds/stagefright/recordvideo.cpp
@@ -16,6 +16,7 @@
#include "SineSource.h"
+#include <inttypes.h>
#include <binder/ProcessState.h>
#include <media/stagefright/foundation/ADebug.h>
#include <media/stagefright/AudioPlayer.h>
@@ -312,7 +313,7 @@ int main(int argc, char **argv) {
fprintf(stderr, "record failed: %d\n", err);
return 1;
}
- fprintf(stderr, "encoding %d frames in %lld us\n", nFrames, (end-start)/1000);
+ fprintf(stderr, "encoding %d frames in %" PRId64 " us\n", nFrames, (end-start)/1000);
fprintf(stderr, "encoding speed is: %.2f fps\n", (nFrames * 1E9) / (end-start));
return 0;
}
diff --git a/cmds/stagefright/sf2.cpp b/cmds/stagefright/sf2.cpp
index c817443..b2b9ce5 100644
--- a/cmds/stagefright/sf2.cpp
+++ b/cmds/stagefright/sf2.cpp
@@ -16,6 +16,7 @@
//#define LOG_NDEBUG 0
#define LOG_TAG "sf2"
+#include <inttypes.h>
#include <utils/Log.h>
#include <binder/ProcessState.h>
@@ -183,11 +184,11 @@ protected:
int64_t delayUs = ALooper::GetNowUs() - mStartTimeUs;
if (mDecodeAudio) {
- printf("%lld bytes received. %.2f KB/sec\n",
+ printf("%" PRId64 " bytes received. %.2f KB/sec\n",
mTotalBytesReceived,
mTotalBytesReceived * 1E6 / 1024 / delayUs);
} else {
- printf("%d frames decoded, %.2f fps. %lld bytes "
+ printf("%d frames decoded, %.2f fps. %" PRId64 " bytes "
"received. %.2f KB/sec\n",
mNumOutputBuffersReceived,
mNumOutputBuffersReceived * 1E6 / delayUs,
diff --git a/cmds/stagefright/stagefright.cpp b/cmds/stagefright/stagefright.cpp
index 030bf1b..8efb39e 100644
--- a/cmds/stagefright/stagefright.cpp
+++ b/cmds/stagefright/stagefright.cpp
@@ -22,6 +22,7 @@
#include <stdlib.h>
#include <string.h>
+#include <inttypes.h>
#include "jpeg.h"
#include "SineSource.h"
@@ -89,8 +90,8 @@ static void displayDecodeHistogram(Vector<int64_t> *decodeTimesUs) {
int64_t minUs = decodeTimesUs->itemAt(0);
int64_t maxUs = decodeTimesUs->itemAt(n - 1);
- printf("min decode time %lld us (%.2f secs)\n", minUs, minUs / 1E6);
- printf("max decode time %lld us (%.2f secs)\n", maxUs, maxUs / 1E6);
+ printf("min decode time %" PRId64 " us (%.2f secs)\n", minUs, minUs / 1E6);
+ printf("max decode time %" PRId64 " us (%.2f secs)\n", maxUs, maxUs / 1E6);
size_t counts[100];
for (size_t i = 0; i < 100; ++i) {
@@ -110,7 +111,7 @@ static void displayDecodeHistogram(Vector<int64_t> *decodeTimesUs) {
int64_t slotUs = minUs + (i * (maxUs - minUs) / 100);
double fps = 1E6 / slotUs;
- printf("[%.2f fps]: %d\n", fps, counts[i]);
+ printf("[%.2f fps]: %zu\n", fps, counts[i]);
}
}
@@ -262,7 +263,7 @@ static void playSource(OMXClient *client, sp<MediaSource> &source) {
}
}
- printf("buffer has timestamp %lld us (%.2f secs)\n",
+ printf("buffer has timestamp %" PRId64 " us (%.2f secs)\n",
timestampUs, timestampUs / 1E6);
buffer->release();
@@ -285,7 +286,7 @@ static void playSource(OMXClient *client, sp<MediaSource> &source) {
seekTimeUs = (rand() * (float)durationUs) / RAND_MAX;
options.setSeekTo(seekTimeUs);
- printf("seeking to %lld us (%.2f secs)\n",
+ printf("seeking to %" PRId64 " us (%.2f secs)\n",
seekTimeUs, seekTimeUs / 1E6);
}
}
@@ -388,7 +389,7 @@ static void playSource(OMXClient *client, sp<MediaSource> &source) {
// sizes may be different across decoders.
printf("avg. %.2f KB/sec\n", totalBytes / 1024 * 1E6 / delay);
- printf("decoded a total of %lld bytes\n", totalBytes);
+ printf("decoded a total of %" PRId64 " bytes\n", totalBytes);
}
}
@@ -574,7 +575,8 @@ static void performSeekTest(const sp<MediaSource> &source) {
int64_t timeUs;
CHECK(buffer->meta_data()->findInt64(kKeyTime, &timeUs));
- printf("%lld\t%lld\t%lld\n", seekTimeUs, timeUs, seekTimeUs - timeUs);
+ printf("%" PRId64 "\t%" PRId64 "\t%" PRId64 "\n",
+ seekTimeUs, timeUs, seekTimeUs - timeUs);
buffer->release();
buffer = NULL;
@@ -1071,7 +1073,7 @@ int main(int argc, char **argv) {
int64_t thumbTimeUs;
if (meta->findInt64(kKeyThumbnailTime, &thumbTimeUs)) {
- printf("thumbnailTime: %lld us (%.2f secs)\n",
+ printf("thumbnailTime: %" PRId64 " us (%.2f secs)\n",
thumbTimeUs, thumbTimeUs / 1E6);
}