Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use libstagefright on Android for restricted codecs #2

Open
pcwalton opened this issue Feb 20, 2015 · 3 comments
Open

Use libstagefright on Android for restricted codecs #2

pcwalton opened this issue Feb 20, 2015 · 3 comments

Comments

@pcwalton
Copy link
Owner

Currently, your only option to play H.264 and AAC on Android is FFmpeg. But essentially all Android devices support H.264 via libstagefright. We should bind to it. This would also let us use the hardware decoders where available.

@sdroege
Copy link

sdroege commented Feb 20, 2015

Stagefright is non-public api and api and abi change between devices and android versions. The safe way would be to use android.media.MediaCodec. take a look at what is done in the gstreamer androidmedia plugin to access that from outside java via jni.

@doublec
Copy link

doublec commented Feb 24, 2015

Yes, in the Gecko code we had a lot of problems with differences in Stagefright APIs amongst phones. This was mostly related to wanting to use our own network code instead of Android's. The various device vendors would customize stagefright and have different vtable layouts for the class we derived from to do this.

A workaround was in bug 860599 where we created an internal HTTP server that served data from Gecko that the Android network code connected too. This solved a lot of crashes.

In bug 1014614 we moved to MediaCodec for newer Android releases which is a better approach as the API is public.

@sdroege
Copy link

sdroege commented Feb 26, 2015

Check here for the GStreamer plugin using the MediaCodec API: http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/sys/androidmedia

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants