I have got FFmpeg compiled (libffmpeg.so) on Android. Now I have to build either an application like RockPlayer or use existing Android multimedia framework to invoke FFmpeg.
Do you have steps / procedures / code / example on integrating FFmpeg on Android / StageFright?
Can you please guide me on how can I use this library for multimedia playback?
I have a requirement where I have already audio and video transport streams, which I need to feed to FFmpeg and get it decoded / rendered. How can I do this on Android, since IOMX APIs are OMX based and cannot plug-in FFmpeg here?
Also I could not find documentation on the FFmpeg APIs which need to be used for playback.
Here are the steps I went through in getting ffmpeg to work on Android:
makeaway. You'll need to extract bionic(libc) and zlib(libz) from the Android build as well, as ffmpeg libraries depend on them.
Create a dynamic library wrapping ffmpeg functionality using the Android NDK. There's a lot of documentation out there on how to work with the NDK. Basically you'll need to write some C/C++ code to export the functionality you need out of ffmpeg into a library java can interact with through JNI. The NDK allows you to easily link against the static libraries you've generated in step 1, just add a line similar to this to Android.mk:
LOCAL_STATIC_LIBRARIES := libavcodec libavformat libavutil libc libz
Use the ffmpeg-wrapping dynamic library from your java sources. There's enough documentation on JNI out there, you should be fine.
Regarding using ffmpeg for playback, there are many examples (the ffmpeg binary itself is a good example), here's a basic tutorial. The best documentation can be found in the headers.
Good luck :)