SMPEG Misbehavior?

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 <stdio.h>
#include <smpeg.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>

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

Hola,
Creeria que no hace Falta: SMPEG_enablevideo(vid, 1);

Directamente colocas:

SMPEG *vid = SMPEG_new("/home/edd/a.mpg", &vidinfo, 1); Cambia el 0 x 1.
SMPEG_setdisplay(vid, screen, NULL, NULL);

SMPEG_play(vid);

Tuve estos problemas con los MP3 y los resolvi de esta manera.

Atte.
Ariel

Edd Barrett 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!

Hello Edd !

See you this site:

http://www.salta.softwarelibre.org.ar/radiou/index.html

Our work this explained there, in English also. There is example code, you can download this code and see as it works.

I hope that it serves to you.

We followed in contact. Good weekend !.

Ariel :wink:

Edd Barrett 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!

Also you can see

http://mp3kult.sourceforge.net/

http://freshmeat.net/projects/mp3kult/

here there is interesting code.

Too: http://www.google.com/linux keywords: mpeg+decoders

results search:

  SourceForge.net: GPL MPEG-1/2 DirectShow Decoder Filter        GPL MPEG-1/2 Decoder is a free DirectShow MPEG decoder filter. It can be used to play MPEG-1 and MPEG-2 streams in any media player based on DirectShow. ...

sourceforge.net/projects/gplmpgdec/ - 27k - En cach?
SourceForge.net: MAD (MPEG Audio Decoder) MAD is a high-quality fixed-point MPEG audio decoder with 24-bit output. The implementation is entirely new, based on the ISO/IEC standards, and performs …
sourceforge.net/projects/mad/ - 28k - En cach?
libmpeg2 - a free MPEG-2 video stream decoder xine - started as a simple mpeg-2 audio and video decoder, but it since became a full-featured DVD and video media player. …
libmpeg2.sourceforge.net/ - 11k - En cach?
Output devices - VDR Wiki full-featured DVB card (a DVB card which has not only the tuner onboard, but also the hardware decoder with TV-Out); Dxr3 or Hollywood-Plus MPEG decoder …
www.linuxtv.org/vdrwiki/index.php/Output_devices - 11k - En cach?
MPEG Audio Decoder Module RELATED SOURCES. Texas Instruments TMS320AV120 MPEG Audio Decoder Information … Texas Instruments TMS320AV120FN MPEG Audio Decoder …
linux.ee.vill.edu/mpeg/ - 4k - En cach?
PROPOSAL Our next step will be to implement the MPEG decoder into the chip. The decoder will be able to recognize the MPEG headers and other information needed to …
linux.ee.vill.edu/mpeg/proposal.html - 12k - En cach?

Good Weekend !!

Ariel :wink:

Edd Barrett 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!

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 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!