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
I/DEBUG ( 1833): #00 pc 00000000 I/DEBUG ( 1833): #01 pc 00001988 /system/lib/libOMX.TI.DUCATI1.VIDEO.CAMERA.soI/DEBUG ( 1833): #02 pc 00001e56 /system/lib/libOMX.TI.DUCATI1.VIDEO.CAMERA.soI/DEBUG ( 1833): #03 pc 00002052 /system/lib/libOMX_Core.soI/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.
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
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) fromOMXAL?
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....
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.