tags:

views:

102

answers:

1

I am having problem with MPMoviePlayer( i want to customize the MPMoviePlayer).

Can anyOne tell me how to play video using Open GLES in iphone???

I want to do buffer level handling of the video streams....

Thanks in advance

+1  A: 

The builtin frameworks do not provide support for that sort of customization, they expect you to use MPFramework as is.

If you want to do decompress your video into an OpenGL texture in a supported way you need to include your own decoder, decode the buffers, and blit them into a texture.

As Ben mentioned, this will bypass the builtin H.264 HW, which will result in substantially higher power use and reduce battery life. It may also make maintaining your target framerate difficult, depending on the size of your video and what else you are doing with CPU.

Louis Gerbarg
I've used OpenGL quite a bit on the iPhone and I would not encourage you to pursue custom video decoding / display using OpenGL. The built-in MPFramework uses custom hardware for decoding video. Creating/destorying GLTextures or using glCopyTexImage2D with new image data each frame not get you a high enough framerate for video.
Ben Gotow
I usually mention the HW thing in this sort of answer, and you are totally correct that decoding in SW will be worse. On the other hand, depending on the resolution of the video and the framerate of the source it is definitely possible to get fast enough decode (at least on a 3GS).
Louis Gerbarg
If i use i cant customize the MPMoviePlayer frame (width and height).and i dont have control over the memory consumption when the video is playing which in turn crashes the game sometimes ...Any suggestions ???
sneha
I really don't understand what you are trying to do. If you are not playing the video full screen in MPMoviePlayer then you need to handle the decode yourself in SW (with all the downsides), or not use video.
Louis Gerbarg