Author: thl
Update of /cvs/free/rpms/smpeg/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv20513
Added Files:
smpeg-0.4.4-aclocal18.patch smpeg-0.4.4-cvs-byteorder.patch
smpeg-0.4.4-cvs-createyuvoverlay.patch smpeg-0.4.4-fixes.patch
smpeg-0.4.4-gcc32.patch smpeg-0.4.4-gcc41.patch
smpeg-0.4.4-optflags.patch smpeg-0.4.4-version.patch
smpeg.spec
Log Message:
initial import from livna
smpeg-0.4.4-aclocal18.patch:
--- NEW FILE smpeg-0.4.4-aclocal18.patch ---
--- smpeg.m4~ 2001-04-04 23:28:14.000000000 +0300
+++ smpeg.m4 2004-12-04 19:59:28.622341976 +0200
@@ -10,7 +10,7 @@
ACTION-IF-NOT-FOUND]]])
dnl Test for SMPEG, and define SMPEG_CFLAGS and SMPEG_LIBS
dnl
-AC_DEFUN(AM_PATH_SMPEG,
+AC_DEFUN([AM_PATH_SMPEG],
[dnl
dnl Get the cflags and libraries from the smpeg-config script
dnl
smpeg-0.4.4-cvs-byteorder.patch:
--- NEW FILE smpeg-0.4.4-cvs-byteorder.patch ---
Index: smpeg.cpp
===================================================================
RCS file: /cvs/cvsroot/smpeg/smpeg.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- smpeg.cpp 4 Apr 2001 21:58:18 -0000 1.20
+++ smpeg.cpp 31 Dec 2003 04:48:47 -0000 1.21
@@ -32,6 +32,37 @@
MPEG *obj;
};
+
+static inline int sanityCheckByteorder(void)
+{
+ int sane = 0;
+ union {
+ Uint32 ui32;
+ Uint8 ui8[4];
+ } swapper;
+
+ swapper.ui32 = 0x00000001;
+
+#if SDL_BYTEORDER == SDL_LIL_ENDIAN
+ sane = (swapper.ui8[0] == 0x01);
+#else
+ sane = (swapper.ui8[3] == 0x01);
+#endif
+
+ if (!sane) {
+ fprintf(stderr,
+ "\n\n"
+ "*************************************************************\n"
+ " SMPEG ERROR: SDL is wrong about this platform's byte order!\n"
+ " You need to fix your SDL install before SMPEG can work!\n"
+ "*************************************************************\n"
+ "\n\n");
+ }
+
+ return(sane);
+}
+
+
/* Create a new SMPEG object from an MPEG file.
On return, if 'info' is not NULL, it will be filled with information
about the MPEG object.
@@ -45,6 +76,9 @@
{
SMPEG *mpeg;
+ if (!sanityCheckByteorder())
+ return(NULL);
+
/* Create a new SMPEG object! */
mpeg = new SMPEG;
mpeg->obj = new MPEG(file, sdl_audio ? true : false);
@@ -61,6 +95,9 @@
{
SMPEG *mpeg;
+ if (!sanityCheckByteorder())
+ return(NULL);
+
/* Create a new SMPEG object! */
mpeg = new SMPEG;
mpeg->obj = new MPEG(file, sdl_audio ? true : false);
@@ -81,6 +118,9 @@
{
SMPEG *mpeg;
+ if (!sanityCheckByteorder())
+ return(NULL);
+
/* Create a new SMPEG object! */
mpeg = new SMPEG;
mpeg->obj = new MPEG(data, size, sdl_audio ? true : false);
@@ -96,6 +136,9 @@
{
SMPEG *mpeg;
+ if (!sanityCheckByteorder())
+ return(NULL);
+
/* Create a new SMPEG object! */
mpeg = new SMPEG;
mpeg->obj = new MPEG(src, sdl_audio ? true : false);
smpeg-0.4.4-cvs-createyuvoverlay.patch:
--- NEW FILE smpeg-0.4.4-cvs-createyuvoverlay.patch ---
Index: video/MPEGvideo.cpp
===================================================================
RCS file: /cvs/cvsroot/smpeg/video/MPEGvideo.cpp,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- video/MPEGvideo.cpp 18 Jun 2001 20:59:57 -0000 1.40
+++ video/MPEGvideo.cpp 31 Dec 2003 05:09:34 -0000 1.41
@@ -438,6 +438,10 @@
SDL_FreeYUVOverlay(_image);
}
_image = SDL_CreateYUVOverlay(_srcrect.w, _srcrect.h, SDL_YV12_OVERLAY, dst);
+ if ( _image == NULL ) {
+ return false;
+ }
+
if ( !_dstrect.w || !_dstrect.h ) {
_dstrect.w = dst->w;
_dstrect.h = dst->h;
@@ -502,6 +506,7 @@
{
SDL_FreeYUVOverlay(_image);
_image = SDL_CreateYUVOverlay(_srcrect.w, _srcrect.h, SDL_YV12_OVERLAY, _dst);
+ /* !!! FIXME: Uhh...what if this one fails? */
}
SDL_mutexV( _mutex );
smpeg-0.4.4-fixes.patch:
--- NEW FILE smpeg-0.4.4-fixes.patch ---
Index: MPEG.cpp
===================================================================
RCS file: /cvs/cvsroot/smpeg/MPEG.cpp,v
retrieving revision 1.29
retrieving revision 1.31
diff -u -u -r1.29 -r1.31
--- MPEG.cpp 2001/06/18 20:59:57 1.29
+++ MPEG.cpp 2003/01/26 00:21:41 1.31
@@ -98,7 +98,8 @@
videoaction = NULL;
audio = NULL;
video = NULL;
- audioaction_enabled = videoaction_enabled = false;
+ audioaction_enabled = SDLaudio;
+ videoaction_enabled = false;
loop = false;
pause = false;
@@ -133,6 +134,7 @@
video = NULL;
system = NULL;
error = NULL;
+ source = NULL;
audiostream = videostream = NULL;
audioaction = NULL;
Index: MPEGaudio.h
===================================================================
RCS file: /cvs/cvsroot/smpeg/MPEGaudio.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -u -r1.22 -r1.23
--- MPEGaudio.h 2001/04/04 20:42:40 1.22
+++ MPEGaudio.h 2001/07/17 19:52:24 1.23
@@ -212,6 +212,7 @@
/* MPEG header variables */
/*************************/
private:
+ int last_speed;
int layer,protection,bitrateindex,padding,extendedmode;
enum _mpegversion {mpeg1,mpeg2} version;
enum _mode {fullstereo,joint,dual,single} mode;
Index: MPEGlist.cpp
===================================================================
RCS file: /cvs/cvsroot/smpeg/MPEGlist.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -u -r1.5 -r1.6
--- MPEGlist.cpp 2000/06/06 01:51:43 1.5
+++ MPEGlist.cpp 2003/01/26 00:21:41 1.6
@@ -16,7 +16,7 @@
if(prev) prev->next = next;
if(data)
{
- delete data;
+ delete[] data;
data = 0;
}
}
Index: MPEGsystem.cpp
===================================================================
RCS file: /cvs/cvsroot/smpeg/MPEGsystem.cpp,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -u -r1.37 -r1.38
--- MPEGsystem.cpp 2001/04/27 23:12:17 1.37
+++ MPEGsystem.cpp 2003/01/26 00:21:41 1.38
@@ -1165,8 +1165,8 @@
time = -1;
}
- delete buffer;
+ delete[] buffer;
/* Get back to saved position */
if((pos = SDL_RWseek(source, pos, SEEK_SET)) < 0)
Index: glmovie.c
===================================================================
RCS file: /cvs/cvsroot/smpeg/glmovie.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -u -r1.5 -r1.6
--- glmovie.c 2000/10/04 17:38:03 1.5
+++ glmovie.c 2002/07/10 02:38:48 1.6
@@ -8,8 +8,8 @@
#include <stdlib.h>
#include <malloc.h>
#include <string.h>
-#include <unistd.h>
+/*#include <unistd.h>*/
#include "glmovie.h"
static void glmpeg_update( SDL_Surface*, Sint32, Sint32, Uint32, Uint32 );
Index: audio/MPEGaudio.cpp
===================================================================
RCS file: /cvs/cvsroot/smpeg/audio/MPEGaudio.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -u -r1.28 -r1.29
--- audio/MPEGaudio.cpp 2001/04/04 20:42:40 1.28
+++ audio/MPEGaudio.cpp 2002/06/08 09:53:51 1.29
@@ -200,9 +200,13 @@
MPEGaudio:: Stop(void)
{
if ( valid_stream ) {
- SDL_LockAudio();
+ if ( sdl_audio )
+ SDL_LockAudio();
+
playing = false;
- SDL_UnlockAudio();
+
+ if ( sdl_audio )
+ SDL_UnlockAudio();
}
ResetPause();
}
Index: audio/mpegtoraw.cpp
===================================================================
RCS file: /cvs/cvsroot/smpeg/audio/mpegtoraw.cpp,v
retrieving revision 1.33
retrieving revision 1.35
diff -u -u -r1.33 -r1.35
--- audio/mpegtoraw.cpp 2001/04/05 20:27:48 1.33
+++ audio/mpegtoraw.cpp 2003/02/15 02:01:15 1.35
@@ -84,6 +84,7 @@
register REAL *s1,*s2;
REAL *s3,*s4;
+ last_speed = 0;
stereo = true;
forcetomonoflag = false;
forcetostereoflag = false;
@@ -271,6 +272,20 @@
getbyte(); // CRC, Not check!!
getbyte();
}
+
+ // Sam 7/17 - skip sequences of quickly varying frequencies
+ int speed = frequencies[version][frequency];
+ if ( speed != last_speed ) {
+ last_speed = speed;
+ if ( rawdatawriteoffset ) {
+ ++decodedframe;
+#ifndef THREADED_AUDIO
+ ++currentframe;
+#endif
+ }
+ return loadheader();
+ }
+
return true;
}
@@ -350,7 +365,6 @@
}
audio->decoding = false;
- audio->decode_thread = NULL;
return(0);
}
#endif /* THREADED_AUDIO */
smpeg-0.4.4-gcc32.patch:
--- NEW FILE smpeg-0.4.4-gcc32.patch ---
Index: Makefile.am
===================================================================
RCS file: /cvs/cvsroot/smpeg/Makefile.am,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -u -r1.15 -r1.16
--- Makefile.am 2001/04/04 20:28:14 1.15
+++ Makefile.am 2002/09/26 05:24:04 1.16
@@ -4,6 +4,8 @@
# These are the subdirectories that are always built
SUBDIRS = audio video
+CXXLD = cc
+
bin_SCRIPTS = smpeg-config
# The smpeg library target
@@ -34,7 +36,7 @@
libsmpeg_la_LDFLAGS = \
-release $(LT_RELEASE) \
- -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
+ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -lstdc++
libsmpeg_la_LIBADD = \
audio/libaudio.la \
smpeg-0.4.4-gcc41.patch:
--- NEW FILE smpeg-0.4.4-gcc41.patch ---
===================================================================
RCS file: /cvs/cvsroot/smpeg/MPEGaudio.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- smpeg/MPEGaudio.h 2005/12/17 03:09:08 1.24
+++ smpeg/MPEGaudio.h 2005/12/17 03:17:06 1.25
@@ -155,12 +155,6 @@
/* The actual MPEG audio class */
class MPEGaudio : public MPEGerror, public MPEGaudioaction {
- friend void Play_MPEGaudioSDL(void *udata, Uint8 *stream, int len);
- friend int Play_MPEGaudio(MPEGaudio *audio, Uint8 *stream, int len);
-#ifdef THREADED_AUDIO
- friend int Decode_MPEGaudio(void *udata);
-#endif
-
public:
MPEGaudio(MPEGstream *stream, bool initSDL = true);
virtual ~MPEGaudio();
@@ -371,6 +365,20 @@
#define N_TIMESTAMPS 5
double timestamp[N_TIMESTAMPS];
+
+ /* Functions which access MPEGaudio internals */
+ friend void Play_MPEGaudioSDL(void *udata, Uint8 *stream, int len);
+ friend int Play_MPEGaudio(MPEGaudio *audio, Uint8 *stream, int len);
+#ifdef THREADED_AUDIO
+ friend int Decode_MPEGaudio(void *udata);
+#endif
};
+/* Need to duplicate the prototypes, this is not a typo :) */
+void Play_MPEGaudioSDL(void *udata, Uint8 *stream, int len);
+int Play_MPEGaudio(MPEGaudio *audio, Uint8 *stream, int len);
+#ifdef THREADED_AUDIO
+int Decode_MPEGaudio(void *udata);
+#endif
+
#endif /* _MPEGAUDIO_H_ */
smpeg-0.4.4-optflags.patch:
--- NEW FILE smpeg-0.4.4-optflags.patch ---
--- configure.in~ 2001-04-24 22:25:39.000000000 +0300
+++ configure.in 2004-12-04 20:04:32.859154887 +0200
@@ -104,18 +104,6 @@
if test x$ac_cv_prog_gcc = xyes; then
CFLAGS="$CFLAGS -fexpensive-optimizations -fomit-frame-pointer"
fi
- case "$target" in
- i486-*-*) # Yeah right. :)
- if test x$ac_cv_prog_gcc = xyes; then
- CFLAGS="$CFLAGS -march=486"
- fi
- ;;
- i?86-*-*)
- if test x$ac_cv_prog_gcc = xyes; then
- CFLAGS="$CFLAGS -march=pentium -mcpu=pentiumpro"
- fi
- ;;
- esac
fi
dnl Check for SDL
smpeg-0.4.4-version.patch:
--- NEW FILE smpeg-0.4.4-version.patch ---
--- smpeg-0.4.4/smpeg.h 2001-04-04 23:58:18.000000000 +0200
+++ smpeg/smpeg.h 2001-07-17 21:52:24.000000000 +0200
@@ -34,7 +34,7 @@
#define SMPEG_MAJOR_VERSION 0
#define SMPEG_MINOR_VERSION 4
-#define SMPEG_PATCHLEVEL 3
+#define SMPEG_PATCHLEVEL 4
typedef struct {
Uint8 major;
--- NEW FILE smpeg.spec ---
Name: smpeg
Version: 0.4.4
Release: 12%{?dist}
Summary: MPEG library for SDL
Group: System Environment/Libraries
License: LGPL
URL:
http://icculus.org/smpeg/
Source0: ftp://sunsite.dk/pub/os/linux/loki/open-source/smpeg/smpeg-0.4.4.tar.gz
Patch0: smpeg-0.4.4-gcc32.patch
Patch1: smpeg-0.4.4-fixes.patch
Patch2: smpeg-0.4.4-version.patch
Patch3: smpeg-0.4.4-cvs-byteorder.patch
Patch4: smpeg-0.4.4-cvs-createyuvoverlay.patch
Patch5: smpeg-0.4.4-aclocal18.patch
Patch6: smpeg-0.4.4-optflags.patch
#http://cvs.icculus.org/cvs/smpeg/MPEGaudio.h?r1=1.24&r2=1.25&sortby=date&makepatch=1&diff_format=u
Patch7: smpeg-0.4.4-gcc41.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: SDL-devel
BuildRequires: gtk+-devel
BuildRequires: automake14
BuildRequires: autoconf
%description
SMPEG is based on UC Berkeley's mpeg_play software MPEG decoder
and SPLAY, an MPEG audio decoder created by Woo-jae Jung. SMPEG has
completed the initial work to wed these two projects in order to
create a general purpose MPEG video/audio player for the Linux OS.
%package devel
Summary: Header files and static libraries for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: SDL-devel
%description devel
This package contains header files and static libraries for %{name}.
%prep
%setup -q
%patch0 -p0
%patch1 -p0
%patch2 -p1
%patch3 -p0
%patch4 -p0
%patch5 -p0
%patch6 -p0
%patch7 -p1
%{__perl} -pi -e 's|\s*\@SMPEG_RLD_FLAGS\@||' smpeg-config.in
aclocal-1.4
automake-1.4 -a
autoconf
%build
%configure --disable-debug --disable-opengl-player --disable-static
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc CHANGES COPYING README TODO
%{_bindir}/plaympeg
%{_bindir}/gtv
%{_libdir}/libsmpeg-0.4.so.*
%{_mandir}/man[^3]/*
%files devel
%defattr(-,root,root,-)
%{_bindir}/smpeg-config
%{_includedir}/smpeg
%{_libdir}/libsmpeg.so
%{_datadir}/aclocal/smpeg.m4
%changelog
* Mon Aug 04 2008 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info - 0.4.4-12
- rebuild
* Fri Oct 6 2006 Dams <anvil[AT]livna.org> - 0.4.4-11
- libsmpeg-0.4.so -> libsmpeg.so
* Fri Oct 6 2006 Dams <anvil[AT]livna.org> - 0.4.4-10
- Small cleanup
- Disabled static libraries
* Thu Mar 09 2006 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
- switch to new release field
- drop Epoch
* Tue Feb 28 2006 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
- add dist
* Fri Jan 20 2006 Adrian Reber <adrian(a)lisas.de> - 0.4.4-0.lvn.9
- Added patch from CVS to fix gcc 4.1 errors
- Dropped 0 Epoch
* Sat Dec 4 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:0.4.4-0.lvn.8
- Honor $RPM_OPT_FLAGS.
- Avoid aclocal >= 1.8 warnings from smpeg.m4.
* Sun May 23 2004 Marius L. Jøhndal <mariuslj at ifi.uio.no> - 0:0.4.4-0.lvn.7
- Added bug-fixes from CVS: smpeg-0.4.4-cvs-byteorder.patch,
smpeg-0.4.4-cvs-createyuvoverlay.patch.
* Thu May 20 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:0.4.4-0.lvn.6
- Avoid rpath in smpeg-config.
* Thu Oct 16 2003 Marius L. Jøhndal <mariuslj at ifi.uio.no> - 0:0.4.4-0.fdr.5
- smpeg-devel requires SDL-devel.
- Brought in line with Fedora's spec template.
- Added version number patch.
* Sun May 11 2003 Marius L. Jøhndal <mariuslj at ifi.uio.no> - 0:0.4.4-0.fdr.4
- Corrected description text.
- Added TODO to documentation.
- Use RPM_BUILD_ROOT instead of macro.
* Sat May 3 2003 Marius L. Jøhndal <mariuslj at ifi.uio.no> - 0:0.4.4-0.fdr.3
- Added epoch to -devel requires.
* Sat Apr 26 2003 Marius L. Jøhndal <mariuslj at ifi.uio.no> - 0:0.4.4-0.fdr.2
- Added epoch.
- Bug-fixes from CVS.
- Added full path of source.
* Thu Mar 6 2003 Marius L. Jøhndal <mariuslj at ifi.uio.no> - 0.4.4-0.fdr.1
- Initial Fedora RPM release.
* Tue Oct 29 2002 Marius L. Jøhndal <mariuslj at ifi.uio.no>
- Changed configure invocation to macro.
- Modified installation paths to use bindir, libdir etc.
- Patch for strange g++ 3.2 build errors.
* Fri Mar 3 2000 Sam Lantinga <hercules(a)lokigames.com>
- Split package into development and runtime packages