Codec --- 2 of stagefright

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.