[SDL] SMPEG Misbehavior?
Ariel S.N. RAMOS
asnramos at yahoo.com.ar
Sat Feb 3 13:59:58 PST 2007
Aqui te envio mas informacion que puede servirte a resolver el problema.
http://wiki.linuxfromscratch.org/blfs/wiki/SDLPlayerLib
Buen Fin de Semana !.
Ariel
Edd Barrett <vext01 at gmail.com> escribió:
Hello SDL,
I'm aware that this might be the wrong place to ask because:
a) This might be an internal sdl developers list. Depends how you
interppret "issues" in "This is a high volume list for discussion of
SDL development and issues related to SDL".
b) SMPEG isnt maintained by you guys, but as loki died.... and google
isn't helping much.
So I aplogise in advance, is there a better place to ask?
We are writing a windows media center style interface for a University
Assignment with SDL/SMPEG and eventually C++, but for now plain C
(prototype).
The code we have works, but the framerate gets slower and slower as if
we have a painters algorithm bug. Here is the code:
====================
#include
#include
#include
#include
#include
void vid_callback(SDL_Surface *screen, Sint32 x, Sint32 y, Sint32 w, Sint32 h);
int main(int argc, char **argv) {
SMPEG_Info vidinfo;
bzero((void *) &vidinfo, sizeof(SMPEG_Info));
SMPEG *vid = SMPEG_new("/home/edd/a.mpg", &vidinfo, 0);
if(!vidinfo.has_video) {
printf("Error occurred");
}
if (SDL_Init(SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_DOUBLEBUF) < 0) {
printf("%s\n", SDL_GetError());
exit(1);
}
SDL_Surface *screen = SDL_SetVideoMode(vidinfo.width,
vidinfo.height, 0, SDL_HWSURFACE);
SMPEG_enablevideo(vid, 1);
SMPEG_setdisplay(vid, screen, NULL, NULL);
//(SMPEG_DisplayCallback) vid_callback);
SMPEG_play(vid);
do {
SDL_Delay(250);
} while (!SDL_QuitRequested() && SMPEG_status(vid) == SMPEG_PLAYING);
}
// Currently unused
void vid_callback(SDL_Surface *screen, Sint32 x, Sint32 y, Sint32 w,
Sint32 h) {
}
================
Are we doing something terribly wrong?
Our platform is OpenBSD(Fast enough) and also linux (really fast
machine!). The code behaves the same on both.
Also does anyone know if there is any more documentation for SMPEG
other than the man page and source code?
Thanks
--
Best Regards
Edd + Geerd
_______________________________________________
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
---------------------------------
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
Probalo ya!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20070203/7f62f19b/attachment.htm
More information about the SDL
mailing list