diff options
| author | Ashok Bhat <ashok.bhat@arm.com> | 2013-03-12 10:04:38 +0000 |
|---|---|---|
| committer | David Butcher <david.butcher@arm.com> | 2014-02-06 14:50:50 +0000 |
| commit | 01f8573bc2a850536b02855d483dfe130c050a2f (patch) | |
| tree | 1b712a8427a955debe8e27024150d94050fced7d /tests | |
| parent | f0c3b4edf597c40aae4ea311575f39c8bcf203df (diff) | |
| download | android_frameworks_wilhelm-01f8573bc2a850536b02855d483dfe130c050a2f.tar.gz android_frameworks_wilhelm-01f8573bc2a850536b02855d483dfe130c050a2f.tar.bz2 android_frameworks_wilhelm-01f8573bc2a850536b02855d483dfe130c050a2f.zip | |
AArch64: Minor changes related to 64-bit platform
Changes include
[x] Use %zu for size_t
[x] Use PRId64 to print 64-bit integer value
[x] Use uintptr_t for integer variable used to store address.
Change-Id: I69926cce76b0d645f1abccd584444197a5e40318
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/examples/slesTestDecodeAac.cpp | 18 | ||||
| -rw-r--r-- | tests/mimeUri/slesTestPlayStreamType.cpp | 2 | ||||
| -rw-r--r-- | tests/native-media/jni/native-media-jni.c | 2 | ||||
| -rw-r--r-- | tests/sandbox/intbufq.c | 2 | ||||
| -rw-r--r-- | tests/sandbox/xaplay.c | 4 |
5 files changed, 14 insertions, 14 deletions
diff --git a/tests/examples/slesTestDecodeAac.cpp b/tests/examples/slesTestDecodeAac.cpp index 1a51bb0..92ce5a2 100644 --- a/tests/examples/slesTestDecodeAac.cpp +++ b/tests/examples/slesTestDecodeAac.cpp @@ -263,7 +263,7 @@ SLresult AndroidBufferQueueCallback( } } else if (filelen == 0) { // signal EOS to the decoder rather than just starving it - printf("Enqueue EOS: encoded frames=%u, decoded frames=%u\n", encodedFrames, decodedFrames); + printf("Enqueue EOS: encoded frames=%zu, decoded frames=%zu\n", encodedFrames, decodedFrames); printf("You should now see %u ADTS completion%s followed by 1 EOS completion\n", NB_BUFFERS_IN_ADTS_QUEUE - 1, NB_BUFFERS_IN_ADTS_QUEUE != 2 ? "s" : ""); SLAndroidBufferItem msgEos; @@ -296,13 +296,13 @@ SLresult AndroidBufferQueueCallback( frameStats.sample(framelen); } else { fprintf(stderr, - "partial ADTS frame at EOF discarded; offset=%u, framelen=%u, filelen=%u\n", + "partial ADTS frame at EOF discarded; offset=%zu, framelen=%u, filelen=%zu\n", frame - (unsigned char *) ptr, framelen, filelen); frame += filelen; filelen = 0; } } else { - fprintf(stderr, "corrupt ADTS frame encountered; offset=%u, filelen=%u\n", + fprintf(stderr, "corrupt ADTS frame encountered; offset=%zu, filelen=%zu\n", frame - (unsigned char *) ptr, filelen); frame += filelen; filelen = 0; @@ -391,11 +391,11 @@ void DecPlayCallback( res = (*pCntxt->playItf)->GetDuration(pCntxt->playItf, &duration); ExitOnError(res); if (duration == SL_TIME_UNKNOWN) { - printf("After %u encoded %u decoded frames: position is %u ms, duration is " + printf("After %zu encoded %zu decoded frames: position is %u ms, duration is " "unknown as expected\n", encodedFrames, decodedFrames, position); } else { - printf("After %u encoded %u decoded frames: position is %u ms, duration is " + printf("After %zu encoded %zu decoded frames: position is %u ms, duration is " "surprisingly %u ms\n", encodedFrames, decodedFrames, position, duration); } @@ -780,7 +780,7 @@ void TestDecToBuffQueue( SLObjectItf sl, const char *path, int fd) if (pauseFrame > 0) { if (decodedFrames >= pauseFrame) { pauseFrame = 0; - printf("Pausing after decoded frame %u for 10 seconds\n", decodedFrames); + printf("Pausing after decoded frame %zu for 10 seconds\n", decodedFrames); pthread_mutex_unlock(&eosLock); res = (*playItf)->SetPlayState(playItf, SL_PLAYSTATE_PAUSED); ExitOnError(res); @@ -810,9 +810,9 @@ void TestDecToBuffQueue( SLObjectItf sl, const char *path, int fd) printf("Decode is now finished\n"); pthread_mutex_lock(&eosLock); - printf("Frame counters: encoded=%u decoded=%u\n", encodedFrames, decodedFrames); - printf("Sample counters: encoded=%u decoded=%u\n", encodedSamples, decodedSamples); - printf("Total encode completions received: actual=%u, expected=%u\n", + printf("Frame counters: encoded=%zu decoded=%zu\n", encodedFrames, decodedFrames); + printf("Sample counters: encoded=%zu decoded=%zu\n", encodedSamples, decodedSamples); + printf("Total encode completions received: actual=%zu, expected=%zu\n", totalEncodeCompletions, encodedFrames+1/*EOS*/); pthread_mutex_unlock(&eosLock); diff --git a/tests/mimeUri/slesTestPlayStreamType.cpp b/tests/mimeUri/slesTestPlayStreamType.cpp index 8987c45..2d80be7 100644 --- a/tests/mimeUri/slesTestPlayStreamType.cpp +++ b/tests/mimeUri/slesTestPlayStreamType.cpp @@ -196,7 +196,7 @@ void TestStreamTypeConfiguration( SLObjectItf sl, const char* path, const SLint3 SL_ANDROID_KEY_STREAM_TYPE, &valueSize, NULL); ExitOnError(result); if (valueSize != sizeof(SLint32)) { - fprintf(stderr, "ERROR: size for stream type is %u, should be %u\n", + fprintf(stderr, "ERROR: size for stream type is %u, should be %zu\n", valueSize, sizeof(SLint32)); } result = (*configItf)->GetConfiguration(configItf, diff --git a/tests/native-media/jni/native-media-jni.c b/tests/native-media/jni/native-media-jni.c index 044e51a..520ae3c 100644 --- a/tests/native-media/jni/native-media-jni.c +++ b/tests/native-media/jni/native-media-jni.c @@ -305,7 +305,7 @@ static jboolean enqueueInitialBuffers(jboolean discontinuity) return JNI_FALSE; } assert(1 <= nbRead && nbRead <= NB_BUFFERS); - ALOGV("Initially queueing %u buffers of %u bytes each", nbRead, BUFFER_SIZE); + ALOGV("Initially queueing %zu buffers of %u bytes each", nbRead, BUFFER_SIZE); /* Enqueue the content of our cache before starting to play, we don't want to starve the player */ diff --git a/tests/sandbox/intbufq.c b/tests/sandbox/intbufq.c index e06685f..86bf247 100644 --- a/tests/sandbox/intbufq.c +++ b/tests/sandbox/intbufq.c @@ -168,7 +168,7 @@ int main(int argc, char **argv) set_conio_terminal_mode(); int in_count = 0; - unsigned count = 0; + uintptr_t count = 0; for (;;) { usleep(10000); if (kbhit()) { diff --git a/tests/sandbox/xaplay.c b/tests/sandbox/xaplay.c index a93f982..e889e8a 100644 --- a/tests/sandbox/xaplay.c +++ b/tests/sandbox/xaplay.c @@ -212,7 +212,7 @@ XAresult bufferQueueCallback( XAmillisecond position; result = (*playerPlay)->GetPosition(playerPlay, &position); assert(XA_RESULT_SUCCESS == result); - printf("Position after enqueueing packet %u: %u ms\n", curPacket, position); + printf("Position after enqueueing packet %zu: %u ms\n", curPacket, position); } } if (forceCallbackFailure && (curPacket % 1230 == 0)) { @@ -482,7 +482,7 @@ int main(int argc, char **argv) result = (*playerAndroidBufferQueue)->Enqueue(playerAndroidBufferQueue, NULL, &packets[curPacket], MPEG2TS_PACKET_SIZE * packetsThisBuffer, NULL, 0); if (XA_RESULT_BUFFER_INSUFFICIENT == result) { - printf("Enqueued initial %u packets in %u buffers\n", curPacket - firstPacket, + printf("Enqueued initial %zu packets in %zu buffers\n", curPacket - firstPacket, (curPacket - firstPacket + PACKETS_PER_BUFFER - 1) / PACKETS_PER_BUFFER); break; } |
