[SDL] OT : Kylix 3 will include C++ Builder for Linux...

Dominique Louis Dominique at SavageSoftware.com.au
Thu Jul 25 08:32:01 PDT 2002

Hi Daniel,

mrdaniel wrote:
> [2] And i would like to ask is there a way to know where is the surface of
> the smpeg before it is displayed.

usually you create your surface by calling SDL_SetVideoMode

and then you tell smpeg to use it, like this...
   // Set up a video surface to display MPeg in
   SMPEG_setdisplay(handle, screen, nil, nil);

> [3] How does the smpeg handles the display to the visible screen. Did it
> used the SDL_UpdateRect or the SDL_Flip.

Looking through smepg.h just about the SMPEG_setdisplay definition is 

/* Set the destination surface for MPEG video playback
    'surfLock' is a mutex used to synchronize access to 'dst', and can 
be NULL.
    'callback' is a function called when an area of 'dst' needs to be 
    If 'callback' is NULL, the default function (SDL_UpdateRect) will be 

If you have a look at the plaympeg.c example you will also see how you 
can use a callback function to make use of SDL_Flip instead.

> [4] If we know the smpeg surface before its being displayed, so it is
> possible for us to write data on it and then should we use updateRect or
> SDL_Flip.
> Is there some smpeg-write-over related examples or links that you can
> recommend.

I personally have not tried to write to the Surface while a movie is 
playing, but it would seem logical that using the callback function 
should give you the opportunity to blit something to the surface before 
it is flipped.
Maybe someone with more smpeg experience can clarify if it really is 
that easy to incorporate this sort of functionality.



More information about the SDL mailing list