diff options
author | Jamie Gennis <jgennis@google.com> | 2013-04-09 16:40:54 -0700 |
---|---|---|
committer | Jamie Gennis <jgennis@google.com> | 2013-04-09 17:41:47 -0700 |
commit | 63594e8f83d982e45bd454224f2d20739b662c40 (patch) | |
tree | c725eba49aceb4799f1412bbdec953c01459c312 /media/libstagefright | |
parent | ec77122351b4e78c1fe5b60a208f76baf8c67591 (diff) | |
download | frameworks_av-63594e8f83d982e45bd454224f2d20739b662c40.zip frameworks_av-63594e8f83d982e45bd454224f2d20739b662c40.tar.gz frameworks_av-63594e8f83d982e45bd454224f2d20739b662c40.tar.bz2 |
OMXNodeInstance: fix OMX_GetExtensionIndex logging
This change fixes the logging of OMX_GetExtensionIndex errors. Under certain
circumstances these errors are not harmful and should not be logged.
Bug: 8538872
Change-Id: I19a13d29ca6263454a9a7a8be205e10363725f31
Diffstat (limited to 'media/libstagefright')
-rw-r--r-- | media/libstagefright/omx/OMXNodeInstance.cpp | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/media/libstagefright/omx/OMXNodeInstance.cpp b/media/libstagefright/omx/OMXNodeInstance.cpp index 46ff22f..971875f 100644 --- a/media/libstagefright/omx/OMXNodeInstance.cpp +++ b/media/libstagefright/omx/OMXNodeInstance.cpp @@ -292,15 +292,14 @@ status_t OMXNodeInstance::getState(OMX_STATETYPE* state) { status_t OMXNodeInstance::enableGraphicBuffers( OMX_U32 portIndex, OMX_BOOL enable) { Mutex::Autolock autoLock(mLock); + OMX_STRING name = const_cast<OMX_STRING>( + "OMX.google.android.index.enableAndroidNativeBuffers"); OMX_INDEXTYPE index; - OMX_ERRORTYPE err = OMX_GetExtensionIndex( - mHandle, - const_cast<OMX_STRING>("OMX.google.android.index.enableAndroidNativeBuffers"), - &index); + OMX_ERRORTYPE err = OMX_GetExtensionIndex(mHandle, name, &index); if (err != OMX_ErrorNone) { - ALOGE("OMX_GetExtensionIndex failed"); + ALOGE("OMX_GetExtensionIndex %s failed", name); return StatusFromOMXError(err); } @@ -331,14 +330,12 @@ status_t OMXNodeInstance::getGraphicBufferUsage( Mutex::Autolock autoLock(mLock); OMX_INDEXTYPE index; - OMX_ERRORTYPE err = OMX_GetExtensionIndex( - mHandle, - const_cast<OMX_STRING>( - "OMX.google.android.index.getAndroidNativeBufferUsage"), - &index); + OMX_STRING name = const_cast<OMX_STRING>( + "OMX.google.android.index.getAndroidNativeBufferUsage"); + OMX_ERRORTYPE err = OMX_GetExtensionIndex(mHandle, name, &index); if (err != OMX_ErrorNone) { - ALOGE("OMX_GetExtensionIndex failed"); + ALOGE("OMX_GetExtensionIndex %s failed", name); return StatusFromOMXError(err); } @@ -381,7 +378,9 @@ status_t OMXNodeInstance::storeMetaDataInBuffers_l( OMX_ERRORTYPE err = OMX_GetExtensionIndex(mHandle, name, &index); if (err != OMX_ErrorNone) { - ALOGE("OMX_GetExtensionIndex %s failed", name); + if (enable) { + ALOGE("OMX_GetExtensionIndex %s failed", name); + } return StatusFromOMXError(err); } @@ -507,13 +506,12 @@ status_t OMXNodeInstance::useGraphicBuffer( return useGraphicBuffer2_l(portIndex, graphicBuffer, buffer); } - OMX_ERRORTYPE err = OMX_GetExtensionIndex( - mHandle, - const_cast<OMX_STRING>("OMX.google.android.index.useAndroidNativeBuffer"), - &index); + OMX_STRING name = const_cast<OMX_STRING>( + "OMX.google.android.index.useAndroidNativeBuffer"); + OMX_ERRORTYPE err = OMX_GetExtensionIndex(mHandle, name, &index); if (err != OMX_ErrorNone) { - ALOGE("OMX_GetExtensionIndex failed"); + ALOGE("OMX_GetExtensionIndex %s failed", name); return StatusFromOMXError(err); } |