RFC: androidmedia: an implementation using (mostly) NDK APIs
Android provides the NDK APIs for MediaCodec (since API level 21, Android 7) and SurfaceTexture (since API level 28, Android 9). Thus, it's possible to implement the androidmedia plugin using these APIs.
It won't benefit Android devices much. After all, the JNI approach still works on newer devices and older devices. The real purpose of this work is the potential to use this in the libhybris-based environment. As these APIs are C-based, it's easy to wrap these APIs and use them in this environment [1]. Thus, it's possible to have a similar code base that works on both Android and libhybris-based environments.
My initial research tells me that it's possible to implement gstamc-codec and gstamc-format JNI-free. However, gstamc-surfacetexture will still require some JNI code to create a Java instance of SurfaceTexture as it's impossible to create one natively. Also, there's no NDK API for MediaCodecList, which means the gstamc-codeclist will still use the JNI implementation.
I file this issue as an RFC. So, feel free to discuss and/or tell me why this is a bad idea. I'll be the one implement this as the time permit me to do so.
[1] I'll probably have to shim these APIs on older devices if I actually do this, but that's the distant future.