aboutsummaryrefslogtreecommitdiffstats
path: root/videocodec/OMXVideoDecoderBase.cpp
diff options
context:
space:
mode:
authorYuanjun Huang <yuanjun.huang@intel.com>2015-05-09 01:12:57 +0800
committerRonghua Wu <ronghuawu@google.com>2015-05-12 10:16:46 -0700
commit7579ae2fa6c1b95605f651892a1adfd6eed7c946 (patch)
treeb07f12e9b1173e6d764743c466fbfa06caa13b95 /videocodec/OMXVideoDecoderBase.cpp
parent38f95570ed3065fffc256481b52990024c354df1 (diff)
downloadandroid_hardware_intel_common_omx-components-7579ae2fa6c1b95605f651892a1adfd6eed7c946.tar.gz
android_hardware_intel_common_omx-components-7579ae2fa6c1b95605f651892a1adfd6eed7c946.tar.bz2
android_hardware_intel_common_omx-components-7579ae2fa6c1b95605f651892a1adfd6eed7c946.zip
omx-component:
a. Add support of OMX index - media codec priority config. config type is OMX_IndexConfigPriority. b. Add support of OMX index - media decoder operating rate. config type is OMX_IndexConfigOperatingRate. Bug: 20165525 Bug: 20165726 Change-Id: Ide80507f907b3ed78792f15fafdf19b0691ec786 Signed-off-by: Yuanjun Huang <yuanjun.huang@intel.com>
Diffstat (limited to 'videocodec/OMXVideoDecoderBase.cpp')
-rw-r--r--videocodec/OMXVideoDecoderBase.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/videocodec/OMXVideoDecoderBase.cpp b/videocodec/OMXVideoDecoderBase.cpp
index 7d1d830..49c68f1 100644
--- a/videocodec/OMXVideoDecoderBase.cpp
+++ b/videocodec/OMXVideoDecoderBase.cpp
@@ -31,6 +31,8 @@ OMXVideoDecoderBase::OMXVideoDecoderBase()
#ifdef TARGET_HAS_ISV
mVppBufferNum(0),
#endif
+ mCodecPriority(1),
+ mOperatingRate(0),
mVideoDecoder(NULL),
mNativeBufferCount(OUTPORT_NATIVE_BUFFER_COUNT),
mWorkingMode(RAWDATA_MODE),
@@ -777,6 +779,8 @@ OMX_ERRORTYPE OMXVideoDecoderBase::BuildHandlerList(void) {
#endif
AddHandler(OMX_IndexConfigCommonOutputCrop, GetDecoderOutputCrop, SetDecoderOutputCrop);
AddHandler(static_cast<OMX_INDEXTYPE>(OMX_IndexExtEnableErrorReport), GetErrorReportMode, SetErrorReportMode);
+ AddHandler(static_cast<OMX_INDEXTYPE>(OMX_IndexConfigPriority), GetCodecPriority, SetCodecPriority);
+ AddHandler(static_cast<OMX_INDEXTYPE>(OMX_IndexConfigOperatingRate), GetDecoderOperatingRate, SetDecoderOperatingRate);
return OMX_ErrorNone;
}
@@ -984,6 +988,40 @@ OMX_ERRORTYPE OMXVideoDecoderBase::GetDecoderOutputCrop(OMX_PTR pStructure) {
return this->GetDecoderOutputCropSpecific(pStructure);
}
+
+OMX_ERRORTYPE OMXVideoDecoderBase::SetCodecPriority(OMX_PTR pStructure) {
+ OMX_ERRORTYPE ret;
+ OMX_PARAM_U32TYPE *priorityParam = (OMX_PARAM_U32TYPE *)pStructure;
+ mCodecPriority = priorityParam->nU32;
+ return OMX_ErrorNone;
+}
+
+
+OMX_ERRORTYPE OMXVideoDecoderBase::GetCodecPriority(OMX_PTR pStructure) {
+ OMX_ERRORTYPE ret;
+ OMX_PARAM_U32TYPE *priorityParam = (OMX_PARAM_U32TYPE *)pStructure;
+ CHECK_TYPE_HEADER(priorityParam);
+ priorityParam->nU32 = mCodecPriority;
+ return OMX_ErrorNone;
+}
+
+
+OMX_ERRORTYPE OMXVideoDecoderBase::SetDecoderOperatingRate(OMX_PTR pStructure) {
+ OMX_ERRORTYPE ret;
+ OMX_PARAM_U32TYPE *operatingRateParam = (OMX_PARAM_U32TYPE *)pStructure;
+ CHECK_TYPE_HEADER(operatingRateParam);
+ mOperatingRate = operatingRateParam->nU32;
+ return OMX_ErrorNone;
+}
+
+OMX_ERRORTYPE OMXVideoDecoderBase::GetDecoderOperatingRate(OMX_PTR pStructure) {
+ OMX_ERRORTYPE ret;
+ OMX_PARAM_U32TYPE *operatingRateParam = (OMX_PARAM_U32TYPE *)pStructure;
+ CHECK_TYPE_HEADER(operatingRateParam);
+ operatingRateParam->nU32 = mOperatingRate;
+ return OMX_ErrorNone;
+}
+
OMX_ERRORTYPE OMXVideoDecoderBase::GetErrorReportMode(OMX_PTR) {
LOGE("GetErrorReportMode is not implemented");
return OMX_ErrorNotImplemented;