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

Re: [pygame] movie flip/update



I'm not so sure what you mean by creating an offscreen surface, but I
don't think I can do what I wanted. I wanted to run mplayer in my pygame
window as a window in the main window. Kind of like a video preview, then
you click on the video and it'll go full screen. There isn't much info on
the list for movies let alone mplayer.

Thanks
Mike

> mike@zcentric.com wrote:
>> I looked around and just wondering if this is at all possible. When I
>> play a movie and also call and pygame.display.flip() or move the
>> window the video goes away. Is this a problem with my code or just one
>> of the things I'd have to deal with?
>
> that doesn't sound exactly normal, but not at all unexpected i suppose.
>
> unless you specify a render target, SDL and SMPEG attempt to access the
> video hardware overlays for mpeg playback. this is faster for playback,
> but can be awkward on some graphics cards.
>
> if there are no video overlays, it draws directly onto the display
> surface. pretty much just blitting the frames into memory as they are
> ready.
>
> the common workaround to any video wierdness is to create an offscreen
> Surface as the video render target. then once per frame blit that onto
> the main display. this will get rid of any problems but also slow the
> video down slightly.