Using IOMX from jni to gain access to hardware codecs

1,221 views
Skip to first unread message

Luca Piccarreta

unread,
May 20, 2011, 8:14:48 PM5/20/11
to android-...@googlegroups.com
Hi all,
I've recently discovered that mediaplayerservice exposes a nice interface IOMX

http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=include/media/IOMX.h;h=10e0197b6b9440ee692eeff8c0ddc2325730baed;hb=9f9afef3d5da3be6812192e60797b1c035445c3c

This is exactly what I was looking for, a way to use hardware codecs in an application with no root access.

Unfortunately, I was not able to build a fully working application. Codec enumeration / Initialization / decoding
are performed correctly, but when I try to deallocate the IOMX node, I get a segmentation fault.
It is not easy to find the cause, as unfortunately I have no debug symbols for the tablet shared libraries

Did anyone experiment with this?

Thanks in advance,
Luca.

ssocco

unread,
Apr 13, 2012, 6:53:00 PM4/13/12
to android-...@googlegroups.com
Hi Luca,

I'm interested in iOMX access from JNI as well. Did you ever make progress on this topic?

Thanks

Glenn Kasten

unread,
Apr 14, 2012, 11:30:20 AM4/14/12
to android-...@googlegroups.com
APIs for lower-level access to platform media codecs is an often-requested feature. As such, it's on the long-term roadmap, but I can't commit to a specific release or date.

In the mean time, I don't recommend using internal APIs such as you mentioned -- they will almost certainly break in every release, may be incompatible between devices, etc.  A safer workaround would be to use open source software codecs with a suitable license. I realize this doesn't solve your request for hardware-accelerated codecs though.

Glenn Kasten

unread,
Jun 29, 2012, 9:49:17 PM6/29/12
to android-...@googlegroups.com
FYI starting with Android 4.1 (API level 16 / Jellybean) see http://developer.android.com/reference/android/media/MediaCodec.html
This uses hardware acceleration where appropriate.

steve

unread,
Jun 29, 2012, 11:07:04 PM6/29/12
to android-...@googlegroups.com
Dam!, this trashed all of my OpenMAX knowledge.
Reply all
Reply to author
Forward
0 new messages