The easiest way to accomplish this is to use Android's MediaExtractor and MediaCodec APIs but this will pose the requirement for the device to at least have Android 4.1. For supporting devices having less than Android 4.1, we can write the code in JNI but it will pose the problem of modifying the build system to package .so files too. Also, these .so files will reside with the video library and not the Android mode.
Adding the feature for integrating .so inside the apk is itself a pain.
I'm not at all afraid to write code in C++/JNI but still, I'm a little bit inclined to just use the MediaExtractor and MediaCodec APIs.
The easiest way to accomplish this is to use Android's MediaExtractor and MediaCodec APIs but this will pose the requirement for the device to at least have Android 4.1. For supporting devices having less than Android 4.1, we can write the code in JNI but it will pose the problem of modifying the build system to package .so files too. Also, these .so files will reside with the video library and not the Android mode. Adding the feature for integrating .so inside the apk is itself a pain.
I'm not at all afraid to write code in C++/JNI but still, I'm a little bit inclined to just use the MediaExtractor and MediaCodec APIs.
On the other hand, another benefit of JNI will be that we'll be able to use a faster alternative to glReadPixels() as described here : https://vec.io/posts/faster-alternatives-to-glreadpixels-and-glteximage2d-in-opengl-es
Thanks, Umair Khan