Smpeg under NetBSD hangs

I am using NetBSD 1.5.1_BETA under i386.

I installed smpeg-0.4.1 (using the NetBSD package source system).
SDL-1.1.6 is also installed. It is using PTH (GNU Portable Thread
library) version 1.3.7.

When I run smpeg’s included testing programs, plaympeg, gtv, and glmovie,
they just hang – no window pops up and they can’t be killed with kill

I’ve been told that this problem may be caused because of differences in
the threading implementation.

I was able to get plaympeg to attempt to play an audio file:
$ plaympeg /home/reed/audio/schubert_impromptu_in_ebma.mp3
Warning: incorrect audio format
schubert_impromptu_in_ebma.mp3: MPEG audio stream
Audio MPEG-1 Layer 3 128kbit/s 44100Hz stereo
Size: 5181986
Total time: 323.874125

This plays static buzzing and some high-speed music. mpg123 plays it

I ran the tests which were I built under the DSL test/ directory. As far
as I can tell, they seem to work. But I am not sure what I am looking for.
Any ideas on how I can properly test SDL?

I see that I need to upgrade versions. Before I upgrade to latest SDL (and
smpeg), does anyone have any advice, suggestions or things I should try?

(My goals: be able to play some mpeg video files that I have that include
audio, because mpeg_play doesn’t work too good; I am writing a review
about smpeg for a BSD news website.)


Jeremy C. Reed

I am using NetBSD 1.5.1_BETA under i386.

Is it possible for me to log in remotely and debug with you logged in?
If so, please send me e-mail privately at @slouken

See ya!
-Sam Lantinga, Lead Programmer, Loki Entertainment Software

Some more information that might help with using SDL/smpeg under NetBSD:

Steven M. Schultz created a “sem” port that worked so he could get the SDL
kit and plaympeg working (under BSD/OS):

   Sys V IPC semaphores are unsafe to use in a threaded environment
   because there is no mutex protection against simultaneous
   access of the semaphores.   If the SDL can not find 'sem_init',
   'sem_post', etc (POSIX semaphores) which are thread aware/safe
   then the non-safe SysV sempaphores will be used instead.    What I
   did was take the FreeBSD 'uthread_sem.c' file and "port" it to
   BSD/OS - at which point the SDL and smpeg-0.4.2 worked flawlessly.

He says his package is simple
enough that it should port to any BSD system that has threads but
lacks POSIX semaphores.

(Sam: If you want to log on again, please let me know. I already built his
sem library and installed to /usr/local/lib/libsem.a and
/usr/local/include/semaphore.h, but I have not tried it yet. Any hints?)

Jeremy C. Reed