The most important thing is the processing of openmax, but after reading a lot of things for a day, you need to take a closer look.
The IL layer of openmax specifies some interfaces. openmax consists of core and instance, core loads instance, omax instance implements IL interface, and is provided to the openmax framework for calling, omax instance is the specific implementation of your own codec on a specific platform.
The following code is the place where the qcom platform establishes its own omx method. omx calls the component method, and the specific method is specified in the omx il api.
Void * qc_omx_create_component_wrapper (OMX_PTR obj_ptr)
{
Qc_omx_component * pThis = (qc_omx_component *) obj_ptr;
OMX_COMPONENTTYPE * component = & (pThis-> m_cmp );
Memset (& pThis-> m_cmp, 0, sizeof (OMX_COMPONENTTYPE ));
Component-> nSize = sizeof (OMX_COMPONENTTYPE );
Component-> nVersion. nVersion = OMX_SPEC_VERSION;
Component-> pApplicationPrivate = 0;
Component-> pComponentPrivate = obj_ptr;
Component-> AllocateBuffer = & qc_omx_component_allocate_buffer;
Component-> FreeBuffer = & qc_omx_component_free_buffer;
Component-> GetParameter = & qc_omx_component_get_parameter;
Component-> SetParameter = & qc_omx_component_set_parameter;
Component-> SendCommand = & qc_omx_component_send_command;
Component-> FillThisBuffer = & qc_omx_component_fill_this_buffer;
Component-> EmptyThisBuffer = & qc_omx_component_empty_this_buffer;
Component-> GetState = & qc_omx_component_get_state;
Component-> GetComponentVersion = & qc_omx_component_get_version;
Component-> GetConfig = & qc_omx_component_get_config;
Component-> SetConfig = & qc_omx_component_set_config;
Component-> GetExtensionIndex = & qc_omx_component_get_extension_index;
Component-> ComponentTunnelRequest = & qc_omx_component_tunnel_request;
Component-> UseBuffer = & qc_omx_component_use_buffer;
Component-> SetCallbacks = & qc_omx_component_set_callbacks;
Component-> UseEGLImage = & qc_omx_component_use_EGL_image;
Component-> ComponentRoleEnum = & qc_omx_component_role_enum;
Component-> ComponentDeInit = & qc_omx_component_deinit;
Return (void *) component;
}
The qcom platform will continue to call its own omx method www.2cto.com
From shcalm's column