views:

255

answers:

2

Hello all. I am developing an app which plays interactive real time streaming video. I use FFMPEG (don't worry, I'll be releasing my source code) to decode a MPEG2/H264 RTP stream. I simply cannot get the iPhone 3G to draw a screen full of pixels faster than 5 times per second.

I've tried a OpenGL texture which was just a slow. I've also tried an array of 2D vertexes covering the entire screen and using glDrawArrays but that yielded 5 FPS as well. For now I've stuck to simply drawing a CGImage onto my view which gives me about 7-8 FPS.

From what I gathered, the private CoreSurface framework seems to be the only way. Anyone have any tips or tricks to get at least 20-30 FPS? I'd hate to restrict my app to only the 3GS and iPod touches.

Thanks,

Andrew

A: 

If you want to play H.264 and MPEG2 video on the iPhone, why are you doing the decoding yourself? What do you need that MPMoviePlayer doesn't cover?

NSResponder
The only reason I do not use the MPMoviePlayerController is because I need to display the video in realtime. Even with HTTP Live Streaming, the video is delayed too much.
Andrew
A: 

If you are decoding in software, you're never going to get a good frame rate. Even on faster hardware (iPhone 3GS and 2nd/3rd gen iPod touches), you're going to drain the battery very quickly.

Steve Madsen