aboutsummaryrefslogtreecommitdiffstats
path: root/videocodec/OMXVideoDecoderH263.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'videocodec/OMXVideoDecoderH263.cpp')
-rw-r--r--videocodec/OMXVideoDecoderH263.cpp30
1 files changed, 28 insertions, 2 deletions
diff --git a/videocodec/OMXVideoDecoderH263.cpp b/videocodec/OMXVideoDecoderH263.cpp
index ce5434c..5cf1d45 100644
--- a/videocodec/OMXVideoDecoderH263.cpp
+++ b/videocodec/OMXVideoDecoderH263.cpp
@@ -64,11 +64,11 @@ OMX_ERRORTYPE OMXVideoDecoderH263::ProcessorDeinit(void) {
}
OMX_ERRORTYPE OMXVideoDecoderH263::ProcessorProcess(
- OMX_BUFFERHEADERTYPE **buffers,
+ OMX_BUFFERHEADERTYPE ***pBuffers,
buffer_retain_t *retains,
OMX_U32 numberBuffers) {
- return OMXVideoDecoderBase::ProcessorProcess(buffers, retains, numberBuffers);
+ return OMXVideoDecoderBase::ProcessorProcess(pBuffers, retains, numberBuffers);
}
OMX_ERRORTYPE OMXVideoDecoderH263::PrepareConfigBuffer(VideoConfigBuffer *p) {
@@ -82,6 +82,7 @@ OMX_ERRORTYPE OMXVideoDecoderH263::PrepareDecodeBuffer(OMX_BUFFERHEADERTYPE *buf
OMX_ERRORTYPE OMXVideoDecoderH263::BuildHandlerList(void) {
OMXVideoDecoderBase::BuildHandlerList();
AddHandler(OMX_IndexParamVideoH263, GetParamVideoH263, SetParamVideoH263);
+ AddHandler(static_cast<OMX_INDEXTYPE>(OMX_IndexExtEnableNativeBuffer),GetNativeBufferMode,SetNativeBufferMode);
return OMX_ErrorNone;
}
@@ -108,6 +109,31 @@ OMX_ERRORTYPE OMXVideoDecoderH263::SetParamVideoH263(OMX_PTR pStructure) {
return OMX_ErrorNone;
}
+OMX_ERRORTYPE OMXVideoDecoderH263::GetNativeBufferMode(OMX_PTR pStructure) {
+ OMX_ERRORTYPE ret;
+ return OMX_ErrorNone; //would not be here
+}
+
+#define MAX_OUTPUT_BUFFER_COUNT_FOR_H263 10
+
+OMX_ERRORTYPE OMXVideoDecoderH263::SetNativeBufferMode(OMX_PTR pStructure) {
+ OMX_ERRORTYPE ret;
+ CHECK_SET_PARAM_STATE();
+ //EnableAndroidNativeBuffersParams *param = (EnableAndroidNativeBuffersParams*)pStructure;
+ //CHECK_TYPE_HEADER(param);
+ mNativeBufferMode = true;
+ PortVideo *port = NULL;
+ port = static_cast<PortVideo *>(this->ports[OUTPORT_INDEX]);
+ OMX_PARAM_PORTDEFINITIONTYPE port_def;
+ memcpy(&port_def,port->GetPortDefinition(),sizeof(port_def));
+ port_def.nBufferCountMin = 1;
+ port_def.nBufferCountActual = MAX_OUTPUT_BUFFER_COUNT_FOR_H263;
+ port_def.format.video.cMIMEType = (OMX_STRING)VA_VED_RAW_MIME_TYPE;
+ port_def.format.video.eColorFormat =static_cast<OMX_COLOR_FORMATTYPE>(VA_VED_COLOR_FORMAT) ;//
+ port->SetPortDefinition(&port_def,true);
+ return OMX_ErrorNone;
+}
+
DECLARE_OMX_COMPONENT("OMX.Intel.VideoDecoder.H263", "video_decoder.h263", OMXVideoDecoderH263);