Can't build SMPEG against SDL 1.3

Trying to build SMPEG against SDL 1.3 gives the following errors in Visual Studio 2008:

error C2664: ‘SDL_CreateThread’ : cannot convert parameter 3 from ‘uintptr_t (__cdecl *)(void *,unsigned int,unsigned int (__stdcall *)(void *),void *,unsigned int,unsigned int *)’ to ‘pfnSDL_CurrentBeginThread’??? c:\users\mason\documents\sdl-1.3\smpeg\audio\mpegaudio.cpp??? 170

error C2065: ‘stderr’ : undeclared identifier??? c:\users\mason\documents\sdl-1.3\smpeg\mpeglist.cpp??? 38

error C3861: ‘fprintf’: identifier not found??? c:\users\mason\documents\sdl-1.3\smpeg\mpeglist.cpp??? 38

error C2664: ‘SDL_CreateThread’ : cannot convert parameter 3 from ‘uintptr_t (__cdecl *)(void *,unsigned int,unsigned int (__stdcall *)(void *),void *,unsigned int,unsigned int *)’ to ‘pfnSDL_CurrentBeginThread’??? c:\users\mason\documents\sdl-1.3\smpeg\video\mpegvideo.cpp??? 289

The first and the fourth error are identical, and they seem to be a problem with the definition of the SDL_CreateThread macro itself.

Anyone know what to do about these?

Anybody?? I can’t be the only person interested in building SMPEG against SDL 1.3…________________________________
From: @Mason_Wheeler (Mason Wheeler)
Subject: [SDL] Can’t build SMPEG against SDL 1.3

Trying to build SMPEG against SDL 1.3 gives the following errors in Visual Studio 2008:

error C2664: ‘SDL_CreateThread’ : cannot convert parameter 3 from ‘uintptr_t (__cdecl *)(void *,unsigned int,unsigned int (__stdcall *)(void *),void *,unsigned int,unsigned int *)’ to ‘pfnSDL_CurrentBeginThread’??? c:\users\mason\documents\sdl-1.3\smpeg\audio\mpegaudio.cpp??? 170

error C2065: ‘stderr’ : undeclared identifier??? c:\users\mason\documents\sdl-1.3\smpeg\mpeglist.cpp??? 38

error C3861: ‘fprintf’: identifier not found??? c:\users\mason\documents\sdl-1.3\smpeg\mpeglist.cpp??? 38

error C2664: ‘SDL_CreateThread’ : cannot convert parameter 3 from ‘uintptr_t (__cdecl *)(void *,unsigned int,unsigned int (__stdcall *)(void *),void *,unsigned int,unsigned int *)’ to ‘pfnSDL_CurrentBeginThread’??? c:\users\mason\documents\sdl-1.3\smpeg\video\mpegvideo.cpp??? 289

The first and the fourth error are identical, and they seem to be a problem with the definition of the SDL_CreateThread macro itself.

Anyone know what to do about these?


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

I’ll take a look at this soon.

–ryan.On 6/23/11 8:29 PM, Mason Wheeler wrote:

Anybody? I can’t be the only person interested in building SMPEG against
SDL 1.3…

OK, thanks.________________________________
From: icculus@icculus.org (icculus)
Subject: Re: [SDL] Can’t build SMPEG against SDL 1.3

On 6/23/11 8:29 PM, Mason Wheeler wrote:

Anybody? I can’t be the only person interested in building SMPEG against
SDL 1.3…

I’ll take a look at this soon.

–ryan.

Anybody? I can’t be the only person interested in building SMPEG against
SDL 1.3…

I’ll take a look at this soon.

I have to say: SMPEG is sort of a mess of threads. Even if it compiles,
it’s going to have heartache in that SDL_DisplayYUVOverlay() happened to
work in a background thread, by luck, but now this function is almost
certainly backed by OpenGL calls in 1.3 and will definitely break in bad
ways when called from a random thread.

The glvideo test app doesn’t work (audio, no video…presumably SDL 1.3
is setting its own GL state now, which confuses it). plaympeg crashes in
GL on a background thread, but if you disable the video callback thread
(so SMPEG_play() blocks until the video completes), plaympeg “works”.

I fixed the fprintf error, and I’ll figure out the CreateThread issue
when I boot Windows later tonight.

But I would probably say: use a different library.

–ryan.

? > Anybody? I can’t be the only person interested in building SMPEG against
? > SDL 1.3…

I’ll take a look at this soon.

I have to say: SMPEG is sort of a mess of threads. Even if it compiles, it’s going to have heartache in that SDL_DisplayYUVOverlay() happened to work in a background thread, by luck, but now this function is almost certainly backed by OpenGL calls in 1.3 and will definitely break in bad ways when called from a random thread.

The glvideo test app doesn’t work (audio, no video…presumably SDL 1.3 is setting its own GL state now, which confuses it). plaympeg crashes in GL on a background thread, but if you disable the video callback thread (so SMPEG_play() blocks until the video completes), plaympeg “works”.

I fixed the fprintf error, and I’ll figure out the CreateThread issue when I boot Windows later tonight.

But I would probably say: use a different library.

Got any recommendations?? There’s an alternate MP3 player in the SDL_Mixer code, but it’s GPL (not LGPL) and therefore unusable.>From: Ryan C. Gordon

Subject: Re: [SDL] Can’t build SMPEG against SDL 1.3

Got any recommendations? There’s an alternate MP3 player in the
SDL_Mixer code, but it’s GPL (not LGPL) and therefore unusable.

mpglib is LGPL: http://www.mpg123.org/api/

–ryan.

I have to mention it just in case you didn’t consider it. If all you need
to do is play audio and not actually MP3, you can use the OGG Vorbis
format. It’s BSD licensed and available at vorbis.com. This is what many
games have done, including UT2003/2004, DooM 3, EVE Online,
http://wiki.xiph.org/Games_that_use_Vorbis.

I’m sure you probably considered it, but I thought I’d mention it to be
certain.On Mon, Jun 27, 2011 at 12:41 AM, Ryan C. Gordon wrote:

Got any recommendations? There’s an alternate MP3 player in the

SDL_Mixer code, but it’s GPL (not LGPL) and therefore unusable.

mpglib is LGPL: http://www.mpg123.org/api/

–ryan.

_____________**
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.orghttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Joe & Anne Tennies
@Joe_Tennies