Question

I am writting an app which needs to decode H.264(AVC) bitstream. I find there are AVC codec sources exist in /frameworks/base/media/libstagefright/codecs/avc, does anyone know how can one get access to those codecs in an Android app? I guess it's through JNI, but not clear about how this can be done.

After some investigation I think one approach is to create my own classes and JNI interfaces in the Android source to enable using the CODECS in an Android App. Another way which does not require any changes in Android source is to include CODECS as shared library in my application, use NDK. Any thoughts on these? Which way is better(if feasible)?

I didn't find much information about Stagefright, it would be great if anyone can point out some? I am developing on Android 2.3.3.

Any comments are highly appreciated.Thanks!

Was it helpful?

Solution

Stagefright does not support elementary H.264 decoding. However it does have H.264 decoder component. In theory, this library could be used. But in reality, it will be tough to use it as a standalone library due to its dependencies.

Best approach would be use to JNI wrapped independent h.264 decoder(like the one available with ffmpeg).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top