SDL and smpeg

Hello !

I have compiled the smpeg package and installed it.
When I want to watch a Futurama MPEG (this is the only one I have)
it’s start doing something, and after a few seconds it teminates
with the parachute error message ???

Any suggestions what am I doing wrong ???

Maybe the MPEG is too big ???

Regards
Anes

Is smpeg development stopped?

And my big question. I don’t understand why this not plays mpeg files.
The text ‘video update’ only ocurres at call SMPEG_quit. Sorry for the
big paste:

#include <kkvideo.h>
#include <kkag.h>

static void video_update(SDL_Surface* surface, Sint32 x, Sint32 y,
Uint32 w, Uint32 h);

KKVideo::KKVideo(string filename, int repeat)
{
// — load mpeg video —
SMPEG_Info mpeg_info;

m_Video = SMPEG_new(filename.c_str(), &mpeg_info, 1);
if(!m_Video)
{
	cerr << "Cannot play video: " << SDL_GetError() << endl;
	exit(1);
}

SMPEG_loop(m_Video, repeat);

// --- create video surface ---
m_VideoSurface = SDL_AllocSurface(
	SDL_SWSURFACE,
	mpeg_info.width,
	mpeg_info.height,
	32,
	0x000000ff,
	0x0000ff00,
	0x00ff0000,
	0xff000000
);

if(!m_VideoSurface)
{
	cerr << "Cannot create a software surface: " << SDL_GetError() <<

endl;
exit(1);
}

SMPEG_setdisplay(m_Video, m_VideoSurface, NULL, video_update);

}

KKVideo::~KKVideo()
{
SMPEG_delete(m_Video);
SDL_FreeSurface(m_VideoSurface);
}

void KKVideo::play()
{
SMPEG_play(m_Video);
}

void KKVideo::pause()
{
SMPEG_pause(m_Video);
}

void KKVideo::stop()
{
SMPEG_stop(m_Video);
}

void KKVideo::rewind()
{
SMPEG_rewind(m_Video);
}

void KKVideo::seek(int bytes)
{
SMPEG_seek(m_Video, bytes);
}

void KKVideo::skip(float seconds)
{
SMPEG_skip(m_Video, seconds);
}

bool KKVideo::refresh()
{
return SMPEG_status(m_Video) != SMPEG_PLAYING;
}

static void video_update(SDL_Surface* surface, Sint32 x, Sint32 y,
Uint32 w, Uint32 h)
{
cout << “video update” << endl;

SDL_Rect dst;

dst.x = x;
dst.y = y;
dst.w = w;
dst.h = h;

SDL_BlitSurface(surface, NULL, kkag.system.getBackSurface(), &dst);

}

Thanks for readme!!! :slight_smile:

Is smpeg development stopped?

Yes and no. Loki doesn’t maintain it anymore (but I do, apparently).
However, I haven’t had time to work on improving the library in a long
time. The official development list for SMPEG is smpeg at icculus.org, which
you can get on by sending a blank email to smpeg-subscribe at icculus.org.

And my big question. I don’t understand why this not plays mpeg files.
The text ‘video update’ only ocurres at call SMPEG_quit. Sorry for the
big paste:
[…big paste snipped…]

Not sure off the top of my head; I’ll take a look later tonight.

–ryan.

sorry!!
it’s a error from my program

El lun, 27-05-2002 a las 20:54, samsaga2 escribi?:

Is smpeg development stopped?

And my big question. I don’t understand why this not plays mpeg files.
The text ‘video update’ only ocurres at call SMPEG_quit. Sorry for the
big paste:

<>