When you use any APIs that are not "stable" in terms of the NDK document, you are playing with fire. But when it comes to getOMX()
, the fire is not very hot.
You can get the headers from the AOSP source git, e.g.
git clone https://android.googlesource.com/platform/frameworks/av
and #include "frameworks/av/include/media/IMediaPlayerService.h"
You will also need to provide the system .so
files to linker, in this case - libmediaplayerservice.so
. You can use command
adb pull /system/lib/libmediaplayerservice.so .
to get this library from an emulator or from a physical device.