[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] Using sdl_surface for the movie module



I have a quick question here:

I'm trying to figure what would be the best way to work with an sdl_surface for the movie module. Let me give some quick background here. All the code I've been able to find with ffmpeg seems to use only sdl_overlays. The way the overlays work, is that you can write to them, then you have to explicitly display them. I've figured out a good way to write arbritary video formats to a surface(AVFrame->sws_scale to YUV420P in an AVPicture->conversion algorithm which writes to the SDL_Surface). But I'm wondering if I need to do any more than that. I do have picture queue set up, which stores finished pictures, as the decoding goes a lot faster than waiting the amount of time to show a new frame. The picture queue stores VidPicture objects which uses either an overlay or a surface, depending on arguments passed in by the user at the initialization of the object. What else do I have to do to "display" the written surface? I'm thinking just writing to the given surface by the user would be satisfactory? If so, what is the fastest way?

-Tyler

--
Visit my blog at http://oddco.ca/zeroth/zblog