[android-porting] OMX_Init questions for vendor specific components

154 views
Skip to first unread message

HV

unread,
May 5, 2010, 7:47:05 AM5/5/10
to android-porting
Hi All,

Now that I have my custom decoder/core being recognized by the
system, I've started implementing the 9 core methods, but hit a road
block with the OMX_Init function. Are there any vendor specific
samples?

Here is what I have (based on the template in _OMX_Init( ) under
pv_omxcore.cpp):

OSCL_EXPORT_REF OMX_ERRORTYPE OMXHV_Init()
{
OMX_ERRORTYPE status = OMX_ErrorNone;
int32 error;

LOGE("HV: OMXHV_Init\n");

//get global data structure
OMXGlobalData* data =
(OMXGlobalData*)OsclSingletonRegistry::lockAndGetInstance(OSCL_SINGLETON_ID_HV,
error);
if (error) // can't access registry
{
LOGE("HV: OMXHV_Init, ERROR-1\n");
return OMX_ErrorInsufficientResources;
}

else if (!data) // singleton object has been destroyed
{
OsclSingletonRegistry::registerInstanceAndUnlock(data,
OSCL_SINGLETON_ID_HV, error);
LOGE("HV: OMXHV_Init, ERROR-2\n");
return OMX_ErrorInsufficientResources;
}

LOGE("HV: OMXHV_Init, status = %d\n", status);
return status;
}

I do get called into this function, but it errors [ERROR-2 above] out.
Any idea what I'm missing here?

Thanks in advance
HV

--
unsubscribe: android-porti...@googlegroups.com
website: http://groups.google.com/group/android-porting

HV

unread,
May 6, 2010, 2:39:22 AM5/6/10
to android-porting
I figured that it's left to the vendor to implement in however way
they wish to. Looking @ the Bellagio & LIM sources helped me. Now,
OMX_Init(), OMX_GetComponentENum() & OMX_GetRolesOfComponent() calls
are successfully passing within my new core, but I don't get any
further calls. I see that the software components also go thru a
similar sequence (for all the decoders & encoders) but no more entry
into any of the other functions (was expecting the next call into
OMX_GetHandle). Any clues? I've attached the last part of the log &
would really appreciate some tips:

***********************************************************************************************************************
E/PV ( 828):
PVLOG:TID(0xca240):Time=595:PVMIDataStreamSyncInterfaceRefImpl::GetCurrentContentPosition
returning 0
E/PV ( 828):
PVLOG:TID(0xca240):Time=597:PVMIDataStreamSyncInterfaceRefImpl::GetCurrentContentPosition
returning 0
E/PV ( 828):
PVLOG:TID(0xca240):Time=598:PVMIDataStreamSyncInterfaceRefImpl::GetCurrentContentPosition
returning 0
E/PV ( 828):
PVLOG:TID(0xca240):Time=603:PVMIDataStreamSyncInterfaceRefImpl::ReadAndUnlockContent
returning 8
E/PV ( 828):
PVLOG:TID(0xca240):Time=604:PVMIDataStreamSyncInterfaceRefImpl::CloseSession
returning 0
E/PV ( 828):
PVLOG:TID(0xca240):Time=606:PVMIDataStreamSyncInterfaceRefImpl::~PVMIDataStreamSyncInterfaceRefImpl
E/PV ( 828):
PVLOG:TID(0xca240):Time=608:PVMFRecognizerRegistryImpl::DoRecognize
Out of recognizer i=0 result=4, time=33
E/PV ( 828):
PVLOG:TID(0xca240):Time=609:PVPlayerRecognizerRegistry::RecognizerCommandCompleted()
IN
E/PV ( 828):
PVLOG:TID(0xca240):Time=610:PVPlayerRecognizerRegistry::RecognizeCommandCompleted()
- Recognize returned Success
E/PV ( 828):
PVLOG:TID(0xca240):Time=612:PVPlayerRecognizerRegistry::RecognizerCommandCompleted()
OUT
E/PV ( 828):
PVLOG:TID(0xca240):Time=621:PVPlayerEngine::DoSetupSourceNode()
Tick=621
E/PV ( 828):
PVLOG:TID(0xca240):Time=622:PVPlayerEngine::DoSetupSourceNode() In
E/PV ( 828):
PVLOG:TID(0xca240):Time=623:PVPlayerNodeRegistry::QueryRegistry() IN
E/PV ( 828):
PVLOG:TID(0xca240):Time=625:PVPlayerNodeRegistry::QueryRegistry() OUT
E/PV ( 828):
PVLOG:TID(0xca240):Time=626:PVPlayerNodeRegistry::CreateNode() IN
E/MediaMetadataRetrieverJNI( 926): captureFrame: videoFrame is a NULL
pointer
W/MediaThumbRequest( 926): can't create bitmap for thumbnail.
I/ServiceManager( 824): service 'media.audio_flinger' died
I/ServiceManager( 824): service 'media.player' died
I/ServiceManager( 824): service 'media.camera' died
I/ServiceManager( 824): service 'media.audio_policy' died
W/MediaMetadataRetriever( 926): MediaMetadataRetriever server died!
W/AudioSystem( 845): AudioPolicyService server died!
W/MediaPlayer( 845): MediaPlayer server died!
D/dalvikvm( 926): GREF has increased to 201
V/MediaStore( 953): We probably run out of space, so create the
thumbnail in memory.
I/ServiceManager( 953): Waiting for sevice media.player...
I/ ( 962): ServiceManager: 0x82d08
I/CameraService( 962): CameraService started: pid=962
D/AudioHardwareALSA( 962): openOutputStream called for devices:
0x00000002
D/ALSAModule( 962): open called for devices 00000002 in mode 0...

***********************************************************************************************************************

RaviY

unread,
May 11, 2010, 10:00:23 AM5/11/10
to android-porting
Looks like the mediaserver crashed even before the decoder was
instantiated. You would need to check that.

-Ravi

Deva R

unread,
May 11, 2010, 11:02:39 AM5/11/10
to yen...@pv.com, android-porting

I guess you updated your new OMX library in a /system/etc/<my-omx>.cfg file



>. Now,
> OMX_Init(), OMX_GetComponentENum() & OMX_GetRolesOfComponent() calls
> are successfully passing within my new core, but I don't get any
> further calls.

Opencore walks through all the OMX libraries, and places below calls for a codec.,
it picks up a component based on component repository order..

Can you try renaming your /system/etc/<my-omx>.cfg  as /system/etc/0001-<my-omx>.cfg??

HV

unread,
May 13, 2010, 3:15:10 AM5/13/10
to android-porting
Thanks for your responses, my comments inline:

>>Looks like the mediaserver crashed even before the decoder was
>>instantiated. You would need to check that.
@RaviY, Could you please be more specific as to what I need to verify?
I have a working version (i.e., if I remove my component) where in the
framework parses other components in pvplayer.cfg, before it even
starts looking at the thumbnail stuff.

>>Can you try renaming your /system/etc/<my-omx>.cfg as /system/etc/0001-<my-omx>.cfg??
@Deva R, tried doing this, but see no change. I also noticed that
the .cfg loading process is repeated twice!! Any idea why this is so?

Best regards
HV
> > > > unsubscribe: android-porti...@googlegroups.com<android-porting%2Bunsubscribe@ googlegroups.com>
> > > > website:http://groups.google.com/group/android-porting
>
> > > --
> > > unsubscribe: android-porti...@googlegroups.com<android-porting%2Bunsubscribe@ googlegroups.com>
> > > website:http://groups.google.com/group/android-porting
>
> > --
> > unsubscribe: android-porti...@googlegroups.com<android-porting%2Bunsubscribe@ googlegroups.com>

HV

unread,
May 16, 2010, 8:42:15 AM5/16/10
to android-porting
Just wanted to let you guys know that I got this RESOLVED. After
breaking my head over what could have possibly went wrong, I decided
to do a svn diff of all the files that I had modified. In the process
I realised that I had touched lota files that had just my own debug-
prints to check out the data/code flow (particularly in the oscl &
nodes dirs). I just reverted these & voila, it dint crash!! I guess I
had messed up something in my DPs. Anyways, glad to get a move on
here. thanks for your posts

Best regards
HV
Reply all
Reply to author
Forward
0 new messages