Loading media/libstagefright/omx/OMXNodeInstance.cpp +26 −24 Original line number Diff line number Diff line Loading @@ -445,11 +445,7 @@ status_t OMXNodeInstance::enableNativeBuffers( OMX_INDEXTYPE index; OMX_ERRORTYPE err = OMX_GetExtensionIndex(mHandle, name, &index); if (err != OMX_ErrorNone) { CLOG_ERROR_IF(enable, getExtensionIndex, err, "%s", name); return StatusFromOMXError(err); } if (err == OMX_ErrorNone) { EnableAndroidNativeBuffersParams params; InitOMXParams(¶ms); params.nPortIndex = portIndex; Loading @@ -459,24 +455,30 @@ status_t OMXNodeInstance::enableNativeBuffers( CLOG_IF_ERROR(setParameter, err, "%s(%#x): %s:%u en=%d", name, index, portString(portIndex), portIndex, enable); if (!graphic) { if (err == OK) { if (err == OMX_ErrorNone) { mSecureBufferType[portIndex] = enable ? kSecureBufferTypeNativeHandle : kSecureBufferTypeOpaque; } else if (mSecureBufferType[portIndex] == kSecureBufferTypeUnknown) { // BEGIN ALTERNATE SIGNALING FOR USING NATIVE HANDLES mSecureBufferType[portIndex] = kSecureBufferTypeOpaque; } } } else { CLOG_ERROR_IF(enable, getExtensionIndex, err, "%s", name); if (!graphic) { // Extension not supported, check for manual override with system property // This is a temporary workaround until partners support the OMX extension char value[PROPERTY_VALUE_MAX]; if (property_get("media.mediadrmservice.enable", value, NULL) && (!strcmp("1", value) || !strcasecmp("true", value))) { CLOG_CONFIG(enableNativeBuffers, "system property override: using native-handles"); mSecureBufferType[portIndex] = kSecureBufferTypeNativeHandle; return OK; } // END ALTERNATE SIGNALING FOR USING NATIVE HANDLES } else if (mSecureBufferType[portIndex] == kSecureBufferTypeUnknown) { mSecureBufferType[portIndex] = kSecureBufferTypeOpaque; } err = OMX_ErrorNone; } } return StatusFromOMXError(err); } Loading Loading
media/libstagefright/omx/OMXNodeInstance.cpp +26 −24 Original line number Diff line number Diff line Loading @@ -445,11 +445,7 @@ status_t OMXNodeInstance::enableNativeBuffers( OMX_INDEXTYPE index; OMX_ERRORTYPE err = OMX_GetExtensionIndex(mHandle, name, &index); if (err != OMX_ErrorNone) { CLOG_ERROR_IF(enable, getExtensionIndex, err, "%s", name); return StatusFromOMXError(err); } if (err == OMX_ErrorNone) { EnableAndroidNativeBuffersParams params; InitOMXParams(¶ms); params.nPortIndex = portIndex; Loading @@ -459,24 +455,30 @@ status_t OMXNodeInstance::enableNativeBuffers( CLOG_IF_ERROR(setParameter, err, "%s(%#x): %s:%u en=%d", name, index, portString(portIndex), portIndex, enable); if (!graphic) { if (err == OK) { if (err == OMX_ErrorNone) { mSecureBufferType[portIndex] = enable ? kSecureBufferTypeNativeHandle : kSecureBufferTypeOpaque; } else if (mSecureBufferType[portIndex] == kSecureBufferTypeUnknown) { // BEGIN ALTERNATE SIGNALING FOR USING NATIVE HANDLES mSecureBufferType[portIndex] = kSecureBufferTypeOpaque; } } } else { CLOG_ERROR_IF(enable, getExtensionIndex, err, "%s", name); if (!graphic) { // Extension not supported, check for manual override with system property // This is a temporary workaround until partners support the OMX extension char value[PROPERTY_VALUE_MAX]; if (property_get("media.mediadrmservice.enable", value, NULL) && (!strcmp("1", value) || !strcasecmp("true", value))) { CLOG_CONFIG(enableNativeBuffers, "system property override: using native-handles"); mSecureBufferType[portIndex] = kSecureBufferTypeNativeHandle; return OK; } // END ALTERNATE SIGNALING FOR USING NATIVE HANDLES } else if (mSecureBufferType[portIndex] == kSecureBufferTypeUnknown) { mSecureBufferType[portIndex] = kSecureBufferTypeOpaque; } err = OMX_ErrorNone; } } return StatusFromOMXError(err); } Loading