diff options
Diffstat (limited to 'videocodec/OMXVideoDecoderBase.cpp')
-rw-r--r-- | videocodec/OMXVideoDecoderBase.cpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/videocodec/OMXVideoDecoderBase.cpp b/videocodec/OMXVideoDecoderBase.cpp index 7087cd4..cbbc9ae 100644 --- a/videocodec/OMXVideoDecoderBase.cpp +++ b/videocodec/OMXVideoDecoderBase.cpp @@ -17,19 +17,22 @@ //#define LOG_NDEBUG 0 #define LOG_TAG "OMXVideoDecoder" #include <wrs_omxil_core/log.h> -#include "OMXVideoDecoderBase.h" + +#include <hardware/gralloc.h> #include <va/va_android.h> +#include "OMXVideoDecoderBase.h" + static const char* VA_RAW_MIME_TYPE = "video/x-raw-va"; static const uint32_t VA_COLOR_FORMAT = 0x7FA00E00; OMXVideoDecoderBase::OMXVideoDecoderBase() : mRotationDegrees(0), - mVideoDecoder(NULL), - mNativeBufferCount(OUTPORT_NATIVE_BUFFER_COUNT), -#ifdef TARGET_HAS_VPP +#ifdef TARGET_HAS_ISV mVppBufferNum(0), #endif + mVideoDecoder(NULL), + mNativeBufferCount(OUTPORT_NATIVE_BUFFER_COUNT), mWorkingMode(RAWDATA_MODE), mErrorReportEnabled (false) { mOMXBufferHeaderTypePtrNum = 0; @@ -219,7 +222,7 @@ OMX_ERRORTYPE OMXVideoDecoderBase::ProcessorDeinit(void) { mOMXBufferHeaderTypePtrNum = 0; memset(&mGraphicBufferParam, 0, sizeof(mGraphicBufferParam)); mRotationDegrees = 0; -#ifdef TARGET_HAS_VPP +#ifdef TARGET_HAS_ISV mVppBufferNum = 0; #endif return OMXComponentCodecBase::ProcessorDeinit(); @@ -474,7 +477,7 @@ OMX_ERRORTYPE OMXVideoDecoderBase::PrepareConfigBuffer(VideoConfigBuffer *p) { } p->rotationDegrees = mRotationDegrees; -#ifdef TARGET_HAS_VPP +#ifdef TARGET_HAS_ISV p->vppBufferNum = mVppBufferNum; #endif p->width = paramPortDefinitionInput->format.video.nFrameWidth; @@ -632,7 +635,7 @@ OMX_ERRORTYPE OMXVideoDecoderBase::HandleFormatChange(void) { uint32_t sliceHeightCropped = heightCropped; int force_realloc = 0; -#ifdef TARGET_HAS_VPP +#ifdef TARGET_HAS_ISV LOGI("============== mVppBufferNum = %d\n", mVppBufferNum); if (paramPortDefinitionOutput.nBufferCountActual - mVppBufferNum < formatInfo->actualBufferNeeded) { #else @@ -761,7 +764,7 @@ OMX_ERRORTYPE OMXVideoDecoderBase::BuildHandlerList(void) { AddHandler(static_cast<OMX_INDEXTYPE>(OMX_IndexExtUseNativeBuffer), GetNativeBuffer, SetNativeBuffer); AddHandler(static_cast<OMX_INDEXTYPE>(OMX_IndexExtEnableNativeBuffer), GetNativeBufferMode, SetNativeBufferMode); AddHandler(static_cast<OMX_INDEXTYPE>(OMX_IndexExtRotationDegrees), GetDecoderRotation, SetDecoderRotation); -#ifdef TARGET_HAS_VPP +#ifdef TARGET_HAS_ISV AddHandler(static_cast<OMX_INDEXTYPE>(OMX_IndexExtVppBufferNum), GetDecoderVppBufferNum, SetDecoderVppBufferNum); #endif AddHandler(OMX_IndexConfigCommonOutputCrop, GetDecoderOutputCrop, SetDecoderOutputCrop); @@ -916,8 +919,8 @@ OMX_ERRORTYPE OMXVideoDecoderBase::SetDecoderRotation(OMX_PTR pStructure) { } } -#ifdef TARGET_HAS_VPP -OMX_ERRORTYPE OMXVideoDecoderBase::GetDecoderVppBufferNum(OMX_PTR pStructure) { +#ifdef TARGET_HAS_ISV +OMX_ERRORTYPE OMXVideoDecoderBase::GetDecoderVppBufferNum(OMX_PTR) { return OMX_ErrorBadParameter; } OMX_ERRORTYPE OMXVideoDecoderBase::SetDecoderVppBufferNum(OMX_PTR pStructure) { |