I was trying a video player pipeline using openmax, which accepts raw h264 streams decodes it and pass it to render. While configuring the ports, I want to set the frame width and frame height to 1280 * 720. But I was getting bad parameter error while setting the parameters. How to set the frame width and frame height for a port in an openmax component, As i m a newbie to these framework, my knowledge is limited. Is there any other feilds I should set before setting the width and height ?
This is how i tried to set the parameter
memset(&portdef,0,sizeof(OMX_PARAM_PORTDEFINITIONTYPE));
portdef.nSize = sizeof(OMX_PARAM_PORTDEFINITIONTYPE);
portdef.nVersion.nVersion = OMX_VERSION;
portdef.nPortIndex = 131;
portdef.format.video.nFrameWidth = 1280;
portdef.format.video.nFrameHeight = 720;
portdef.nBufferSize = portdef.format.video.nFrameWidth * portdef.format.video.nFrameHeight * 3 / 2;
/* set the video decode properties */
if((error = OMX_SetParameter(video_decode,OMX_IndexParamPortDefinition,&portdef)) != OMX_ErrorNone)
printf("set parameter error for decoder %x\n",error);
And I was getting the error as
set parameter error for decoder 80001005
and that is the bad parameter error. Why is it comming ?