Hi! I just play a little bit with the snpeg libary and got one problem.
The source looks like this
SDL_Surface *video;
SDL_Surface *screen;
SDL_Rect rect;
void update ()
{
SDL_BlitSurface(video,NULL,screen,&rect);
SDL_Flip(screen);
}
int main (int arc, char *argv[])
{
// Init SDL_AUDIO,VIDOE
…
// SetVideoMode
…
// Load mpeg & enable sound / video
…
//
rect.x = 0;
rect.y = 0;
rect.w = screen->w / 2;
rect.h = screen->h / 2;
// scale mpeg to rect.w and rect.h,
video = SDL_CreateRGBSurface(SDL_SWSURFACE,rect.w,rect.h,16,0,0,0,0);
SMPEG_setdisplay(video,mpeg,NULL,update);
…
// PlayMPEG
I don’t remeber exactly the code, it is possible that i changed some
arguments int the function calls.
When i set the SMPEG_setdisplay(screen,mpeg,NULL,update); like this the
code works fine but when i try to render the frame to a own Surface, i see
just a black window.
how can i render a film to a own surface ?(in every example program the
frames are blited direct to the screen surface).
thanks for the support.
}
–
Sent through GMX FreeMail - http://www.gmx.net