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

Re: [pygame] mpeg is always on top



Alexander 'boesi' Bösecke wrote:
I'm using pygame.movie for showing a mpeg and it works quite well. Only
one thing is frustrating - the movie is always on top over all other
windows, the frame of the movie window goes to background but not the
movie itself.
SDL and SMPEG use the video overlay planes to make video playback faster. As you've discovered, this also means the video plays on top of everything on the screen.

You have to options if you want to render it directly into your window. The most popular choice is to Movie.set_display() into some offscreen surface. Then you blit that surface to the screen evertime you render a frame. Not amazingly efficient, but works well for just about everyone.

I've also noticed you could set SDL_VIDEO_YUV_HWACCEL to 0 before opening the Movie. Although this may cause little graphic glitches as your program and Movie contend for the screen at the same time.