This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

OMX.TI.DUCATI1.VIDEO.CAMERA OMX_GetHandle crashes with ndk .so

Other Parts Discussed in Thread: 4430

Hi,

I am using Blaze development board(4430) running gingerbread. I have created ndk built "cap_enc.so" which internal uses OMX.TI.DUCATI1.VIDEO.CAMERA and OMX.TI.DUCATI1.VIDEO.H264E.

When i load "cap_enc.so" as part my android app and do a jni API call to "cap_enc.so" which calls OMX_GetHandle on OMX.TI.DUCATI1.VIDEO.CAMERA it is crashing. I gave all the camera permissions in AndroidManifest.xml.(tried almost all permissions)

But when I did a ndk build of same code as executable and ran it from the adb shell as *root* it is able to capture and encode. But I dont want to root the device.

1) Is it possible to use the OMX components from ndk built .so which are running as part of android app?

2) What could be possible cause for the issue which I am facing.

3) if it is related to permissions, are there any permissions which can be given in the Manifest file

Crash dump

I/DEBUG   ( 1833):          #00  pc 00000000  
I/DEBUG   ( 1833):          #01  pc 00001988  /system/lib/libOMX.TI.DUCATI1.VIDEO.CAMERA.so
I/DEBUG   ( 1833):          #02  pc 00001e56  /system/lib/libOMX.TI.DUCATI1.VIDEO.CAMERA.so
I/DEBUG   ( 1833):          #03  pc 00002052  /system/lib/libOMX_Core.so
I/DEBUG   ( 1833):          #04  pc 0000dda2  /data/data/com.streamer/lib/libcap_enc.so.

When i tried with objectdump and trace it back it seems it has crashed in DCC_init.

Please suggest...

Regards,

Santosh

  • Answers;

    1) Yes, direct way is to use OpenMax AL from Android NDK, you can find information about it in documentation directory inside Android NDK.

    2) It is caused by system's security between layers and when accessing HW, you can find more information in next link in this forum

    http://e2e.ti.com/support/omap/f/849/p/178679/648158.aspx#648158

    3) When previous post I tried adding permission and creating a Platform Library that propagates the permission from .java to .cpp and it failed, I imagine that it is the Sandbox at kernel (link to information in previous post) has some permissions that are from the system, the way to use it is using OpenMax AL from Android NDK or adding your own service and registering as part of the system like mentioned in previous post.

  • Interesting, is it possible to get OMX interface apis (functions like GetHandle, setParam, getParam setState enum components etc) from
    OMXAL?

    Thanks

    Steve

  • I haven't gone that far to read OpenMax AL spec, I know Android NDK contains it and that using it is allowing direct access from applications .apk or native libraries .so.

  • Hi Manuel Contreras,

    Thanks for the reply...

    Open Max AL is more on the player side. Currently i think there is no support on the camera and recorder side.

    And my requirment is to get a camera h264 encoded stream which can be streamed over network.

    Regarding OpenMax AL, its a .so runs as part of the application .apk but able to access the OMX IL compenents which are not running as system. Any ideas....

     

    Regards

    Santosh