I have a doubt regarding ComponentInit.
====== Extract from OMX_Core.h =========
/** The component specified did not have a "OMX_ComponentInit" or
"OMX_ComponentDeInit entry point */
OMX_ErrorInvalidComponent = 0x80001004,
I don't see OMX_ComponentInit in OMX_Core.h or OMX_Component.h. Where is it available? Please let me know.
There is OMX_ComponentDeInit macro and component function pointer. But not OMX_ComponentInit.
I am referring OpenMax 1.1 headers.
Probably you might have got the answer by now. I am new to Open MAX. If my explanation is not correct, please correect me.
It is true that OpenMAX does not have any specific API for component init. I feel initialization of a component can be done in OMX_GetHandle function. This is a core function. The point is the component developer has to specify entry point function(i.e the init function) to the integrator so that he can use this function as an entry point into the component. The spec says "If the component is valid,
OMX_GetHandle will invoke the component's methods to fill the component handle and set up the callbacks." So OMX_GetHandle should have the information of the component's entry point.
Please reply back.
See the definition of OMX_COMPONENTINITTYPE in OMX_Core.h. This is the prototype of the component initialization function suggested by the specification if you're using a static component registry.
Thanks a lot for the response.
Where can codec initialization happen?
the ComponentInit function is not defined in the standard because there are many ways to load and initialize a component, and they depend on the type of library and the OS. In any case you should provide an entry point for your specific implementation for loading the component. This initialization should be executed in the GetHandle function.
So an answer to your question can be "in the GetHandle".
Another possibility is to perform the codec initialization in the state transition from loaded to idle.
I hope this explanation is clear enough.
Thanks a lot.
Can we add an vendor specific index for codec initialization?
With this, I agree that custom vendor specific index will become mandatory for OMX IL client. Please provide inputs/opinion on this.
Re: Component Init
> Can we add an vendor specific index for codec initialization?
> With this, I agree that custom vendor specific index will become mandatory for OMX IL client.
> Please provide inputs/opinion on this.
Don't do it! Component initialisation is a core / platform detail and should not be exposed to the IL client.
Components will generally either be statically linked or dynamically loaded. If components are statically linked (or have a stub statically linked), then section 188.8.131.52 (IL v1.1.1) defines a structure that includes the initialisation function pointer that will be called by the core. When components are dynamically loaded, e.g. as DLLs, the platform will probably define an initialisation mechanism.
In either case, I do not expect the IL client to have to explicitly initialise the component.