PDA

View Full Version : Fails to call OMX_GetHandle (for vendor specific core)



harishv
05-18-2010, 12:16 AM
Hi Folks,

I'm working on adding my own MPEG-4 decoder and currently stuck with
the OMX_GetHandle (basically, my component is NOT getting a call into
this function). After going thru the code, I figured out that
PVMFOMXBaseDecNode::DoPrepare (in ~nodes/pvomxbasedecnode/src/
pvmf_omx_basedec_node.cpp) is where I need to start off.
Looking deeper into the code, it seems that a MIME type is sent in
for which this function sets up the ComponentRole (in input params)
and calls:

* OMX_MasterGetComponentsOfRole( ) twice (however this doesn't call
the component's GetComponentsOfRole)
* OMX_MasterConfigParser
* OMX_MasterGetHandle which eventually calls the component's
OMX_GetHandle( )

My question is, is the above sequence specific to PV's software
decoders or even hardware vendors need to go thru the same? If so, it
doesn't seem to match up to what the OpenMAX call sequences PDF says.
Would appreciate your responses.

Best regards
HV

veselinovic
05-28-2010, 07:39 AM
Hi Harishv,

This question is PV OpenCORE & android specific and may be better suited for an android forum.

Here are some hints though:
Typically, components in opencore are identified according to their name and standard role they support.

OMX_MasterXYZ methods you mention are essentially wrappers that enable OpenCORE to support multiple vendors and multiple omx cores at the same
time (these calls are "internal" to OpenCORE). OpenCORE makes standard OpenMAX API calls when making calls to specific vendor's OpenMAX core or components.

Based on the description of the problem, it appears that
the application has not made the OMX_MasterInit call. The app needs to first call the OMX_MasterInit() which calls each vendor's core OMX_Init().
At that time, OpenCORE also queries all component's names and standard roles they support
and creates a registry of all available components and roles (using standard OpenMAX core APIs).
If you fail to call the OMX_MasterInit from the application, components do not appear in the registry and cannot be recognized.


OMX_MasterConfigParser is a method that is not OpenMAX standard, but is recommended if you wish to interface with OpenCORE.
For more information, please refer to android & OpenCORE documentation.

I hope this helps.
Sincerely,
Dusan V.

harishv
05-30-2010, 10:47 PM
Hi Dusan,

Thanks for your response, I got this resolved. It appears that there were some debug prints that was leading the PVMF go haywire!! I tried removing my config file, thereby letting the software MPEG-4 component to take over which also failed in a similar way. I did a svn diff and reverted files that I had touched to check out the code flow.

Best regards
HV