summaryrefslogtreecommitdiffstats
path: root/media/ndk
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2014-06-18 16:32:50 -0700
committerMark Salyzyn <salyzyn@google.com>2014-06-26 14:58:26 +0000
commit98f28cde0d5d682956b5e6b119823e7e8d40415b (patch)
treeddb8e589a88578418662405c525d5d9a5621845f /media/ndk
parenta5750e0dad9e90f2195ce36f2c4457fa04b2b83e (diff)
downloadframeworks_av-98f28cde0d5d682956b5e6b119823e7e8d40415b.zip
frameworks_av-98f28cde0d5d682956b5e6b119823e7e8d40415b.tar.gz
frameworks_av-98f28cde0d5d682956b5e6b119823e7e8d40415b.tar.bz2
ndk: 64-bit compile warnings
Change-Id: I214973a97547bf714e56e4596359cb2bd9cdea9c
Diffstat (limited to 'media/ndk')
-rw-r--r--media/ndk/NdkMediaCodec.cpp10
-rw-r--r--media/ndk/NdkMediaExtractor.cpp4
-rw-r--r--media/ndk/NdkMediaFormat.cpp7
3 files changed, 12 insertions, 9 deletions
diff --git a/media/ndk/NdkMediaCodec.cpp b/media/ndk/NdkMediaCodec.cpp
index c5d8858..ed00b72 100644
--- a/media/ndk/NdkMediaCodec.cpp
+++ b/media/ndk/NdkMediaCodec.cpp
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+#include <inttypes.h>
+
//#define LOG_NDEBUG 0
#define LOG_TAG "NdkMediaCodec"
@@ -257,7 +259,7 @@ uint8_t* AMediaCodec_getInputBuffer(AMediaCodec *mData, size_t idx, size_t *out_
if (mData->mCodec->getInputBuffers(&abufs) == 0) {
size_t n = abufs.size();
if (idx >= n) {
- ALOGE("buffer index %d out of range", idx);
+ ALOGE("buffer index %zu out of range", idx);
return NULL;
}
if (out_size != NULL) {
@@ -275,7 +277,7 @@ uint8_t* AMediaCodec_getOutputBuffer(AMediaCodec *mData, size_t idx, size_t *out
if (mData->mCodec->getOutputBuffers(&abufs) == 0) {
size_t n = abufs.size();
if (idx >= n) {
- ALOGE("buffer index %d out of range", idx);
+ ALOGE("buffer index %zu out of range", idx);
return NULL;
}
if (out_size != NULL) {
@@ -345,7 +347,7 @@ media_status_t AMediaCodec_releaseOutputBuffer(AMediaCodec *mData, size_t idx, b
EXPORT
media_status_t AMediaCodec_releaseOutputBufferAtTime(
AMediaCodec *mData, size_t idx, int64_t timestampNs) {
- ALOGV("render @ %lld", timestampNs);
+ ALOGV("render @ %" PRId64, timestampNs);
return translate_error(mData->mCodec->renderOutputBufferAndRelease(idx, timestampNs));
}
@@ -413,7 +415,7 @@ AMediaCodecCryptoInfo *AMediaCodecCryptoInfo_new(
size_t cryptosize = sizeof(AMediaCodecCryptoInfo) + sizeof(size_t) * numsubsamples * 2;
AMediaCodecCryptoInfo *ret = (AMediaCodecCryptoInfo*) malloc(cryptosize);
if (!ret) {
- ALOGE("couldn't allocate %d bytes", cryptosize);
+ ALOGE("couldn't allocate %zu bytes", cryptosize);
return NULL;
}
ret->numsubsamples = numsubsamples;
diff --git a/media/ndk/NdkMediaExtractor.cpp b/media/ndk/NdkMediaExtractor.cpp
index 492e002..970a43c 100644
--- a/media/ndk/NdkMediaExtractor.cpp
+++ b/media/ndk/NdkMediaExtractor.cpp
@@ -133,13 +133,13 @@ AMediaFormat* AMediaExtractor_getTrackFormat(AMediaExtractor *mData, size_t idx)
EXPORT
media_status_t AMediaExtractor_selectTrack(AMediaExtractor *mData, size_t idx) {
- ALOGV("selectTrack(%z)", idx);
+ ALOGV("selectTrack(%zu)", idx);
return translate_error(mData->mImpl->selectTrack(idx));
}
EXPORT
media_status_t AMediaExtractor_unselectTrack(AMediaExtractor *mData, size_t idx) {
- ALOGV("unselectTrack(%z)", idx);
+ ALOGV("unselectTrack(%zu)", idx);
return translate_error(mData->mImpl->unselectTrack(idx));
}
diff --git a/media/ndk/NdkMediaFormat.cpp b/media/ndk/NdkMediaFormat.cpp
index 67dc2c2..a354d58 100644
--- a/media/ndk/NdkMediaFormat.cpp
+++ b/media/ndk/NdkMediaFormat.cpp
@@ -17,6 +17,7 @@
//#define LOG_NDEBUG 0
#define LOG_TAG "NdkMediaFormat"
+#include <inttypes.h>
#include "NdkMediaFormat.h"
@@ -89,21 +90,21 @@ const char* AMediaFormat_toString(AMediaFormat *mData) {
{
int32_t val;
f->findInt32(name, &val);
- ret.appendFormat("int32(%d)", val);
+ ret.appendFormat("int32(%" PRId32 ")", val);
break;
}
case AMessage::kTypeInt64:
{
int64_t val;
f->findInt64(name, &val);
- ret.appendFormat("int64(%lld)", val);
+ ret.appendFormat("int64(%" PRId64 ")", val);
break;
}
case AMessage::kTypeSize:
{
size_t val;
f->findSize(name, &val);
- ret.appendFormat("size_t(%d)", val);
+ ret.appendFormat("size_t(%zu)", val);
break;
}
case AMessage::kTypeFloat: