Hi:
I am trying to implement the extension OMX.google.android.index.enableAndroidNativeBuffers in my hardware openmax decoder,
I got confused when I read the explanation on EnableAndroidNativeBuffersParams.
// When Android native buffer use has been enabled for a given port, the video
// color format for the port is to be interpreted as an Android pixel format
// rather than an OMX color format. Enabling Android native buffers may also
// change how the component receives the native buffers. If store-metadata-mode
// is enabled on the port, the component will receive the buffers as specified
// in the section below. Otherwise, unless the node supports the
// 'OMX.google.android.index.useAndroidNativeBuffer2' extension, it should
// expect to receive UseAndroidNativeBuffer calls (via OMX_SetParameter) rather
// than UseBuffer calls for that port.
struct EnableAndroidNativeBuffersParams {
OMX_U32 nSize;
OMX_VERSIONTYPE nVersion;
OMX_U32 nPortIndex;
OMX_BOOL enable;
};
Does it means that color format got from OMX_IndexParamPortDefinition is pixel format after enableGraphicBuffers called ?
I changed the color format to pixel format 0x101 in my decoder component.
However, it will call getParameter(OMX_IndexParamPortDefinition) later when component change to idle state from loaded state, and the color format got should be openmax color format such as OMX_COLOR_FormatYUV420Planar.
It seems conflict with privious explanation.
could you tell me which value should my decoder component return?
Look forward to your reply.
Thanks.
Best Regards,
Mike,