What I need to do is to decode video frames and render the frames on a trapezoidal surface. I'm using Android 2.2 as my development platform
I'm not using the mediaplayer service since I need access to the decoded frames.
Here's what I have so far:
- I am using stagefright framework to extract decoded video frames.
- each frame is then converted from YUV420 to RGB format
- the converted frames are then copied to a texture and rendered to an OpenGL surface
- Note that I am using Processing and not using OpenGL calls directly.
So now my problems are
- i can only decode mp4 files with stagefright
- the rendering is too slow, around 100ms for a 320x420 frame
- there is no audio yet, I can only render videos but I still don't know how to synchronize the playing of the audio frames.
So for my questions...
- how can I support other video formats? Shoud I use stagefright or should I switch to ffmpeg?
- how can I improve the performance? I should be able to support at least 720p?
- Should I use OpenGL calls directly instead of Processing? Will this improve the performance?
- How can I sync the audio frames during playback?