summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmds/stagefright/stagefright.cpp16
-rw-r--r--drm/common/DrmSupportInfo.cpp4
-rw-r--r--drm/drmserver/DrmManager.cpp20
-rw-r--r--drm/libdrmframework/include/PlugInManager.h4
-rw-r--r--include/media/stagefright/FileSource.h2
-rwxr-xr-xlibvideoeditor/lvpp/DummyVideoSource.cpp3
-rwxr-xr-xlibvideoeditor/lvpp/VideoEditorAudioPlayer.cpp6
-rwxr-xr-xlibvideoeditor/lvpp/VideoEditorBGAudioProcessing.cpp8
-rwxr-xr-xlibvideoeditor/osal/inc/M4OSA_Types.h14
-rwxr-xr-xlibvideoeditor/osal/src/M4OSA_Thread.c4
-rwxr-xr-xlibvideoeditor/osal/src/M4PSW_DebugTrace.c5
-rwxr-xr-xlibvideoeditor/vss/src/M4PCMR_CoreReader.c2
-rwxr-xr-xlibvideoeditor/vss/src/M4READER_Amr.c4
-rwxr-xr-xlibvideoeditor/vss/src/M4READER_Pcm.c2
-rwxr-xr-xlibvideoeditor/vss/src/M4VD_EXTERNAL_BitstreamParser.c15
-rwxr-xr-xlibvideoeditor/vss/src/M4xVSS_internal.c4
-rwxr-xr-xlibvideoeditor/vss/stagefrightshells/src/VideoEditorBuffer.c8
-rwxr-xr-xlibvideoeditor/vss/stagefrightshells/src/VideoEditorVideoEncoder.cpp2
-rw-r--r--media/libstagefright/AMRExtractor.cpp2
-rw-r--r--media/libstagefright/CameraSourceTimeLapse.cpp2
-rw-r--r--media/libstagefright/NuCachedSource2.cpp2
-rw-r--r--media/libstagefright/OMXCodec.cpp28
-rw-r--r--media/libstagefright/codecs/on2/h264dec/omxdl/arm11/api/omxtypes.h60
-rwxr-xr-xmedia/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/omxtypes.h60
-rw-r--r--media/libstagefright/codecs/on2/h264dec/omxdl/reference/api/omxtypes.h60
-rw-r--r--media/libstagefright/omx/GraphicBufferSource.cpp6
-rw-r--r--media/libstagefright/omx/OMX.cpp4
-rw-r--r--media/libstagefright/omx/SoftVideoDecoderOMXComponent.cpp4
-rw-r--r--media/mtp/MtpDevice.cpp4
-rw-r--r--media/mtp/MtpServer.cpp7
-rw-r--r--services/audioflinger/AudioFlinger.cpp4
-rw-r--r--services/audioflinger/Tracks.cpp2
32 files changed, 131 insertions, 237 deletions
diff --git a/cmds/stagefright/stagefright.cpp b/cmds/stagefright/stagefright.cpp
index 6b41fd4..b70afe6 100644
--- a/cmds/stagefright/stagefright.cpp
+++ b/cmds/stagefright/stagefright.cpp
@@ -14,16 +14,16 @@
* limitations under the License.
*/
+#include <inttypes.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/time.h>
+
//#define LOG_NDEBUG 0
#define LOG_TAG "stagefright"
#include <media/stagefright/foundation/ADebug.h>
-#include <sys/time.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <inttypes.h>
-
#include "jpeg.h"
#include "SineSource.h"
@@ -51,8 +51,6 @@
#include <private/media/VideoFrame.h>
-#include <fcntl.h>
-
#include <gui/GLConsumer.h>
#include <gui/Surface.h>
#include <gui/SurfaceComposerClient.h>
@@ -648,7 +646,7 @@ static void dumpCodecProfiles(const sp<IOMX>& omx, bool queryDecoders) {
const CodecProfileLevel &profileLevel =
results[i].mProfileLevels[j];
- printf("%s%ld/%ld", j > 0 ? ", " : "",
+ printf("%s%" PRIu32 "/%" PRIu32, j > 0 ? ", " : "",
profileLevel.mProfile, profileLevel.mLevel);
}
diff --git a/drm/common/DrmSupportInfo.cpp b/drm/common/DrmSupportInfo.cpp
index 5400bdd..584c6a6 100644
--- a/drm/common/DrmSupportInfo.cpp
+++ b/drm/common/DrmSupportInfo.cpp
@@ -47,7 +47,7 @@ bool DrmSupportInfo::isSupportedMimeType(const String8& mimeType) const {
return false;
}
- for (unsigned int i = 0; i < mMimeTypeVector.size(); i++) {
+ for (size_t i = 0; i < mMimeTypeVector.size(); i++) {
const String8 item = mMimeTypeVector.itemAt(i);
if (!strcasecmp(item.string(), mimeType.string())) {
@@ -58,7 +58,7 @@ bool DrmSupportInfo::isSupportedMimeType(const String8& mimeType) const {
}
bool DrmSupportInfo::isSupportedFileSuffix(const String8& fileType) const {
- for (unsigned int i = 0; i < mFileSuffixVector.size(); i++) {
+ for (size_t i = 0; i < mFileSuffixVector.size(); i++) {
const String8 item = mFileSuffixVector.itemAt(i);
if (!strcasecmp(item.string(), fileType.string())) {
diff --git a/drm/drmserver/DrmManager.cpp b/drm/drmserver/DrmManager.cpp
index dccd23d..d8aeb0c 100644
--- a/drm/drmserver/DrmManager.cpp
+++ b/drm/drmserver/DrmManager.cpp
@@ -101,7 +101,7 @@ status_t DrmManager::loadPlugIns() {
status_t DrmManager::loadPlugIns(const String8& plugInDirPath) {
mPlugInManager.loadPlugIns(plugInDirPath);
Vector<String8> plugInPathList = mPlugInManager.getPlugInIdList();
- for (unsigned int i = 0; i < plugInPathList.size(); ++i) {
+ for (size_t i = 0; i < plugInPathList.size(); ++i) {
String8 plugInPath = plugInPathList[i];
DrmSupportInfo* info = mPlugInManager.getPlugIn(plugInPath).getSupportInfo(0);
if (NULL != info) {
@@ -138,7 +138,7 @@ void DrmManager::addClient(int uniqueId) {
Mutex::Autolock _l(mLock);
if (!mSupportInfoToPlugInIdMap.isEmpty()) {
Vector<String8> plugInIdList = mPlugInManager.getPlugInIdList();
- for (unsigned int index = 0; index < plugInIdList.size(); index++) {
+ for (size_t index = 0; index < plugInIdList.size(); index++) {
IDrmEngine& rDrmEngine = mPlugInManager.getPlugIn(plugInIdList.itemAt(index));
rDrmEngine.initialize(uniqueId);
rDrmEngine.setOnInfoListener(uniqueId, this);
@@ -149,7 +149,7 @@ void DrmManager::addClient(int uniqueId) {
void DrmManager::removeClient(int uniqueId) {
Mutex::Autolock _l(mLock);
Vector<String8> plugInIdList = mPlugInManager.getPlugInIdList();
- for (unsigned int index = 0; index < plugInIdList.size(); index++) {
+ for (size_t index = 0; index < plugInIdList.size(); index++) {
IDrmEngine& rDrmEngine = mPlugInManager.getPlugIn(plugInIdList.itemAt(index));
rDrmEngine.terminate(uniqueId);
}
@@ -208,7 +208,7 @@ bool DrmManager::canHandle(int uniqueId, const String8& path) {
bool result = false;
Vector<String8> plugInPathList = mPlugInManager.getPlugInIdList();
- for (unsigned int i = 0; i < plugInPathList.size(); ++i) {
+ for (size_t i = 0; i < plugInPathList.size(); ++i) {
IDrmEngine& rDrmEngine = mPlugInManager.getPlugIn(plugInPathList[i]);
result = rDrmEngine.canHandle(uniqueId, path);
@@ -318,7 +318,7 @@ status_t DrmManager::removeRights(int uniqueId, const String8& path) {
status_t DrmManager::removeAllRights(int uniqueId) {
Vector<String8> plugInIdList = mPlugInManager.getPlugInIdList();
status_t result = DRM_ERROR_UNKNOWN;
- for (unsigned int index = 0; index < plugInIdList.size(); index++) {
+ for (size_t index = 0; index < plugInIdList.size(); index++) {
IDrmEngine& rDrmEngine = mPlugInManager.getPlugIn(plugInIdList.itemAt(index));
result = rDrmEngine.removeAllRights(uniqueId);
if (DRM_NO_ERROR != result) {
@@ -412,7 +412,7 @@ DecryptHandle* DrmManager::openDecryptSession(
if (NULL != handle) {
handle->decryptId = mDecryptSessionId + 1;
- for (unsigned int index = 0; index < plugInIdList.size(); index++) {
+ for (size_t index = 0; index < plugInIdList.size(); index++) {
String8 plugInId = plugInIdList.itemAt(index);
IDrmEngine& rDrmEngine = mPlugInManager.getPlugIn(plugInId);
result = rDrmEngine.openDecryptSession(uniqueId, handle, fd, offset, length, mime);
@@ -440,7 +440,7 @@ DecryptHandle* DrmManager::openDecryptSession(
if (NULL != handle) {
handle->decryptId = mDecryptSessionId + 1;
- for (unsigned int index = 0; index < plugInIdList.size(); index++) {
+ for (size_t index = 0; index < plugInIdList.size(); index++) {
String8 plugInId = plugInIdList.itemAt(index);
IDrmEngine& rDrmEngine = mPlugInManager.getPlugIn(plugInId);
result = rDrmEngine.openDecryptSession(uniqueId, handle, uri, mime);
@@ -565,7 +565,7 @@ String8 DrmManager::getSupportedPlugInId(const String8& mimeType) {
String8 plugInId("");
if (EMPTY_STRING != mimeType) {
- for (unsigned int index = 0; index < mSupportInfoToPlugInIdMap.size(); index++) {
+ for (size_t index = 0; index < mSupportInfoToPlugInIdMap.size(); index++) {
const DrmSupportInfo& drmSupportInfo = mSupportInfoToPlugInIdMap.keyAt(index);
if (drmSupportInfo.isSupportedMimeType(mimeType)) {
@@ -581,7 +581,7 @@ String8 DrmManager::getSupportedPlugInIdFromPath(int uniqueId, const String8& pa
String8 plugInId("");
const String8 fileSuffix = path.getPathExtension();
- for (unsigned int index = 0; index < mSupportInfoToPlugInIdMap.size(); index++) {
+ for (size_t index = 0; index < mSupportInfoToPlugInIdMap.size(); index++) {
const DrmSupportInfo& drmSupportInfo = mSupportInfoToPlugInIdMap.keyAt(index);
if (drmSupportInfo.isSupportedFileSuffix(fileSuffix)) {
@@ -599,7 +599,7 @@ String8 DrmManager::getSupportedPlugInIdFromPath(int uniqueId, const String8& pa
void DrmManager::onInfo(const DrmInfoEvent& event) {
Mutex::Autolock _l(mListenerLock);
- for (unsigned int index = 0; index < mServiceListeners.size(); index++) {
+ for (size_t index = 0; index < mServiceListeners.size(); index++) {
int uniqueId = mServiceListeners.keyAt(index);
if (uniqueId == event.getUniqueId()) {
diff --git a/drm/libdrmframework/include/PlugInManager.h b/drm/libdrmframework/include/PlugInManager.h
index 7bb143f..c1d019a 100644
--- a/drm/libdrmframework/include/PlugInManager.h
+++ b/drm/libdrmframework/include/PlugInManager.h
@@ -80,7 +80,7 @@ public:
Vector<String8> plugInFileList = getPlugInPathList(rsPlugInDirPath);
if (!plugInFileList.isEmpty()) {
- for (unsigned int i = 0; i < plugInFileList.size(); ++i) {
+ for (size_t i = 0; i < plugInFileList.size(); ++i) {
loadPlugIn(plugInFileList[i]);
}
}
@@ -91,7 +91,7 @@ public:
*
*/
void unloadPlugIns() {
- for (unsigned int i = 0; i < m_plugInIdList.size(); ++i) {
+ for (size_t i = 0; i < m_plugInIdList.size(); ++i) {
unloadPlugIn(m_plugInIdList[i]);
}
m_plugInIdList.clear();
diff --git a/include/media/stagefright/FileSource.h b/include/media/stagefright/FileSource.h
index 9838ed2..a981d1c 100644
--- a/include/media/stagefright/FileSource.h
+++ b/include/media/stagefright/FileSource.h
@@ -56,7 +56,7 @@ private:
sp<DecryptHandle> mDecryptHandle;
DrmManagerClient *mDrmManagerClient;
int64_t mDrmBufOffset;
- int64_t mDrmBufSize;
+ size_t mDrmBufSize;
unsigned char *mDrmBuf;
ssize_t readAtDRM(off64_t offset, void *data, size_t size);
diff --git a/libvideoeditor/lvpp/DummyVideoSource.cpp b/libvideoeditor/lvpp/DummyVideoSource.cpp
index b06f937..6dbcf2a 100755
--- a/libvideoeditor/lvpp/DummyVideoSource.cpp
+++ b/libvideoeditor/lvpp/DummyVideoSource.cpp
@@ -16,6 +16,7 @@
//#define LOG_NDEBUG 0
#define LOG_TAG "DummyVideoSource"
+#include <inttypes.h>
#include <stdlib.h>
#include <utils/Log.h>
#include <media/stagefright/foundation/ADebug.h>
@@ -146,7 +147,7 @@ status_t DummyVideoSource::read(
if (mIsFirstImageFrame) {
M4OSA_clockGetTime(&mImagePlayStartTime, kTimeScale);
mFrameTimeUs = (mImageSeekTime + 1);
- ALOGV("read: jpg 1st frame timeUs = %lld, begin cut time = %ld",
+ ALOGV("read: jpg 1st frame timeUs = %lld, begin cut time = %" PRIu32,
mFrameTimeUs, mImageSeekTime);
mIsFirstImageFrame = false;
diff --git a/libvideoeditor/lvpp/VideoEditorAudioPlayer.cpp b/libvideoeditor/lvpp/VideoEditorAudioPlayer.cpp
index e60030e..e1a81d8 100755
--- a/libvideoeditor/lvpp/VideoEditorAudioPlayer.cpp
+++ b/libvideoeditor/lvpp/VideoEditorAudioPlayer.cpp
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+#include <inttypes.h>
+
#define LOG_NDEBUG 1
#define LOG_TAG "VideoEditorAudioPlayer"
#include <utils/Log.h>
@@ -372,7 +374,7 @@ status_t VideoEditorAudioPlayer::start(bool sourceAlreadyStarted) {
// Get the duration in time of the audio BT
if ( result == M4NO_ERROR ) {
- ALOGV("VEAP: channels = %d freq = %d",
+ ALOGV("VEAP: channels = %" PRIu32 " freq = %" PRIu32,
mAudioMixSettings->uiNbChannels, mAudioMixSettings->uiSamplingFrequency);
// No trim
@@ -440,7 +442,7 @@ status_t VideoEditorAudioPlayer::start(bool sourceAlreadyStarted) {
// do nothing
}
- ALOGV("VideoEditorAudioPlayer::startTime %d", startTime);
+ ALOGV("VideoEditorAudioPlayer::startTime %" PRIu32, startTime);
seekTimeStamp = 0;
if (startTime) {
if (startTime >= mBGAudioPCMFileDuration) {
diff --git a/libvideoeditor/lvpp/VideoEditorBGAudioProcessing.cpp b/libvideoeditor/lvpp/VideoEditorBGAudioProcessing.cpp
index e24fcf4..0c12aac 100755
--- a/libvideoeditor/lvpp/VideoEditorBGAudioProcessing.cpp
+++ b/libvideoeditor/lvpp/VideoEditorBGAudioProcessing.cpp
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+#include <inttypes.h>
+
//#define LOG_NDEBUG 0
#define LOG_TAG "VideoEditorBGAudioProcessing"
#include <utils/Log.h>
@@ -50,8 +52,8 @@ M4OSA_Int32 VideoEditorBGAudioProcessing::mixAndDuck(
void *backgroundTrackBuffer,
void *outBuffer) {
- ALOGV("mixAndDuck: track buffers (primary: 0x%x and background: 0x%x) "
- "and out buffer 0x%x",
+ ALOGV("mixAndDuck: track buffers (primary: %p and background: %p) "
+ "and out buffer %p",
primaryTrackBuffer, backgroundTrackBuffer, outBuffer);
M4AM_Buffer16* pPrimaryTrack = (M4AM_Buffer16*)primaryTrackBuffer;
@@ -217,7 +219,7 @@ void VideoEditorBGAudioProcessing::setMixParams(
mDoDucking = 0;
mDuckingFactor = 1.0;
- ALOGV("ducking enable 0x%x lowVolume %f threshold %d "
+ ALOGV("ducking enable 0x%x lowVolume %f threshold %" PRIu32 " "
"fPTVolLevel %f BTVolLevel %f",
mDucking_enable, mDucking_lowVolume, mDucking_threshold,
mPTVolLevel, mPTVolLevel);
diff --git a/libvideoeditor/osal/inc/M4OSA_Types.h b/libvideoeditor/osal/inc/M4OSA_Types.h
index 92a68d8..ee258a0 100755
--- a/libvideoeditor/osal/inc/M4OSA_Types.h
+++ b/libvideoeditor/osal/inc/M4OSA_Types.h
@@ -36,13 +36,13 @@ extern "C" {
#endif
-typedef signed char M4OSA_Bool;
-typedef unsigned char M4OSA_UInt8;
-typedef signed char M4OSA_Int8;
-typedef unsigned short M4OSA_UInt16;
-typedef signed short M4OSA_Int16;
-typedef unsigned long M4OSA_UInt32;
-typedef signed long M4OSA_Int32;
+typedef int8_t M4OSA_Bool;
+typedef uint8_t M4OSA_UInt8;
+typedef int8_t M4OSA_Int8;
+typedef uint16_t M4OSA_UInt16;
+typedef int16_t M4OSA_Int16;
+typedef uint32_t M4OSA_UInt32;
+typedef int32_t M4OSA_Int32;
typedef signed char M4OSA_Char;
typedef unsigned char M4OSA_UChar;
diff --git a/libvideoeditor/osal/src/M4OSA_Thread.c b/libvideoeditor/osal/src/M4OSA_Thread.c
index db54245..3e82fb3 100755
--- a/libvideoeditor/osal/src/M4OSA_Thread.c
+++ b/libvideoeditor/osal/src/M4OSA_Thread.c
@@ -524,7 +524,7 @@ M4OSA_ERR M4OSA_SetThreadSyncPriority(M4OSA_Context context,
M4OSA_TRACE2_2("M4OSA_SetThreadSyncPriority\t\tM4OSA_Context 0x%x\t"
"M4OSA_DataOption 0x%x", context, optionValue);
- if((M4OSA_UInt32)optionValue>M4OSA_kThreadLowestPriority)
+ if((M4OSA_UInt32)(uintptr_t)optionValue>M4OSA_kThreadLowestPriority)
{
return M4ERR_PARAMETER;
}
@@ -590,7 +590,7 @@ M4OSA_ERR M4OSA_SetThreadSyncStackSize(M4OSA_Context context,
M4OSA_TRACE2_2("M4OSA_SetThreadSyncStackSize\t\tM4OSA_Context 0x%x\t"
"M4OSA_DataOption 0x%x", context, optionValue);
- threadContext->stackSize = (M4OSA_UInt32)optionValue;
+ threadContext->stackSize = (M4OSA_UInt32)(uintptr_t)optionValue;
return M4NO_ERROR;
}
diff --git a/libvideoeditor/osal/src/M4PSW_DebugTrace.c b/libvideoeditor/osal/src/M4PSW_DebugTrace.c
index 0fcba94..850ed91 100755
--- a/libvideoeditor/osal/src/M4PSW_DebugTrace.c
+++ b/libvideoeditor/osal/src/M4PSW_DebugTrace.c
@@ -25,6 +25,7 @@
*/
+#include <inttypes.h>
#include <stdio.h> /*for printf */
#include "M4OSA_Types.h"
@@ -65,9 +66,9 @@ M4OSAL_TRACE_EXPORT_TYPE void M4OSA_DebugTrace(M4OSA_Int32 line,
}
#ifdef NO_FILE
- printf("Error: %li, on %s: %s\n",err,cond,msg);
+ printf("Error: %" PRIu32 ", on %s: %s\n",err,cond,msg);
#else /* NO_FILE */
- printf("Error: %li, on %s: %s Line %lu in: %s\n",err,cond,msg,line,file);
+ printf("Error: %" PRIu32 ", on %s: %s Line %" PRIu32 " in: %s\n",err,cond,msg,line,file);
#endif /* NO_FILE */
}
diff --git a/libvideoeditor/vss/src/M4PCMR_CoreReader.c b/libvideoeditor/vss/src/M4PCMR_CoreReader.c
index 3343254..19f07dd 100755
--- a/libvideoeditor/vss/src/M4PCMR_CoreReader.c
+++ b/libvideoeditor/vss/src/M4PCMR_CoreReader.c
@@ -690,7 +690,7 @@ M4OSA_ERR M4PCMR_setOption(M4OSA_Context context, M4PCMR_OptionID optionID, M4OS
switch(optionID)
{
case M4PCMR_kPCMblockSize:
- c->m_blockSize = (M4OSA_UInt32)Value;
+ c->m_blockSize = (M4OSA_UInt32)(uintptr_t)Value;
break;
default:
diff --git a/libvideoeditor/vss/src/M4READER_Amr.c b/libvideoeditor/vss/src/M4READER_Amr.c
index 0859157..71f0e28 100755
--- a/libvideoeditor/vss/src/M4READER_Amr.c
+++ b/libvideoeditor/vss/src/M4READER_Amr.c
@@ -303,7 +303,7 @@ M4OSA_ERR M4READER_AMR_getNextStream(M4OSA_Context context, M4READER_MediaFamily
pStreamHandler->m_decoderSpecificInfoSize = streamDesc.decoderSpecificInfoSize;
pStreamHandler->m_streamId = streamDesc.streamID;
pStreamHandler->m_duration = streamDesc.duration;
- pStreamHandler->m_pUserData = (void*)streamDesc.timeScale; /*trick to change*/
+ pStreamHandler->m_pUserData = (void*)(intptr_t)streamDesc.timeScale; /*trick to change*/
if (streamDesc.duration > pC->m_maxDuration)
{
@@ -704,7 +704,7 @@ M4OSA_ERR M4READER_AMR_getNextAu(M4OSA_Context context, M4_StreamHandler *pStrea
if (err == M4NO_ERROR)
{
- timeScale = (M4OSA_Float)(M4OSA_Int32)(pStreamHandler->m_pUserData)/1000;
+ timeScale = (M4OSA_Float)(M4OSA_Int32)(intptr_t)(pStreamHandler->m_pUserData)/1000;
pAccessUnit->m_dataAddress = (M4OSA_MemAddr8)pAu->dataAddress;
pAccessUnit->m_size = pAu->size;
pAccessUnit->m_CTS = (M4_MediaTime)pAu->CTS/*/timeScale*/;
diff --git a/libvideoeditor/vss/src/M4READER_Pcm.c b/libvideoeditor/vss/src/M4READER_Pcm.c
index 833930b..392367f 100755
--- a/libvideoeditor/vss/src/M4READER_Pcm.c
+++ b/libvideoeditor/vss/src/M4READER_Pcm.c
@@ -386,7 +386,7 @@ M4OSA_ERR M4READER_PCM_getNextStream(M4OSA_Context context, M4READER_MediaFamily
pC->m_pAudioStream->m_decoderSpecificInfoSize = streamDesc.decoderSpecificInfoSize;
pC->m_pAudioStream->m_streamId = streamDesc.streamID;
pC->m_pAudioStream->m_pUserData =
- (void*)streamDesc.timeScale; /*trick to change*/
+ (void*)(intptr_t)streamDesc.timeScale; /*trick to change*/
pC->m_pAudioStream->m_averageBitRate = streamDesc.averageBitrate;
pC->m_pAudioStream->m_maxAUSize =
pAudioStreamHandler->m_byteFrameLength*pAudioStreamHandler->m_byteSampleSize\
diff --git a/libvideoeditor/vss/src/M4VD_EXTERNAL_BitstreamParser.c b/libvideoeditor/vss/src/M4VD_EXTERNAL_BitstreamParser.c
index cc67e72..fb83952 100755
--- a/libvideoeditor/vss/src/M4VD_EXTERNAL_BitstreamParser.c
+++ b/libvideoeditor/vss/src/M4VD_EXTERNAL_BitstreamParser.c
@@ -13,6 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+#include <inttypes.h>
+
#include "utils/Log.h"
#include "M4OSA_Types.h"
#include "M4OSA_Debug.h"
@@ -505,7 +507,7 @@ M4OSA_ERR getAVCProfileAndLevel(M4OSA_UInt8* pDSI, M4OSA_Int32 DSISize,
}
constraintSet3 = (pDSI[index+2] & 0x10);
- ALOGV("getAVCProfileAndLevel profile_byte %d, level_byte: %d constrain3flag",
+ ALOGV("getAVCProfileAndLevel profile_byte %d, level_byte: %d constrain3flag: %d",
pDSI[index+1], pDSI[index+3], constraintSet3);
switch (pDSI[index+1]) {
@@ -586,7 +588,8 @@ M4OSA_ERR getAVCProfileAndLevel(M4OSA_UInt8* pDSI, M4OSA_Int32 DSISize,
default:
*pLevel = M4VIDEOEDITING_VIDEO_UNKNOWN_LEVEL;
}
- ALOGV("getAVCProfileAndLevel profile %ld level %ld", *pProfile, *pLevel);
+ ALOGV("getAVCProfileAndLevel profile %" PRId32 " level %" PRId32,
+ *pProfile, *pLevel);
return M4NO_ERROR;
}
@@ -606,7 +609,7 @@ M4OSA_ERR getH263ProfileAndLevel(M4OSA_UInt8* pDSI, M4OSA_Int32 DSISize,
*pLevel = M4VIDEOEDITING_VIDEO_UNKNOWN_LEVEL;
return M4ERR_PARAMETER;
}
- ALOGV("getH263ProfileAndLevel profile_byte %d, level_byte",
+ ALOGV("getH263ProfileAndLevel profile_byte %d, level_byte %d",
pDSI[6], pDSI[5]);
/* get the H263 level */
switch (pDSI[5]) {
@@ -670,7 +673,8 @@ M4OSA_ERR getH263ProfileAndLevel(M4OSA_UInt8* pDSI, M4OSA_Int32 DSISize,
default:
*pProfile = M4VIDEOEDITING_VIDEO_UNKNOWN_PROFILE;
}
- ALOGV("getH263ProfileAndLevel profile %ld level %ld", *pProfile, *pLevel);
+ ALOGV("getH263ProfileAndLevel profile %" PRId32 " level %" PRId32,
+ *pProfile, *pLevel);
return M4NO_ERROR;
}
@@ -693,6 +697,7 @@ M4OSA_ERR getMPEG4ProfileAndLevel(M4OSA_UInt8 profileAndLevel,
break;
}
}
- ALOGV("getMPEG4ProfileAndLevel profile %ld level %ld", *pProfile, *pLevel);
+ ALOGV("getMPEG4ProfileAndLevel profile %" PRId32 " level %" PRId32,
+ *pProfile, *pLevel);
return M4NO_ERROR;
}
diff --git a/libvideoeditor/vss/src/M4xVSS_internal.c b/libvideoeditor/vss/src/M4xVSS_internal.c
index 64a6f40..84959ec 100755
--- a/libvideoeditor/vss/src/M4xVSS_internal.c
+++ b/libvideoeditor/vss/src/M4xVSS_internal.c
@@ -4156,12 +4156,12 @@ M4OSA_ERR M4VSS3GPP_externalVideoEffectZoom(
M4VIFI_ImagePlane boxPlane[3];
- if(M4xVSS_kVideoEffectType_ZoomOut == (M4OSA_UInt32)pFunctionContext)
+ if((M4OSA_Void *)M4xVSS_kVideoEffectType_ZoomOut == pFunctionContext)
{
//ratio = 16 - (15 * pProgress->uiProgress)/1000;
ratio = 16 - pProgress->uiProgress / 66 ;
}
- else if(M4xVSS_kVideoEffectType_ZoomIn == (M4OSA_UInt32)pFunctionContext)
+ else if((M4OSA_Void *)M4xVSS_kVideoEffectType_ZoomIn == pFunctionContext)
{
//ratio = 1 + (15 * pProgress->uiProgress)/1000;
ratio = 1 + pProgress->uiProgress / 66 ;
diff --git a/libvideoeditor/vss/stagefrightshells/src/VideoEditorBuffer.c b/libvideoeditor/vss/stagefrightshells/src/VideoEditorBuffer.c
index f4cfa7c..5a7b28e 100755
--- a/libvideoeditor/vss/stagefrightshells/src/VideoEditorBuffer.c
+++ b/libvideoeditor/vss/stagefrightshells/src/VideoEditorBuffer.c
@@ -22,6 +22,8 @@
#undef M4OSA_TRACE_LEVEL
#define M4OSA_TRACE_LEVEL 1
+#include <inttypes.h>
+
#include "VideoEditorBuffer.h"
#include "utils/Log.h"
@@ -55,7 +57,7 @@ M4OSA_ERR VIDEOEDITOR_BUFFER_allocatePool(VIDEOEDITOR_BUFFER_Pool** ppool,
VIDEOEDITOR_BUFFER_Pool* pool;
M4OSA_UInt32 index;
- ALOGV("VIDEOEDITOR_BUFFER_allocatePool : ppool = 0x%x nbBuffers = %d ",
+ ALOGV("VIDEOEDITOR_BUFFER_allocatePool : ppool = %p nbBuffers = %" PRIu32,
ppool, nbBuffers);
pool = M4OSA_NULL;
@@ -131,7 +133,7 @@ M4OSA_ERR VIDEOEDITOR_BUFFER_freePool(VIDEOEDITOR_BUFFER_Pool* ppool)
M4OSA_ERR err;
M4OSA_UInt32 j = 0;
- ALOGV("VIDEOEDITOR_BUFFER_freePool : ppool = 0x%x", ppool);
+ ALOGV("VIDEOEDITOR_BUFFER_freePool : ppool = %p", ppool);
err = M4NO_ERROR;
@@ -200,7 +202,7 @@ M4OSA_ERR VIDEOEDITOR_BUFFER_getBuffer(VIDEOEDITOR_BUFFER_Pool* ppool,
/* case where a buffer has been found */
*pNXPBuffer = &(ppool->pNXPBuffer[ibuf]);
- ALOGV("VIDEOEDITOR_BUFFER_getBuffer: idx = %d", ibuf);
+ ALOGV("VIDEOEDITOR_BUFFER_getBuffer: idx = %" PRIu32, ibuf);
return(err);
}
diff --git a/libvideoeditor/vss/stagefrightshells/src/VideoEditorVideoEncoder.cpp b/libvideoeditor/vss/stagefrightshells/src/VideoEditorVideoEncoder.cpp
index 4787680..ca7db68 100755
--- a/libvideoeditor/vss/stagefrightshells/src/VideoEditorVideoEncoder.cpp
+++ b/libvideoeditor/vss/stagefrightshells/src/VideoEditorVideoEncoder.cpp
@@ -857,7 +857,7 @@ M4OSA_ERR VideoEditorVideoEncoder_processOutputBuffer(
ALOGV("VideoEditorVideoEncoder_processOutputBuffer : buffer is empty");
goto cleanUp;
}
- VIDEOEDITOR_CHECK(0 == ((M4OSA_UInt32)buffer->data())%4, M4ERR_PARAMETER);
+ VIDEOEDITOR_CHECK(0 == (((intptr_t)buffer->data())%4), M4ERR_PARAMETER);
VIDEOEDITOR_CHECK(buffer->meta_data().get(), M4ERR_PARAMETER);
if ( buffer->meta_data()->findInt32(kKeyIsCodecConfig, &i32Tmp) && i32Tmp ){
{ // Display the DSI
diff --git a/media/libstagefright/AMRExtractor.cpp b/media/libstagefright/AMRExtractor.cpp
index 3f592ed..a6fb3d8 100644
--- a/media/libstagefright/AMRExtractor.cpp
+++ b/media/libstagefright/AMRExtractor.cpp
@@ -265,7 +265,7 @@ status_t AMRSource::read(
mOffset = mOffsetTable[index] + (mIsWide ? 9 : 6);
- for (int i = 0; i< seekFrame - index * 50; i++) {
+ for (size_t i = 0; i< seekFrame - index * 50; i++) {
status_t err;
if ((err = getFrameSizeByOffset(mDataSource, mOffset,
mIsWide, &size)) != OK) {
diff --git a/media/libstagefright/CameraSourceTimeLapse.cpp b/media/libstagefright/CameraSourceTimeLapse.cpp
index 60cdf66..15ba967 100644
--- a/media/libstagefright/CameraSourceTimeLapse.cpp
+++ b/media/libstagefright/CameraSourceTimeLapse.cpp
@@ -135,7 +135,7 @@ bool CameraSourceTimeLapse::trySettingVideoSize(
}
bool videoSizeSupported = false;
- for (uint32_t i = 0; i < supportedSizes.size(); ++i) {
+ for (size_t i = 0; i < supportedSizes.size(); ++i) {
int32_t pictureWidth = supportedSizes[i].width;
int32_t pictureHeight = supportedSizes[i].height;
diff --git a/media/libstagefright/NuCachedSource2.cpp b/media/libstagefright/NuCachedSource2.cpp
index 72ea32d..61cf0ad 100644
--- a/media/libstagefright/NuCachedSource2.cpp
+++ b/media/libstagefright/NuCachedSource2.cpp
@@ -648,7 +648,7 @@ void NuCachedSource2::updateCacheParamsFromString(const char *s) {
ssize_t lowwaterMarkKb, highwaterMarkKb;
int keepAliveSecs;
- if (sscanf(s, "%d/%d/%d",
+ if (sscanf(s, "%zd/%zd/%d",
&lowwaterMarkKb, &highwaterMarkKb, &keepAliveSecs) != 3) {
ALOGE("Failed to parse cache parameters from '%s'.", s);
return;
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp
index 1cfe6c0..a879656 100644
--- a/media/libstagefright/OMXCodec.cpp
+++ b/media/libstagefright/OMXCodec.cpp
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+#include <inttypes.h>
+
//#define LOG_NDEBUG 0
#define LOG_TAG "OMXCodec"
#include <utils/Log.h>
@@ -4251,9 +4253,9 @@ void OMXCodec::dumpPortStatus(OMX_U32 portIndex) {
CHECK((portIndex == kPortIndexInput && def.eDir == OMX_DirInput)
|| (portIndex == kPortIndexOutput && def.eDir == OMX_DirOutput));
- printf(" nBufferCountActual = %ld\n", def.nBufferCountActual);
- printf(" nBufferCountMin = %ld\n", def.nBufferCountMin);
- printf(" nBufferSize = %ld\n", def.nBufferSize);
+ printf(" nBufferCountActual = %" PRIu32 "\n", def.nBufferCountActual);
+ printf(" nBufferCountMin = %" PRIu32 "\n", def.nBufferCountMin);
+ printf(" nBufferSize = %" PRIu32 "\n", def.nBufferSize);
switch (def.eDomain) {
case OMX_PortDomainImage:
@@ -4262,9 +4264,9 @@ void OMXCodec::dumpPortStatus(OMX_U32 portIndex) {
printf("\n");
printf(" // Image\n");
- printf(" nFrameWidth = %ld\n", imageDef->nFrameWidth);
- printf(" nFrameHeight = %ld\n", imageDef->nFrameHeight);
- printf(" nStride = %ld\n", imageDef->nStride);
+ printf(" nFrameWidth = %" PRIu32 "\n", imageDef->nFrameWidth);
+ printf(" nFrameHeight = %" PRIu32 "\n", imageDef->nFrameHeight);
+ printf(" nStride = %" PRIu32 "\n", imageDef->nStride);
printf(" eCompressionFormat = %s\n",
imageCompressionFormatString(imageDef->eCompressionFormat));
@@ -4281,9 +4283,9 @@ void OMXCodec::dumpPortStatus(OMX_U32 portIndex) {
printf("\n");
printf(" // Video\n");
- printf(" nFrameWidth = %ld\n", videoDef->nFrameWidth);
- printf(" nFrameHeight = %ld\n", videoDef->nFrameHeight);
- printf(" nStride = %ld\n", videoDef->nStride);
+ printf(" nFrameWidth = %" PRIu32 "\n", videoDef->nFrameWidth);
+ printf(" nFrameHeight = %" PRIu32 "\n", videoDef->nFrameHeight);
+ printf(" nStride = %" PRIu32 "\n", videoDef->nStride);
printf(" eCompressionFormat = %s\n",
videoCompressionFormatString(videoDef->eCompressionFormat));
@@ -4312,10 +4314,10 @@ void OMXCodec::dumpPortStatus(OMX_U32 portIndex) {
mNode, OMX_IndexParamAudioPcm, &params, sizeof(params));
CHECK_EQ(err, (status_t)OK);
- printf(" nSamplingRate = %ld\n", params.nSamplingRate);
- printf(" nChannels = %ld\n", params.nChannels);
+ printf(" nSamplingRate = %" PRIu32 "\n", params.nSamplingRate);
+ printf(" nChannels = %" PRIu32 "\n", params.nChannels);
printf(" bInterleaved = %d\n", params.bInterleaved);
- printf(" nBitPerSample = %ld\n", params.nBitPerSample);
+ printf(" nBitPerSample = %" PRIu32 "\n", params.nBitPerSample);
printf(" eNumData = %s\n",
params.eNumData == OMX_NumericalDataSigned
@@ -4331,7 +4333,7 @@ void OMXCodec::dumpPortStatus(OMX_U32 portIndex) {
mNode, OMX_IndexParamAudioAmr, &amr, sizeof(amr));
CHECK_EQ(err, (status_t)OK);
- printf(" nChannels = %ld\n", amr.nChannels);
+ printf(" nChannels = %" PRIu32 "\n", amr.nChannels);
printf(" eAMRBandMode = %s\n",
amrBandModeString(amr.eAMRBandMode));
printf(" eAMRFrameFormat = %s\n",
diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm11/api/omxtypes.h b/media/libstagefright/codecs/on2/h264dec/omxdl/arm11/api/omxtypes.h
index 8b295a6..912cb0d 100644
--- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm11/api/omxtypes.h
+++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm11/api/omxtypes.h
@@ -32,6 +32,7 @@
#define _OMXTYPES_H_
#include <limits.h>
+#include <stdint.h>
#define OMX_IN
#define OMX_OUT
@@ -75,64 +76,22 @@ typedef enum {
/* OMX_U8 */
-#if UCHAR_MAX == 0xff
-typedef unsigned char OMX_U8;
-#elif USHRT_MAX == 0xff
-typedef unsigned short int OMX_U8;
-#else
-#error OMX_U8 undefined
-#endif
-
+typedef uint8_t OMX_U8;
/* OMX_S8 */
-#if SCHAR_MAX == 0x7f
-typedef signed char OMX_S8;
-#elif SHRT_MAX == 0x7f
-typedef signed short int OMX_S8;
-#else
-#error OMX_S8 undefined
-#endif
-
+typedef int8_t OMX_S8;
/* OMX_U16 */
-#if USHRT_MAX == 0xffff
-typedef unsigned short int OMX_U16;
-#elif UINT_MAX == 0xffff
-typedef unsigned int OMX_U16;
-#else
-#error OMX_U16 undefined
-#endif
-
+typedef uint16_t OMX_U16;
/* OMX_S16 */
-#if SHRT_MAX == 0x7fff
-typedef signed short int OMX_S16;
-#elif INT_MAX == 0x7fff
-typedef signed int OMX_S16;
-#else
-#error OMX_S16 undefined
-#endif
-
+typedef int16_t OMX_S16;
/* OMX_U32 */
-#if UINT_MAX == 0xffffffff
-typedef unsigned int OMX_U32;
-#elif LONG_MAX == 0xffffffff
-typedef unsigned long int OMX_U32;
-#else
-#error OMX_U32 undefined
-#endif
-
+typedef uint32_t OMX_U32;
/* OMX_S32 */
-#if INT_MAX == 0x7fffffff
-typedef signed int OMX_S32;
-#elif LONG_MAX == 0x7fffffff
-typedef long signed int OMX_S32;
-#else
-#error OMX_S32 undefined
-#endif
-
+typedef int32_t OMX_S32;
/* OMX_U64 & OMX_S64 */
#if defined( _WIN32 ) || defined ( _WIN64 )
@@ -143,15 +102,14 @@ typedef long signed int OMX_S32;
#define OMX_MAX_S64 (0x7FFFFFFFFFFFFFFFi64)
#define OMX_MAX_U64 (0xFFFFFFFFFFFFFFFFi64)
#else
- typedef long long OMX_S64; /** Signed 64-bit integer */
- typedef unsigned long long OMX_U64; /** Unsigned 64-bit integer */
+ typedef int64_t OMX_S64; /** Signed 64-bit integer */
+ typedef uint64_t OMX_U64; /** Unsigned 64-bit integer */
#define OMX_MIN_S64 (0x8000000000000000LL)
#define OMX_MIN_U64 (0x0000000000000000LL)
#define OMX_MAX_S64 (0x7FFFFFFFFFFFFFFFLL)
#define OMX_MAX_U64 (0xFFFFFFFFFFFFFFFFLL)
#endif
-
/* OMX_SC8 */
typedef struct
{
diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/omxtypes.h b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/omxtypes.h
index 8b295a6..912cb0d 100755
--- a/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/omxtypes.h
+++ b/media/libstagefright/codecs/on2/h264dec/omxdl/arm_neon/api/omxtypes.h
@@ -32,6 +32,7 @@
#define _OMXTYPES_H_
#include <limits.h>
+#include <stdint.h>
#define OMX_IN
#define OMX_OUT
@@ -75,64 +76,22 @@ typedef enum {
/* OMX_U8 */
-#if UCHAR_MAX == 0xff
-typedef unsigned char OMX_U8;
-#elif USHRT_MAX == 0xff
-typedef unsigned short int OMX_U8;
-#else
-#error OMX_U8 undefined
-#endif
-
+typedef uint8_t OMX_U8;
/* OMX_S8 */
-#if SCHAR_MAX == 0x7f
-typedef signed char OMX_S8;
-#elif SHRT_MAX == 0x7f
-typedef signed short int OMX_S8;
-#else
-#error OMX_S8 undefined
-#endif
-
+typedef int8_t OMX_S8;
/* OMX_U16 */
-#if USHRT_MAX == 0xffff
-typedef unsigned short int OMX_U16;
-#elif UINT_MAX == 0xffff
-typedef unsigned int OMX_U16;
-#else
-#error OMX_U16 undefined
-#endif
-
+typedef uint16_t OMX_U16;
/* OMX_S16 */
-#if SHRT_MAX == 0x7fff
-typedef signed short int OMX_S16;
-#elif INT_MAX == 0x7fff
-typedef signed int OMX_S16;
-#else
-#error OMX_S16 undefined
-#endif
-
+typedef int16_t OMX_S16;
/* OMX_U32 */
-#if UINT_MAX == 0xffffffff
-typedef unsigned int OMX_U32;
-#elif LONG_MAX == 0xffffffff
-typedef unsigned long int OMX_U32;
-#else
-#error OMX_U32 undefined
-#endif
-
+typedef uint32_t OMX_U32;
/* OMX_S32 */
-#if INT_MAX == 0x7fffffff
-typedef signed int OMX_S32;
-#elif LONG_MAX == 0x7fffffff
-typedef long signed int OMX_S32;
-#else
-#error OMX_S32 undefined
-#endif
-
+typedef int32_t OMX_S32;
/* OMX_U64 & OMX_S64 */
#if defined( _WIN32 ) || defined ( _WIN64 )
@@ -143,15 +102,14 @@ typedef long signed int OMX_S32;
#define OMX_MAX_S64 (0x7FFFFFFFFFFFFFFFi64)
#define OMX_MAX_U64 (0xFFFFFFFFFFFFFFFFi64)
#else
- typedef long long OMX_S64; /** Signed 64-bit integer */
- typedef unsigned long long OMX_U64; /** Unsigned 64-bit integer */
+ typedef int64_t OMX_S64; /** Signed 64-bit integer */
+ typedef uint64_t OMX_U64; /** Unsigned 64-bit integer */
#define OMX_MIN_S64 (0x8000000000000000LL)
#define OMX_MIN_U64 (0x0000000000000000LL)
#define OMX_MAX_S64 (0x7FFFFFFFFFFFFFFFLL)
#define OMX_MAX_U64 (0xFFFFFFFFFFFFFFFFLL)
#endif
-
/* OMX_SC8 */
typedef struct
{
diff --git a/media/libstagefright/codecs/on2/h264dec/omxdl/reference/api/omxtypes.h b/media/libstagefright/codecs/on2/h264dec/omxdl/reference/api/omxtypes.h
index 8b295a6..912cb0d 100644
--- a/media/libstagefright/codecs/on2/h264dec/omxdl/reference/api/omxtypes.h
+++ b/media/libstagefright/codecs/on2/h264dec/omxdl/reference/api/omxtypes.h
@@ -32,6 +32,7 @@
#define _OMXTYPES_H_
#include <limits.h>
+#include <stdint.h>
#define OMX_IN
#define OMX_OUT
@@ -75,64 +76,22 @@ typedef enum {
/* OMX_U8 */
-#if UCHAR_MAX == 0xff
-typedef unsigned char OMX_U8;
-#elif USHRT_MAX == 0xff
-typedef unsigned short int OMX_U8;
-#else
-#error OMX_U8 undefined
-#endif
-
+typedef uint8_t OMX_U8;
/* OMX_S8 */
-#if SCHAR_MAX == 0x7f
-typedef signed char OMX_S8;
-#elif SHRT_MAX == 0x7f
-typedef signed short int OMX_S8;
-#else
-#error OMX_S8 undefined
-#endif
-
+typedef int8_t OMX_S8;
/* OMX_U16 */
-#if USHRT_MAX == 0xffff
-typedef unsigned short int OMX_U16;
-#elif UINT_MAX == 0xffff
-typedef unsigned int OMX_U16;
-#else
-#error OMX_U16 undefined
-#endif
-
+typedef uint16_t OMX_U16;
/* OMX_S16 */
-#if SHRT_MAX == 0x7fff
-typedef signed short int OMX_S16;
-#elif INT_MAX == 0x7fff
-typedef signed int OMX_S16;
-#else
-#error OMX_S16 undefined
-#endif
-
+typedef int16_t OMX_S16;
/* OMX_U32 */
-#if UINT_MAX == 0xffffffff
-typedef unsigned int OMX_U32;
-#elif LONG_MAX == 0xffffffff
-typedef unsigned long int OMX_U32;
-#else
-#error OMX_U32 undefined
-#endif
-
+typedef uint32_t OMX_U32;
/* OMX_S32 */
-#if INT_MAX == 0x7fffffff
-typedef signed int OMX_S32;
-#elif LONG_MAX == 0x7fffffff
-typedef long signed int OMX_S32;
-#else
-#error OMX_S32 undefined
-#endif
-
+typedef int32_t OMX_S32;
/* OMX_U64 & OMX_S64 */
#if defined( _WIN32 ) || defined ( _WIN64 )
@@ -143,15 +102,14 @@ typedef long signed int OMX_S32;
#define OMX_MAX_S64 (0x7FFFFFFFFFFFFFFFi64)
#define OMX_MAX_U64 (0xFFFFFFFFFFFFFFFFi64)
#else
- typedef long long OMX_S64; /** Signed 64-bit integer */
- typedef unsigned long long OMX_U64; /** Unsigned 64-bit integer */
+ typedef int64_t OMX_S64; /** Signed 64-bit integer */
+ typedef uint64_t OMX_U64; /** Unsigned 64-bit integer */
#define OMX_MIN_S64 (0x8000000000000000LL)
#define OMX_MIN_U64 (0x0000000000000000LL)
#define OMX_MAX_S64 (0x7FFFFFFFFFFFFFFFLL)
#define OMX_MAX_U64 (0xFFFFFFFFFFFFFFFFLL)
#endif
-
/* OMX_SC8 */
typedef struct
{
diff --git a/media/libstagefright/omx/GraphicBufferSource.cpp b/media/libstagefright/omx/GraphicBufferSource.cpp
index 1be76b3..3df57b4 100644
--- a/media/libstagefright/omx/GraphicBufferSource.cpp
+++ b/media/libstagefright/omx/GraphicBufferSource.cpp
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+#include <inttypes.h>
+
#define LOG_TAG "GraphicBufferSource"
//#define LOG_NDEBUG 0
#include <utils/Log.h>
@@ -205,7 +207,7 @@ void GraphicBufferSource::addCodecBuffer(OMX_BUFFERHEADERTYPE* header) {
return;
}
- ALOGV("addCodecBuffer h=%p size=%lu p=%p",
+ ALOGV("addCodecBuffer h=%p size=%" PRIu32 " p=%p",
header, header->nAllocLen, header->pBuffer);
CodecBuffer codecBuffer;
codecBuffer.mHeader = header;
@@ -226,7 +228,7 @@ void GraphicBufferSource::codecBufferEmptied(OMX_BUFFERHEADERTYPE* header) {
return;
}
- ALOGV("codecBufferEmptied h=%p size=%lu filled=%lu p=%p",
+ ALOGV("codecBufferEmptied h=%p size=%" PRIu32 " filled=%" PRIu32 " p=%p",
header, header->nAllocLen, header->nFilledLen,
header->pBuffer);
CodecBuffer& codecBuffer(mCodecBuffers.editItemAt(cbi));
diff --git a/media/libstagefright/omx/OMX.cpp b/media/libstagefright/omx/OMX.cpp
index a608479..74076c6 100644
--- a/media/libstagefright/omx/OMX.cpp
+++ b/media/libstagefright/omx/OMX.cpp
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+#include <inttypes.h>
+
//#define LOG_NDEBUG 0
#define LOG_TAG "OMX"
#include <utils/Log.h>
@@ -425,7 +427,7 @@ OMX_ERRORTYPE OMX::OnEvent(
OMX_IN OMX_U32 nData1,
OMX_IN OMX_U32 nData2,
OMX_IN OMX_PTR /* pEventData */) {
- ALOGV("OnEvent(%d, %ld, %ld)", eEvent, nData1, nData2);
+ ALOGV("OnEvent(%d, %" PRIu32", %" PRIu32 ")", eEvent, nData1, nData2);
// Forward to OMXNodeInstance.
findInstance(node)->onEvent(eEvent, nData1, nData2);
diff --git a/media/libstagefright/omx/SoftVideoDecoderOMXComponent.cpp b/media/libstagefright/omx/SoftVideoDecoderOMXComponent.cpp
index 08a3d42..eb9fcf7 100644
--- a/media/libstagefright/omx/SoftVideoDecoderOMXComponent.cpp
+++ b/media/libstagefright/omx/SoftVideoDecoderOMXComponent.cpp
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+#include <inttypes.h>
+
//#define LOG_NDEBUG 0
#define LOG_TAG "SoftVideoDecoderOMXComponent"
#include <utils/Log.h>
@@ -177,7 +179,7 @@ OMX_ERRORTYPE SoftVideoDecoderOMXComponent::internalGetParameter(
(OMX_VIDEO_PARAM_PROFILELEVELTYPE *) params;
if (profileLevel->nPortIndex != kInputPortIndex) {
- ALOGE("Invalid port index: %ld", profileLevel->nPortIndex);
+ ALOGE("Invalid port index: %" PRIu32, profileLevel->nPortIndex);
return OMX_ErrorUnsupportedIndex;
}
diff --git a/media/mtp/MtpDevice.cpp b/media/mtp/MtpDevice.cpp
index d672dff..d6d5dd5 100644
--- a/media/mtp/MtpDevice.cpp
+++ b/media/mtp/MtpDevice.cpp
@@ -195,7 +195,7 @@ MtpDevice::MtpDevice(struct usb_device* device, int interface,
MtpDevice::~MtpDevice() {
close();
- for (int i = 0; i < mDeviceProperties.size(); i++)
+ for (size_t i = 0; i < mDeviceProperties.size(); i++)
delete mDeviceProperties[i];
usb_request_free(mRequestIn1);
usb_request_free(mRequestIn2);
@@ -253,7 +253,7 @@ void MtpDevice::print() {
ALOGI("*** FORMAT: %s\n", MtpDebug::getFormatCodeName(format));
MtpObjectPropertyList* props = getObjectPropsSupported(format);
if (props) {
- for (int j = 0; j < props->size(); j++) {
+ for (size_t j = 0; j < props->size(); j++) {
MtpObjectProperty prop = (*props)[j];
MtpProperty* property = getObjectPropDesc(prop, format);
if (property) {
diff --git a/media/mtp/MtpServer.cpp b/media/mtp/MtpServer.cpp
index dadfb54..157f2ce 100644
--- a/media/mtp/MtpServer.cpp
+++ b/media/mtp/MtpServer.cpp
@@ -20,6 +20,7 @@
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <fcntl.h>
+#include <inttypes.h>
#include <errno.h>
#include <sys/stat.h>
#include <dirent.h>
@@ -125,7 +126,7 @@ void MtpServer::addStorage(MtpStorage* storage) {
void MtpServer::removeStorage(MtpStorage* storage) {
Mutex::Autolock autoLock(mMutex);
- for (int i = 0; i < mStorages.size(); i++) {
+ for (size_t i = 0; i < mStorages.size(); i++) {
if (mStorages[i] == storage) {
mStorages.removeAt(i);
sendStoreRemoved(storage->getStorageID());
@@ -137,7 +138,7 @@ void MtpServer::removeStorage(MtpStorage* storage) {
MtpStorage* MtpServer::getStorage(MtpStorageID id) {
if (id == 0)
return mStorages[0];
- for (int i = 0; i < mStorages.size(); i++) {
+ for (size_t i = 0; i < mStorages.size(); i++) {
MtpStorage* storage = mStorages[i];
if (storage->getStorageID() == id)
return storage;
@@ -1116,7 +1117,7 @@ MtpResponseCode MtpServer::doSendPartialObject() {
}
const char* filePath = (const char *)edit->mPath;
- ALOGV("receiving partial %s %lld %lld\n", filePath, offset, length);
+ ALOGV("receiving partial %s %lld %" PRIu32 "\n", filePath, offset, length);
// read the header, and possibly some data
int ret = mData.read(mFD);
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
index bb8c15e..755d480 100644
--- a/services/audioflinger/AudioFlinger.cpp
+++ b/services/audioflinger/AudioFlinger.cpp
@@ -607,7 +607,7 @@ sp<IAudioTrack> AudioFlinger::createTrack(
}
// Look for sync events awaiting for a session to be used.
- for (int i = 0; i < (int)mPendingSyncEvents.size(); i++) {
+ for (size_t i = 0; i < mPendingSyncEvents.size(); i++) {
if (mPendingSyncEvents[i]->triggerSession() == lSessionId) {
if (thread->isValidSyncEvent(mPendingSyncEvents[i])) {
if (lStatus == NO_ERROR) {
@@ -912,7 +912,7 @@ status_t AudioFlinger::setStreamMute(audio_stream_type_t stream, bool muted)
AutoMutex lock(mLock);
mStreamTypes[stream].mute = muted;
- for (uint32_t i = 0; i < mPlaybackThreads.size(); i++)
+ for (size_t i = 0; i < mPlaybackThreads.size(); i++)
mPlaybackThreads.valueAt(i)->setStreamMute(stream, muted);
return NO_ERROR;
diff --git a/services/audioflinger/Tracks.cpp b/services/audioflinger/Tracks.cpp
index 2cf10e2..1064fd1 100644
--- a/services/audioflinger/Tracks.cpp
+++ b/services/audioflinger/Tracks.cpp
@@ -930,7 +930,7 @@ bool AudioFlinger::PlaybackThread::Track::presentationComplete(size_t framesWrit
void AudioFlinger::PlaybackThread::Track::triggerEvents(AudioSystem::sync_event_t type)
{
- for (int i = 0; i < (int)mSyncEvents.size(); i++) {
+ for (size_t i = 0; i < mSyncEvents.size(); i++) {
if (mSyncEvents[i]->type() == type) {
mSyncEvents[i]->trigger();
mSyncEvents.removeAt(i);