summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2015-02-20 13:53:55 -0800
committerDan Albert <danalbert@google.com>2015-02-20 13:53:55 -0800
commitce70dcd9a00883626adc4def15776639428625d9 (patch)
treeec5909482ac392e6bfa2dc5e94ab63f8ae741aec
parente5aad73d4992d6c8fbd9e9e3c9cc89abfc83b775 (diff)
downloadutils-android-m-preview.tar.gz
Change-Id: I1e845053f614c757f727ca09d3da7bf14d89bcab
-rw-r--r--ISV/base/isv_bufmanager.cpp32
-rw-r--r--ISV/base/isv_processor.cpp52
-rw-r--r--ISV/omx/isv_omxcomponent.cpp5
-rw-r--r--ISV/omx/isv_omxcore.cpp9
-rw-r--r--ISV/profile/isv_profile.cpp2
5 files changed, 69 insertions, 31 deletions
diff --git a/ISV/base/isv_bufmanager.cpp b/ISV/base/isv_bufmanager.cpp
index a00e4fc..f6376ce 100644
--- a/ISV/base/isv_bufmanager.cpp
+++ b/ISV/base/isv_bufmanager.cpp
@@ -15,6 +15,8 @@
*
*/
+#include <inttypes.h>
+
#include <media/hardware/HardwareAPI.h>
#include <system/graphics.h>
#include "isv_bufmanager.h"
@@ -97,12 +99,15 @@ status_t ISVBuffer::initBufferInfo(uint32_t hackFormat)
}
if (STATUS_OK != mWorker->allocSurface(&mWidth, &mHeight, mStride, mColorFormat, mGrallocHandle, &mSurface)) {
- ALOGE("%s: alloc surface failed, mGrallocHandle %p", __func__, mGrallocHandle);
+ ALOGE("%s: alloc surface failed, mGrallocHandle %lu", __func__, mGrallocHandle);
return UNKNOWN_ERROR;
}
- ALOGD_IF(ISV_BUFFER_MANAGER_DEBUG, "%s: mWidth %d, mHeight %d, mStride %d, mColorFormat %d, mGrallocHandle %p, mSurface %d",
- __func__, mWidth, mHeight, mStride, mColorFormat, mGrallocHandle, mSurface);
+ ALOGD_IF(ISV_BUFFER_MANAGER_DEBUG,
+ "%s: mWidth %d, mHeight %d, mStride %d, mColorFormat %d, "
+ "mGrallocHandle %p, mSurface %d",
+ __func__, mWidth, mHeight, mStride, mColorFormat,
+ reinterpret_cast<void*>(mGrallocHandle), mSurface);
return OK;
}
@@ -165,13 +170,13 @@ status_t ISVBufferManager::freeBuffer(unsigned long handle)
if (isvBuffer->getHandle() == handle) {
delete isvBuffer;
mBuffers.removeAt(i);
- ALOGD_IF(ISV_BUFFER_MANAGER_DEBUG, "%s: remove handle 0x%08x, and then mBuffers.size() %d", __func__,
+ ALOGD_IF(ISV_BUFFER_MANAGER_DEBUG, "%s: remove handle 0x%08lx, and then mBuffers.size() %d", __func__,
handle, mBuffers.size());
return OK;
}
}
- ALOGW("%s: can't find buffer %u", __func__, handle);
+ ALOGW("%s: can't find buffer %lu", __func__, handle);
return UNKNOWN_ERROR;
}
@@ -184,7 +189,7 @@ status_t ISVBufferManager::useBuffer(unsigned long handle)
for (uint32_t i = 0; i < mBuffers.size(); i++) {
ISVBuffer* isvBuffer = mBuffers.itemAt(i);
if (isvBuffer->getHandle() == handle) {
- ALOGE("%s: this buffer 0x%08x has already been registered", __func__, handle);
+ ALOGE("%s: this buffer 0x%08lx has already been registered", __func__, handle);
return UNKNOWN_ERROR;
}
}
@@ -193,8 +198,9 @@ status_t ISVBufferManager::useBuffer(unsigned long handle)
mMetaDataMode ? ISVBuffer::ISV_BUFFER_METADATA : ISVBuffer::ISV_BUFFER_GRALLOC,
mNeedClearBuffers ? ISVBuffer::ISV_BUFFER_NEED_CLEAR : 0);
- ALOGD_IF(ISV_BUFFER_MANAGER_DEBUG, "%s: add handle 0x%08x, and then mBuffers.size() %d", __func__,
- handle, mBuffers.size());
+ ALOGD_IF(ISV_BUFFER_MANAGER_DEBUG,
+ "%s: add handle 0x%08lx, and then mBuffers.size() %d", __func__,
+ handle, mBuffers.size());
mBuffers.push_back(isvBuffer);
return OK;
@@ -209,7 +215,9 @@ status_t ISVBufferManager::useBuffer(const sp<ANativeWindowBuffer> nativeBuffer)
for (uint32_t i = 0; i < mBuffers.size(); i++) {
ISVBuffer* isvBuffer = mBuffers.itemAt(i);
if (isvBuffer->getHandle() == (unsigned long)nativeBuffer->handle) {
- ALOGE("%s: this buffer 0x%08x has already been registered", __func__, nativeBuffer->handle);
+ ALOGE(
+ "%s: this buffer 0x%08" PRIxPTR " has already been registered",
+ __func__, reinterpret_cast<uintptr_t>(nativeBuffer->handle));
return UNKNOWN_ERROR;
}
}
@@ -221,8 +229,10 @@ status_t ISVBufferManager::useBuffer(const sp<ANativeWindowBuffer> nativeBuffer)
mMetaDataMode ? ISVBuffer::ISV_BUFFER_METADATA : ISVBuffer::ISV_BUFFER_GRALLOC,
mNeedClearBuffers ? ISVBuffer::ISV_BUFFER_NEED_CLEAR : 0);
- ALOGD_IF(ISV_BUFFER_MANAGER_DEBUG, "%s: add handle 0x%08x, and then mBuffers.size() %d", __func__,
- nativeBuffer->handle, mBuffers.size());
+ ALOGD_IF(ISV_BUFFER_MANAGER_DEBUG,
+ "%s: add handle 0x%08" PRIxPTR ", and then mBuffers.size() %d",
+ __func__, reinterpret_cast<uintptr_t>(nativeBuffer->handle),
+ mBuffers.size());
mBuffers.push_back(isvBuffer);
return OK;
}
diff --git a/ISV/base/isv_processor.cpp b/ISV/base/isv_processor.cpp
index 990c15a..67f9158 100644
--- a/ISV/base/isv_processor.cpp
+++ b/ISV/base/isv_processor.cpp
@@ -15,6 +15,7 @@
*
*/
+#include <inttypes.h>
#include <math.h>
#include <utils/Errors.h>
#include "isv_processor.h"
@@ -208,8 +209,11 @@ status_t ISVProcessor::updateFirmwareOutputBufStatus(uint32_t fillBufNum) {
}
mInputBuffers.removeAt(0);
- ALOGD_IF(ISV_THREAD_DEBUG, "%s: fetch buffer %u from input buffer queue for fill to decoder, and then queue size is %d", __func__,
- inputBuffer, mInputBuffers.size());
+ ALOGD_IF(
+ ISV_THREAD_DEBUG,
+ "%s: fetch buffer %" PRIuPTR " from input buffer queue for fill to "
+ "decoder, and then queue size is %d", __func__,
+ reinterpret_cast<uintptr_t>(inputBuffer), mInputBuffers.size());
mInputProcIdx--;
}
@@ -241,8 +245,12 @@ status_t ISVProcessor::updateFirmwareOutputBufStatus(uint32_t fillBufNum) {
return UNKNOWN_ERROR;
}
- ALOGD_IF(ISV_THREAD_DEBUG, "%s: fetch buffer %u(timestamp %.2f ms) from output buffer queue for render, and then queue size is %d", __func__,
- outputBuffer, outputBuffer->nTimeStamp/1E3, mOutputBuffers.size());
+ ALOGD_IF(
+ ISV_THREAD_DEBUG,
+ "%s: fetch buffer %" PRIuPTR "(timestamp %.2f ms) from output "
+ "buffer queue for render, and then queue size is %d", __func__,
+ reinterpret_cast<uintptr_t>(outputBuffer),
+ outputBuffer->nTimeStamp/1E3, mOutputBuffers.size());
}
// remove filled buffers from output buffer queue
mOutputBuffers.removeItemsAt(0, fillBufNum);
@@ -519,8 +527,10 @@ void ISVProcessor::addInput(OMX_BUFFERHEADERTYPE* input)
if (ret == NOT_ENOUGH_DATA) {
// release this buffer if frc is not ready.
mpOwner->releaseBuffer(kPortIndexInput, input, false);
- ALOGD_IF(ISV_THREAD_DEBUG, "%s: frc rate is not ready, release this buffer %u, fps %d", __func__,
- input, mFilterParam.frameRate);
+ ALOGD_IF(ISV_THREAD_DEBUG,
+ "%s: frc rate is not ready, release this buffer %" PRIuPTR
+ ", fps %d", __func__, reinterpret_cast<uintptr_t>(input),
+ mFilterParam.frameRate);
return;
} else if (ret == UNKNOWN_ERROR) {
ALOGD_IF(ISV_THREAD_DEBUG, "%s: configFilters failed, bypass ISV", __func__);
@@ -536,10 +546,12 @@ void ISVProcessor::addInput(OMX_BUFFERHEADERTYPE* input)
ALOGD_IF(ISV_COMPONENT_LOCK_DEBUG, "%s: acqired mInputLock", __func__);
mInputBuffers.push_back(input);
- ALOGD_IF(ISV_THREAD_DEBUG, "%s: hold pBuffer %u in input buffer queue. Intput queue size is %d, mInputProIdx %d.\
- Output queue size is %d, mOutputProcIdx %d", __func__,
- input, mInputBuffers.size(), mInputProcIdx,
- mOutputBuffers.size(), mOutputProcIdx);
+ ALOGD_IF(ISV_THREAD_DEBUG,
+ "%s: hold pBuffer %" PRIuPTR " in input buffer queue. Input "
+ "queue size is %d, mInputProIdx %d. Output queue size is %d, "
+ "mOutputProcIdx %d", __func__,
+ reinterpret_cast<uintptr_t>(input), mInputBuffers.size(),
+ mInputProcIdx, mOutputBuffers.size(), mOutputProcIdx);
ALOGD_IF(ISV_COMPONENT_LOCK_DEBUG, "%s: releasing mInputLock", __func__);
}
@@ -570,10 +582,12 @@ void ISVProcessor::addOutput(OMX_BUFFERHEADERTYPE* output)
ALOGD_IF(ISV_COMPONENT_LOCK_DEBUG, "%s: acqired mOutputLock", __func__);
mOutputBuffers.push_back(output);
- ALOGD_IF(ISV_THREAD_DEBUG, "%s: hold pBuffer %u in output buffer queue. Input queue size is %d, mInputProIdx %d.\
- Output queue size is %d, mOutputProcIdx %d", __func__,
- output, mInputBuffers.size(), mInputProcIdx,
- mOutputBuffers.size(), mOutputProcIdx);
+ ALOGD_IF(ISV_THREAD_DEBUG,
+ "%s: hold pBuffer %" PRIuPTR " in output buffer queue. Input "
+ "queue size is %d, mInputProIdx %d. Output queue size is %d, "
+ "mOutputProcIdx %d", __func__,
+ reinterpret_cast<uintptr_t>(output), mInputBuffers.size(),
+ mInputProcIdx, mOutputBuffers.size(), mOutputProcIdx);
ALOGD_IF(ISV_COMPONENT_LOCK_DEBUG, "%s: releasing mOutputLock", __func__);
}
@@ -616,7 +630,10 @@ void ISVProcessor::flush()
while (!mInputBuffers.empty()) {
pBuffer = mInputBuffers.itemAt(0);
mpOwner->releaseBuffer(kPortIndexInput, pBuffer, true);
- ALOGD_IF(ISV_THREAD_DEBUG, "%s: Flush the pBuffer %u in input buffer queue.", __func__, pBuffer);
+ ALOGD_IF(
+ ISV_THREAD_DEBUG,
+ "%s: Flush the pBuffer %" PRIuPTR " in input buffer queue.",
+ __func__, reinterpret_cast<uintptr_t>(pBuffer));
mInputBuffers.removeAt(0);
}
}
@@ -625,7 +642,10 @@ void ISVProcessor::flush()
while (!mOutputBuffers.empty()) {
pBuffer = mOutputBuffers.itemAt(0);
mpOwner->releaseBuffer(kPortIndexOutput, pBuffer, true);
- ALOGD_IF(ISV_THREAD_DEBUG, "%s: Flush the pBuffer %u in output buffer queue.", __func__, pBuffer);
+ ALOGD_IF(
+ ISV_THREAD_DEBUG,
+ "%s: Flush the pBuffer %" PRIuPTR " in output buffer queue.",
+ __func__, reinterpret_cast<uintptr_t>(pBuffer));
mOutputBuffers.removeAt(0);
}
}
diff --git a/ISV/omx/isv_omxcomponent.cpp b/ISV/omx/isv_omxcomponent.cpp
index 94d6f6d..1cce8a2 100644
--- a/ISV/omx/isv_omxcomponent.cpp
+++ b/ISV/omx/isv_omxcomponent.cpp
@@ -15,6 +15,7 @@
*
*/
+#include <inttypes.h>
#include <OMX_Component.h>
#include "isv_omxcomponent.h"
@@ -775,7 +776,9 @@ OMX_ERRORTYPE ISVComponent::ISV_EventHandler(
default:
{
- ALOGD_IF(ISV_COMPONENT_DEBUG, "%s: EVENT(%d, %ld, %ld)", __func__, eEvent, nData1, nData2);
+ ALOGD_IF(
+ ISV_COMPONENT_DEBUG, "%s: EVENT(%d, %" PRId32 ", %" PRId32 ")",
+ __func__, eEvent, nData1, nData2);
break;
}
}
diff --git a/ISV/omx/isv_omxcore.cpp b/ISV/omx/isv_omxcore.cpp
index 5f6933b..486fcca 100644
--- a/ISV/omx/isv_omxcore.cpp
+++ b/ISV/omx/isv_omxcore.cpp
@@ -15,6 +15,8 @@
*
*/
+#include <inttypes.h>
+
#include <OMX_Core.h>
#include <OMX_Component.h>
#include <dlfcn.h>
@@ -93,7 +95,9 @@ OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_Init(void)
}
g_cores[i].mNumComponents = tmpIndex;
g_nr_comp += g_cores[i].mNumComponents;
- ALOGD_IF(ISV_CORE_DEBUG, "OMX IL core: contains %ld components", g_cores[i].mNumComponents);
+ ALOGD_IF(ISV_CORE_DEBUG,
+ "OMX IL core: contains %" PRIu32 " components",
+ g_cores[i].mNumComponents);
}
} else {
pthread_mutex_unlock(&g_module_lock);
@@ -151,7 +155,8 @@ OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_ComponentNameEnum(
}
if (relativeIndex < g_cores[i].mNumComponents) {
pthread_mutex_unlock(&g_module_lock);
- ALOGD_IF(ISV_CORE_DEBUG, "%s: found %luth component %s", __func__, nIndex, cComponentName);
+ ALOGD_IF(ISV_CORE_DEBUG, "%s: found %" PRIu32 "th component %s",
+ __func__, nIndex, cComponentName);
return ((*(g_cores[i].mComponentNameEnum))(cComponentName, nNameLength, relativeIndex));
} else relativeIndex -= g_cores[i].mNumComponents;
}
diff --git a/ISV/profile/isv_profile.cpp b/ISV/profile/isv_profile.cpp
index 86fdd02..c855ce8 100644
--- a/ISV/profile/isv_profile.cpp
+++ b/ISV/profile/isv_profile.cpp
@@ -254,7 +254,7 @@ void ISVProfile::handleFilterParameter(const char *name, const char **atts)
int attIndex = 0;
if (!mCurrentFilter) {
- ALOGE("\"%s\" must be in Filter element\n");
+ ALOGE("\"%s\" must be in Filter element\n", name);
return;
}