Multiple openmax codecs

250 views
Skip to first unread message

anupama

unread,
Oct 26, 2009, 4:58:03 AM10/26/09
to android-porting
Hi All,

I am working in integration of codec to android-opencore.I have one
doubt, since opencore has it's inbuilt codec, if I want to integrate
my own codec, whether I have to replace that with the existing one or
both can co-exist.

If both can be there ,then how to make opencore to choose our
decoder.?

Thanks,
Anupama

Jean-François Vidal

unread,
Oct 27, 2009, 5:04:13 AM10/27/09
to android-porting
On G1 OMX PV and OMX QC co-exist. So this is possible. OpenCore list
the roles of all components and get the first correct one starting
with external OMX codec.

I didn't try to register different OpenMax decoder to OpenCore but I
already register OpenMax decoder to other application. Look

/external/opencore/codecs_v2/omx/omx_core_plugins/template/src/
pv_omx_interface.cpp

I think replace with your shared library and function name should be a
good starting point.

anupama

unread,
Oct 27, 2009, 10:22:18 AM10/27/09
to android-porting
Hi Jean,

That means that in this file we have to replace

#define OMX_CORE_LIBRARY "libOmxCore.so" with our shared (omx_core +
omx_component) library and PVOMXInterface() replacing all OMX_Core
functions with our renamed OMX_Core functions?



On Oct 27, 2:04 pm, Jean-François Vidal <jeanfrancois.vi...@gmail.com>
wrote:
> > Anupama- Hide quoted text -
>
> - Show quoted text -

Jean-François Vidal

unread,
Oct 28, 2009, 6:27:35 AM10/28/09
to android-porting

Hi Anupama,

I look the code and unfortunately no. It seems the file /external/
opencore/codecs_v2/omx/omx_core_plugins/template/src/
pv_omx_interface.cpp is only an exemple, it is not build on G1. I
think the place where OMX componnent library are registred is external/
opencore/codecs_v2/omx/omx_mastercore/src/pv_omxmastercore.cpp

This code look inside all *.cfg file in /system/etc/ if a shared
library have OMX_INTERFACE_ID. If yes it register the interface inside
opencore player. The interface should have the same structure that
external/opencore/codecs_v2/omx/omx_core_plugins/template/src/
pv_omx_interface.cpp (exemple) or external/opencore/codecs_v2/omx/
omx_sharedlibrary/interface/src/pv_omx_interface.cpp (PV OMX
software).

I didn't do this job but I should do
1)create an interface like pv_omx_interface.cpp for my new OMX
componnent and create libmy_omx.so. This is equivalent to /vendor/qcom/
android-open/pvomx/proprietary/libqcomm_omx.so on G1

2)create a config file with OMX_INTERFACE_ID like my_omx.cfg. It
should contain

(0xa054369c,0x22c5,0x412e,0x19,0x17,0x87,0x4c,0x1a,
0x19,0xd4,0x5f),"libmy_omx.so"

3)put everything in your filesystem and wait crash ;)

report here if you success.

Jean-François

anupama

unread,
Nov 2, 2009, 3:25:54 AM11/2/09
to android-porting
Hi Jean,

According to your suggestion I have gone through pv_mastercore.cpp
file, yes this
is the place where all the OMX components are registered.

Now my understanding is, to integrate my own codec I have to create
libmy_omx.so
using the static libs libomx_common_lib ,libomx_queue_lib ,
libpvomx_proxy_lib ,libomx_baseclass_lib and
libpv_omx_interface.

I had gone through the OMX Core Integartion Guide and there it is
mentioned that vendors should not attempt to
integrate isolated OMX components (without the accompanying OMX core)
into the existing PV
OMX core – due to specialized APIs and communication between the PV
OMX core and PV
OMX components.

So now my doubt is, Do I have to create my own libomx_mycommon_lib by
rewritting the files
pv_omxcore.cpp ,pv_omx_config_parser.cpp ,pv_omxregistry.cpp which are
involved in creating libomx_common_lib?

Please clarify.

Thanks,
Anupama



On Oct 28, 3:27 pm, Jean-François Vidal <jeanfrancois.vi...@gmail.com>
wrote:

Jean-François Vidal

unread,
Nov 2, 2009, 7:27:08 AM11/2/09
to android-porting

Hi Anupama,

I can't explain more because I never do the job. I use OpenMax codec
but not inside OpenCore player.
I am sure that any OMX component must come with the functions defined
inside OMX_Core.h :

Init()
Deinit()
ComponentNameEnum()
GetHandle()
FreeHandle()
GetComponentsOfRole()
GetRolesOfComponent()
SetupTunnel()
GetContentPipe()

Then your OMX component can have several codec. Your modification must
not change OpenCore code. Once you created your new OMX component you
just have to indicate it to OpenCore with .cfg.

Good luck,

Jean-François
Reply all
Reply to author
Forward
0 new messages