From 377b2ec9a2885f9b6405b07ba900a9e3f4349c38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20PETIT?= Date: Mon, 3 Feb 2014 12:35:36 +0000 Subject: Make frameworks/av 64-bit compatible MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Contains the necessary changes to make frameworks/av build and work on a 64-bit machine. Signed-off-by: Craig Barber Signed-off-by: Kévin PETIT Signed-off-by: Ashok Bhat Signed-off-by: Marcus Oakland Change-Id: I725feaae50ed8eee25ca2c947cf15aee1f395c43 --- libvideoeditor/lvpp/VideoEditorAudioPlayer.cpp | 5 +++-- libvideoeditor/vss/src/M4DECODER_Null.c | 2 +- .../vss/stagefrightshells/src/VideoEditorUtils.cpp | 20 ++++++++++---------- 3 files changed, 14 insertions(+), 13 deletions(-) (limited to 'libvideoeditor') diff --git a/libvideoeditor/lvpp/VideoEditorAudioPlayer.cpp b/libvideoeditor/lvpp/VideoEditorAudioPlayer.cpp index 176f8e9..e503936 100755 --- a/libvideoeditor/lvpp/VideoEditorAudioPlayer.cpp +++ b/libvideoeditor/lvpp/VideoEditorAudioPlayer.cpp @@ -671,8 +671,9 @@ size_t VideoEditorAudioPlayer::fillBuffer(void *data, size_t size) { M4OSA_Void* ptr; - ptr = (M4OSA_Void*)((unsigned int)mInputBuffer->data() + - mInputBuffer->range_offset()); + ptr = reinterpret_cast( + reinterpret_cast(mInputBuffer->data()) + + mInputBuffer->range_offset()); M4OSA_UInt32 len = mInputBuffer->range_length(); M4OSA_Context fp = M4OSA_NULL; diff --git a/libvideoeditor/vss/src/M4DECODER_Null.c b/libvideoeditor/vss/src/M4DECODER_Null.c index a0dad30..ce260e5 100755 --- a/libvideoeditor/vss/src/M4DECODER_Null.c +++ b/libvideoeditor/vss/src/M4DECODER_Null.c @@ -210,7 +210,7 @@ M4OSA_ERR M4DECODER_NULL_setOption(M4OSA_Context context, break; case M4DECODER_kOptionID_EnableYuvWithEffect: - pStreamContext->bYuvWithEffectSet = (M4OSA_Bool)pValue; + pStreamContext->bYuvWithEffectSet = (M4OSA_Bool)(intptr_t)pValue; break; case M4DECODER_kOptionID_YuvWithEffectNonContiguous: diff --git a/libvideoeditor/vss/stagefrightshells/src/VideoEditorUtils.cpp b/libvideoeditor/vss/stagefrightshells/src/VideoEditorUtils.cpp index 5a7237d..d264a2e 100755 --- a/libvideoeditor/vss/stagefrightshells/src/VideoEditorUtils.cpp +++ b/libvideoeditor/vss/stagefrightshells/src/VideoEditorUtils.cpp @@ -84,17 +84,17 @@ void displayMetaData(const sp meta) { LOG1("displayMetaData kKeyBitRate %d", int32Data); } if (meta->findData(kKeyESDS, &type, &data, &size)) { - LOG1("displayMetaData kKeyESDS type=%d size=%d", type, size); + LOG1("displayMetaData kKeyESDS type=%d size=%zu", type, size); } if (meta->findData(kKeyAVCC, &type, &data, &size)) { - LOG1("displayMetaData kKeyAVCC data=0x%X type=%d size=%d", + LOG1("displayMetaData kKeyAVCC data=0x%X type=%d size=%zu", *((unsigned int*)data), type, size); } if (meta->findData(kKeyVorbisInfo, &type, &data, &size)) { - LOG1("displayMetaData kKeyVorbisInfo type=%d size=%d", type, size); + LOG1("displayMetaData kKeyVorbisInfo type=%d size=%zu", type, size); } if (meta->findData(kKeyVorbisBooks, &type, &data, &size)) { - LOG1("displayMetaData kKeyVorbisBooks type=%d size=%d", type, size); + LOG1("displayMetaData kKeyVorbisBooks type=%d size=%zu", type, size); } if (meta->findInt32(kKeyWantsNALFragments, &int32Data)) { LOG1("displayMetaData kKeyWantsNALFragments %d", int32Data); @@ -115,7 +115,7 @@ void displayMetaData(const sp meta) { LOG1("displayMetaData kKeyColorFormat %d", int32Data); } if (meta->findPointer(kKeyPlatformPrivate, &ptr)) { - LOG1("displayMetaData kKeyPlatformPrivate pointer=0x%x", (int32_t) ptr); + LOG1("displayMetaData kKeyPlatformPrivate pointer=%p", ptr); } if (meta->findCString(kKeyDecoderComponent, &charData)) { LOG1("displayMetaData kKeyDecoderComponent %s", charData); @@ -151,7 +151,7 @@ void displayMetaData(const sp meta) { LOG1("displayMetaData kKeyYear %s", charData); } if (meta->findData(kKeyAlbumArt, &type, &data, &size)) { - LOG1("displayMetaData kKeyAlbumArt type=%d size=%d", type, size); + LOG1("displayMetaData kKeyAlbumArt type=%d size=%zu", type, size); } if (meta->findCString(kKeyAlbumArtMIME, &charData)) { LOG1("displayMetaData kKeyAlbumArtMIME %s", charData); @@ -277,7 +277,7 @@ status_t buildAVCCodecSpecificData(uint8_t **pOutputData, size_t *pOutputSize, } if (size < 4) { - ALOGE("Codec specific data length too short: %d", size); + ALOGE("Codec specific data length too short: %zu", size); return ERROR_MALFORMED; } @@ -286,7 +286,7 @@ status_t buildAVCCodecSpecificData(uint8_t **pOutputData, size_t *pOutputSize, // 2 bytes for each of the parameter set length field // plus the 7 bytes for the header if (size < 4 + 7) { - ALOGE("Codec specific data length too short: %d", size); + ALOGE("Codec specific data length too short: %zu", size); return ERROR_MALFORMED; } @@ -355,7 +355,7 @@ status_t buildAVCCodecSpecificData(uint8_t **pOutputData, size_t *pOutputSize, } if (nSeqParamSets > 0x1F) { - ALOGE("Too many seq parameter sets (%d) found", nSeqParamSets); + ALOGE("Too many seq parameter sets (%zu) found", nSeqParamSets); return ERROR_MALFORMED; } } @@ -368,7 +368,7 @@ status_t buildAVCCodecSpecificData(uint8_t **pOutputData, size_t *pOutputSize, return ERROR_MALFORMED; } if (nPicParamSets > 0xFF) { - ALOGE("Too many pic parameter sets (%d) found", nPicParamSets); + ALOGE("Too many pic parameter sets (%zu) found", nPicParamSets); return ERROR_MALFORMED; } } -- cgit v1.1