[SDL] How to write SMPEG call back function.
Roberto Prieto
dm2 at mi.madritel.es
Sun Jul 24 03:52:04 PDT 2005
Hello Laeeq,
I wrote this callback function, maybe it is not whatever you are looking
for...but anyway, I post it here:
void UpdateMPEGFrame(SDL_Surface *buffer, Sint32 x, Sint32 y, Uint32 w,
Uint32 h)
{
// if there is a filter selected...
if(iFXVideo!=FXSCREEN_NULL) IScreenFX->RenderFX(buffer,screen,iFXVideo);
// dump to screen
SDL_Flip(screen);
// Increase frame counter
iCurrentFrame++;
}
bye
----- Original Message -----
From: "Laeeq Khan" <laeeq_m_khan at hotmail.com>
To: <sdl at libsdl.org>
Sent: Sunday, July 24, 2005 3:32 AM
Subject: [SDL] How to write SMPEG call back function.
>I have successfully written some small examples with SMPEG library. In all
>these examples I used NULL as call-back function pointer in
>SMPEG_setdisplay(..., screen, NULL, NULL) call.
>
> The only examples of non-null call-back functions I can come across have
> one line function body consisting of SDL_UpdateRect(screen, x, y, w, h);
>
> I need some guidance as to how to write a non-trivial call back function,
> and use it in SMPEG_setdisplay() call.
>
> Any help is appreciated.
>
>
>
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl
More information about the SDL
mailing list