Hi, everyone!
I want to use the gst-openmax and omx_h264enc to encode the yuv file on the ics and omap4. the omx_h264enc can encode the file but the result file can not play by the player on pc. and i find there is no sps and pps in this file . alsa i find the omap4 colorformat is OMX_TI_COLOR_FormatYUV420PackedSemiPlanar. i want to set the colorformat of the encoder to OMX_COLOR_FormatYUV420PackedSemiPlanar ,but i failed i read colorformat of the in port also OMX_TI_COLOR_FormatYUV420PackedSemiPlanar . Can this omap4 only support the OMX_TI_COLOR_FormatYUV420PackedSemiPlanar colorformat ?If that is true , i want to give the OMX_TI_COLOR_FormatYUV420PackedSemiPlanar to encoder . What format of yuv about the OMX_TI_COLOR_FormatYUV420PackedSemiPlanar ?
the code is below:
G_OMX_PORT_GET_DEFINITION (omx_base->in_port, ¶m);
dumpPortStatus(omx_base->in_port);/*****ADD******/
width = param.format.video.nFrameWidth;
height = param.format.video.nFrameHeight;
framerate = param.format.video.xFramerate;
param.format.video.nStride = 1280;
param.format.video.eColorFormat = OMX_COLOR_FormatYUV420PackedSemiPlanar;
/* this is against the standard; nBufferSize is read-only. */
fourcc = g_omx_colorformat_to_fourcc (param.format.video.eColorFormat);
param.nBufferSize = gst_video_format_get_size_strided (
gst_video_format_from_fourcc (fourcc),
width, height, param.format.video.nStride);
error_val = G_OMX_PORT_SET_DEFINITION (omx_base->in_port, ¶m);
dumpPortStatus(omx_base->in_port);
Thank you very much!