[SMPEG] render MPEG offscreen

Hello,

I would like to use SMPEG to display some MPEG-1 files on a surface and
display it on the screen. SMPEG is intended to render the frames directly on
the screen.
Let’s say the surface where to render is created with the following code :

mpegSurcafe = SDL_SetVideoMode(
info.width, info.height, 32,
SDL_SWSURFACE | SDL_DOUBLEBUF | SDL_NOFRAME
);

Then it works fine.

But if it is created with
mpegSurface =
SDL_CreateRGBSurface(
SDL_SWSURFACE | SDL_DOUBLEBUF | SDL_NOFRAME,
info.width,
info.height,
32,
0xff000000,
0x00ff0000,
0x0000ff00,
0x000000ff
);

And then displayed later with a
SDL_BlitSurcafe(mpegSurcafe, NULL, screen, NULL);

It displays the movie under the YUV format although the conversion calls
have been done inside SMPEG…
why is that? Does anyone have an explanation?
thw
Alex

But if it is created with
mpegSurface =
SDL_CreateRGBSurface(
SDL_SWSURFACE | SDL_DOUBLEBUF | SDL_NOFRAME,
info.width,
info.height,
32,
0xff000000,
0x00ff0000,
0x0000ff00,
0x000000ff
);

And then displayed later with a
SDL_BlitSurcafe(mpegSurcafe, NULL, screen, NULL);

It displays the movie under the YUV format although the conversion calls
have been done inside SMPEG…

This is done quite often in the Loki titles and it works fine.
What’s the problem you’re having?
BTW, don’t use SDL_DOUBLEBUF and SDL_NOFRAME flags when creating a surface.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment