mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-24 00:45:52 +00:00
Update to version 0.49
While I am here, do some clean up: 1) Added RESTRICTED tag, for codec LEGAL status is unsure 2) Added ${PKGMESSAGE} regarding kernel USE_LDT 3) Upheld the "only under ${WRKDIR}" rule Approved by: maintainer <holger@eit.uni-kl.de> PR: 21663
This commit is contained in:
parent
cd0520d87d
commit
cdf53fbe51
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=33619
@ -6,33 +6,52 @@
|
||||
#
|
||||
|
||||
PORTNAME= avifile
|
||||
PORTVERSION= 0.47.1
|
||||
PORTVERSION= 0.49
|
||||
CATEGORIES= graphics
|
||||
MASTER_SITES= http://divx.euro.ru/
|
||||
DISTFILES= avifile-${PORTVERSION}${EXTRACT_SUFX} binaries.zip
|
||||
EXTRACT_ONLY= avifile-${PORTVERSION}${EXTRACT_SUFX}
|
||||
MASTER_SITES= http://ernie.eit.uni-kl.de/avifile/ \
|
||||
http://divx.euro.ru/ \
|
||||
http://www.toon.eu.org/divx/
|
||||
DISTFILES= avifile-${PORTVERSION}.tar.gz \
|
||||
binaries-${CODEC_VERSION}.zip
|
||||
EXTRACT_ONLY= avifile-${PORTVERSION}.tar.gz
|
||||
|
||||
MAINTAINER= holger@eit.uni-kl.de
|
||||
|
||||
LIB_DEPENDS= qt2.4:${PORTSDIR}/x11-toolkits/qt22 \
|
||||
SDL-1.1.2:${PORTSDIR}/devel/sdl-devel
|
||||
LIB_DEPENDS= SDL-1.1.2:${PORTSDIR}/devel/sdl-devel
|
||||
BUILD_DEPENDS= unzip:${PORTSDIR}/archivers/unzip
|
||||
|
||||
RESTRICTED= Unsure of codec\'s license
|
||||
RESTRICTED_FILES= binaries-${CODEC_VERSION}.zip
|
||||
|
||||
ONLY_FOR_ARCHS= i386
|
||||
USE_GMAKE= yes
|
||||
USE_QT2= yes
|
||||
USE_XLIB= yes
|
||||
USE_GMAKE= yes
|
||||
INSTALLS_SHLIB= yes
|
||||
|
||||
HAS_CONFIGURE= yes
|
||||
CONFIGURE_ENV= SDL_CONFIG="${SDL_CONFIG}" \
|
||||
MOC="${MOC}"
|
||||
CONFIGURE_ARGS+= --enable-mmx \
|
||||
--with-qt-includes=${X11BASE}/include/qt2 \
|
||||
--with-qt-libraries=${X11BASE}/lib \
|
||||
--with-win32-path=${LOCALBASE}/lib/win32
|
||||
|
||||
CODEC_VERSION= 000918
|
||||
|
||||
SDL_CONFIG?= ${LOCALBASE}/bin/sdl11-config
|
||||
MOC?= ${X11BASE}/bin/moc2
|
||||
|
||||
CONFIGURE_ENV= SDL_CONFIG="${SDL_CONFIG}" \
|
||||
MOC="${MOC}"
|
||||
CONFIGURE_ARGS= --enable-mmx \
|
||||
--with-qt-includes=${X11BASE}/include/qt2 \
|
||||
--with-win32-path=${LOCALBASE}/lib/win32
|
||||
post-extract:
|
||||
@${LOCALBASE}/bin/unzip ${DISTDIR}/binaries-${CODEC_VERSION}.zip \
|
||||
-d ${WRKDIR}/codecs
|
||||
|
||||
#post-build:
|
||||
# (cd ${WRKSRC}/samples && ${SETENV} ${MAKE_ENV} ${GMAKE})
|
||||
|
||||
post-install:
|
||||
@${MKDIR} ${PREFIX}/lib/win32
|
||||
@${INSTALL_DATA} ${WRKDIR}/codecs/* ${PREFIX}/lib/win32
|
||||
@/usr/bin/fmt < ${PKGMESSAGE}
|
||||
|
||||
pre-install:
|
||||
unzip ${DISTDIR}/binaries.zip -d ${LOCALBASE}/lib/win32
|
||||
strip ${WRKSRC}/bin/aviplay ${WRKSRC}/bin/benchmark
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,2 +1,2 @@
|
||||
MD5 (avifile-0.47.1.tar.gz) = edbad85f6c72d61f3a66d99c61620f39
|
||||
MD5 (binaries.zip) = 6df7c0a266ba6e8c022160605791644b
|
||||
MD5 (avifile-0.49.tar.gz) = 96115ac6436b16109ce0c8d65ad3e915
|
||||
MD5 (binaries-000918.zip) = 2b59bf068c7508ad071fa9aca58cd1e7
|
||||
|
@ -1,42 +1,14 @@
|
||||
--- configure.orig Sat Sep 16 11:33:30 2000
|
||||
+++ configure Sat Sep 16 11:43:00 2000
|
||||
@@ -2302,7 +2302,7 @@
|
||||
|
||||
|
||||
USE_QT=1
|
||||
-USE_VIDCAP=1
|
||||
+USE_VIDCAP=0
|
||||
|
||||
# Check whether --enable-qt or --disable-qt was given.
|
||||
if test "${enable_qt+set}" = set; then
|
||||
@@ -2631,7 +2631,7 @@
|
||||
|
||||
CXXFLAGS="$CXXFLAGS -I$qt_incdir"
|
||||
LDFLAGS="-L$qt_libdir $X_LDFLAGS"
|
||||
-LIBS="$LIBS -lqt -lXext -lX11 $LIBSOCKET"
|
||||
+LIBS="$LIBS -lqt2 -lXext -lX11 $LIBSOCKET"
|
||||
|
||||
|
||||
ac_ext=C
|
||||
--- player/Makefile.in.orig Sat Sep 16 11:33:26 2000
|
||||
+++ player/Makefile.in Sat Sep 16 11:43:46 2000
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
|
||||
MOC=@MOC@
|
||||
-LIBS=@LIBS@ -lX11 -lXext -lqt -laviplay @DGA_LDADD@ @SDL_LIBS@
|
||||
+LIBS=@LIBS@ -lX11 -lXext -lqt2 -laviplay @DGA_LDADD@ @SDL_LIBS@
|
||||
LIB_DIRS=-L../lib @QT_LDFLAGS@ -L/usr/X11R6/lib -L/usr/local/lib
|
||||
CDOPT=@CD_OPT@
|
||||
LDOPT=@LD_OPT@
|
||||
--- samples/benchmark/Makefile.in.orig Sat Sep 16 11:33:29 2000
|
||||
+++ samples/benchmark/Makefile.in Sat Sep 16 11:43:27 2000
|
||||
@@ -5,7 +5,7 @@
|
||||
CFLAGS=-I../../include -I/usr/X11R6/include @QT_INCLUDES@ @SDL_CFLAGS@
|
||||
|
||||
|
||||
-LIBS=@LIBS@ -lX11 -lXext -lqt -laviplay @DGA_LDADD@ @SDL_LIBS@
|
||||
+LIBS=@LIBS@ -lX11 -lXext -lqt2 -laviplay @DGA_LDADD@ @SDL_LIBS@
|
||||
LIB_DIRS=@QT_LDFLAGS@ -L/usr/X11R6/lib -L../../lib
|
||||
|
||||
MOC=@MOC@
|
||||
--- lib/avifile/AviWrite.cpp.orig Fri Oct 6 12:58:16 2000
|
||||
+++ lib/avifile/AviWrite.cpp Fri Oct 6 12:59:14 2000
|
||||
@@ -23,7 +23,11 @@
|
||||
try
|
||||
{
|
||||
m_status=0;
|
||||
+#ifdef O_LARGEFILE
|
||||
m_fd=new FileBuffer(name, O_WRONLY | O_CREAT | O_TRUNC | O_LARGEFILE, mask);
|
||||
+#else
|
||||
+ m_fd=new FileBuffer(name, O_WRONLY | O_CREAT | O_TRUNC, mask);
|
||||
+#endif
|
||||
const int junk_size=0x800;
|
||||
char* junk=new char[junk_size];
|
||||
memset(junk, 0, junk_size);
|
||||
|
@ -1,82 +1,11 @@
|
||||
--- lib/avifile/AviWrite.cpp.orig Mon Sep 11 15:40:31 2000
|
||||
+++ lib/avifile/AviWrite.cpp Wed Sep 13 20:52:55 2000
|
||||
@@ -19,7 +19,11 @@
|
||||
try
|
||||
{
|
||||
m_status=0;
|
||||
+#ifdef O_LARGEFILE
|
||||
m_fd=open(name, O_WRONLY | O_CREAT | O_TRUNC | O_LARGEFILE, mask);
|
||||
+#else
|
||||
+ m_fd=open(name, O_WRONLY | O_CREAT | O_TRUNC, mask);
|
||||
+#endif
|
||||
if(m_fd==-1)
|
||||
throw FATAL("Can't open file for writing");
|
||||
--- xmps-avi-plugin/Makefile.in.orig Fri Oct 6 13:05:55 2000
|
||||
+++ xmps-avi-plugin/Makefile.in Fri Oct 6 13:06:22 2000
|
||||
@@ -1,6 +1,6 @@
|
||||
-LIBS = -lstdc++ -L../lib -L@libdir@ -laviplay -lpthread @XMPS_LIBS@
|
||||
+LIBS = -lstdc++ -L../lib -L@libdir@ -laviplay -lpthread @XMPS_LIBS@ @SDL_LIBS@
|
||||
|
||||
@@ -203,7 +207,11 @@
|
||||
}
|
||||
long long AviWriteFile::FileSize()
|
||||
{
|
||||
+#ifdef __Linux__
|
||||
return lseek64(m_fd, 0, SEEK_CUR);
|
||||
+#else
|
||||
+ return lseek(m_fd, 0, SEEK_CUR);
|
||||
+#endif
|
||||
}
|
||||
-INCLUDES = -I. -I../include -I@includedir@/avifile @XMPS_CFLAGS@
|
||||
+INCLUDES = -I. -I../include -I@includedir@/avifile @XMPS_CFLAGS@ @SDL_CFLAGS@
|
||||
|
||||
AviWriteStream::AviWriteStream
|
||||
--- lib/videocodec/Module.h.orig Sat Sep 9 14:24:49 2000
|
||||
+++ lib/videocodec/Module.h Wed Sep 13 20:20:25 2000
|
||||
@@ -4,6 +4,10 @@
|
||||
#include <videoencoder.h>
|
||||
#include <list>
|
||||
#include <string>
|
||||
+#ifdef __FreeBSD__
|
||||
+#include <sys/time.h>
|
||||
+#endif
|
||||
+
|
||||
using namespace std;
|
||||
|
||||
class VideoCodecControl;
|
||||
--- player/renderer.cpp.orig Mon Sep 11 08:38:07 2000
|
||||
+++ player/renderer.cpp Fri Sep 15 20:22:55 2000
|
||||
@@ -11,6 +11,7 @@
|
||||
#ifdef __FreeBSD__
|
||||
#include <machine/param.h>
|
||||
#include <sys/types.h>
|
||||
+#include <unistd.h>
|
||||
#endif
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
--- lib/aviplay/aviutil.cpp.orig Sat Sep 16 13:49:08 2000
|
||||
+++ lib/aviplay/aviutil.cpp Sat Sep 16 13:54:06 2000
|
||||
@@ -28,16 +28,18 @@
|
||||
}
|
||||
CPU_Freq::CPU_Freq()
|
||||
{
|
||||
- FILE *f = fopen ("/proc/cpuinfo", "r");
|
||||
char line[200];
|
||||
char model[200]="unknown";
|
||||
char flags[500]="";
|
||||
char *s,*value;
|
||||
|
||||
+#ifdef __FreeBSD__
|
||||
+ freq=old_freq();
|
||||
+ cerr<<freq/1000.<<" MHz processor detected"<<endl;
|
||||
+#else
|
||||
+ FILE *f = fopen ("/proc/cpuinfo", "r");
|
||||
+
|
||||
freq=-1;
|
||||
-// freq=old_freq();
|
||||
-// cerr<<freq/1000.<<" MHz processor detected"<<endl;
|
||||
-// return;
|
||||
if (!f)
|
||||
{
|
||||
printf("Can't open /proc/cpuinfo for reading\n");
|
||||
@@ -86,6 +88,7 @@
|
||||
}
|
||||
#endif
|
||||
fclose(f);
|
||||
+#endif
|
||||
}
|
||||
|
||||
CPU_Freq freq;
|
||||
all: avi_configure.o avi_codec.o
|
||||
$(CC) -shared avi_configure.o avi_codec.o $(LIBS) -o libavi.so
|
||||
|
@ -1,11 +1,15 @@
|
||||
--- xmps-avi-plugin/Makefile.in.orig Sat Sep 16 14:13:04 2000
|
||||
+++ xmps-avi-plugin/Makefile.in Sat Sep 16 14:20:30 2000
|
||||
@@ -1,6 +1,6 @@
|
||||
-LIBS = -lstdc++ -L../lib -L@libdir@ -laviplay -lpthread @XMPS_LIBS@
|
||||
+LIBS = -lstdc++ -L../lib -L@libdir@ -laviplay -pthread @XMPS_LIBS@
|
||||
--- lib/videocodec/Module.h.orig Fri Oct 6 13:01:34 2000
|
||||
+++ lib/videocodec/Module.h Fri Oct 6 13:02:09 2000
|
||||
@@ -4,6 +4,12 @@
|
||||
#include <videoencoder.h>
|
||||
#include <list>
|
||||
#include <string>
|
||||
+#if (defined(__unix__) || defined(unix)) && !defined(USG)
|
||||
+#include <sys/param.h>
|
||||
+#endif
|
||||
+#if (defined(BSD) && (BSD >= 199103))
|
||||
+#include <sys/time.h>
|
||||
+#endif
|
||||
using namespace std;
|
||||
|
||||
-INCLUDES = -I. -I../include -I@includedir@/avifile @XMPS_CFLAGS@
|
||||
+INCLUDES = -I. -I../include -I@includedir@/avifile @XMPS_CFLAGS@ @SDL_CFLAGS@
|
||||
|
||||
all: avi_configure.o avi_codec.o
|
||||
$(CC) -shared avi_configure.o avi_codec.o $(LIBS) -o libavi.so
|
||||
class VideoCodecControl;
|
||||
|
@ -1,235 +1,22 @@
|
||||
--- lib/loader/ext.c.orig Sat Sep 16 17:02:10 2000
|
||||
+++ lib/loader/ext.c Sat Sep 16 17:02:14 2000
|
||||
@@ -7,7 +7,7 @@
|
||||
********************************************************/
|
||||
#include <config.h>
|
||||
--- Makefile.in.orig Tue Oct 3 08:19:35 2000
|
||||
+++ Makefile.in Fri Oct 6 13:36:01 2000
|
||||
@@ -66,17 +66,14 @@
|
||||
$(INSTALL_PROGRAM) -m0755 ./avifile-config $(bindir)
|
||||
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/mman.h>
|
||||
#include <errno.h>
|
||||
--- lib/loader/win32.c.orig Sat Sep 16 17:03:28 2000
|
||||
+++ lib/loader/win32.c Sat Sep 16 17:03:30 2000
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "win32.h"
|
||||
#include <stdio.h>
|
||||
#include <pthread.h>
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
--- lib/loader/driver.c.orig Sat Sep 16 17:04:30 2000
|
||||
+++ lib/loader/driver.c Sat Sep 16 17:04:32 2000
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <config.h>
|
||||
#include <stdio.h>
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
#include <wine/driver.h>
|
||||
#include <wine/pe_image.h>
|
||||
#include <wine/winreg.h>
|
||||
--- lib/loader/resource.c.orig Sat Sep 16 17:07:41 2000
|
||||
+++ lib/loader/resource.c Sat Sep 16 17:08:00 2000
|
||||
@@ -253,6 +253,56 @@
|
||||
return RES_SizeofResource( hModule, hRsrc );
|
||||
}
|
||||
|
||||
+/**********************************************************************
|
||||
+ * LoadStringW (USER32.376)
|
||||
+ */
|
||||
+INT WINAPI LoadStringW( HINSTANCE instance, UINT resource_id,
|
||||
+ LPWSTR buffer, INT buflen )
|
||||
+{
|
||||
+ HGLOBAL hmem;
|
||||
+ HRSRC hrsrc;
|
||||
+ WCHAR *p;
|
||||
+ int string_num;
|
||||
+ int i;
|
||||
+
|
||||
+ if (HIWORD(resource_id)==0xFFFF) /* netscape 3 passes this */
|
||||
+ resource_id = (UINT)(-((INT)resource_id));
|
||||
+ TRACE("instance = %04x, id = %04x, buffer = %08x, "
|
||||
+ "length = %d\n", instance, (int)resource_id, (int) buffer, buflen);
|
||||
+
|
||||
+ /* Use bits 4 - 19 (incremented by 1) as resourceid, mask out
|
||||
+ * 20 - 31. */
|
||||
+ hrsrc = FindResourceW( instance, (LPCWSTR)(((resource_id>>4)&0xffff)+1),
|
||||
+ RT_STRINGW );
|
||||
+ if (!hrsrc) return 0;
|
||||
+ hmem = LoadResource( instance, hrsrc );
|
||||
+ if (!hmem) return 0;
|
||||
+
|
||||
+ p = LockResource(hmem);
|
||||
+ string_num = resource_id & 0x000f;
|
||||
+ for (i = 0; i < string_num; i++)
|
||||
+ p += *p + 1;
|
||||
+
|
||||
+ TRACE("strlen = %d\n", (int)*p );
|
||||
+
|
||||
+ if (buffer == NULL) return *p;
|
||||
+ i = min(buflen - 1, *p);
|
||||
+ if (i > 0) {
|
||||
+ memcpy(buffer, p + 1, i * sizeof (WCHAR));
|
||||
+ buffer[i] = (WCHAR) 0;
|
||||
+ } else {
|
||||
+ if (buflen > 1) {
|
||||
+ buffer[0] = (WCHAR) 0;
|
||||
+ return 0;
|
||||
+ }
|
||||
+#if 0
|
||||
+ WARN("Dont know why caller give buflen=%d *p=%d trying to obtain string '%s'\n", buflen, *p, p + 1);
|
||||
+#endif
|
||||
+ }
|
||||
+
|
||||
+ TRACE("String loaded !\n");
|
||||
+ return i;
|
||||
+}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
@@ -303,57 +353,6 @@
|
||||
HeapFree( GetProcessHeap(), 0, wbuf );
|
||||
|
||||
return retval;
|
||||
-}
|
||||
-
|
||||
-/**********************************************************************
|
||||
- * LoadStringW (USER32.376)
|
||||
- */
|
||||
-INT WINAPI LoadStringW( HINSTANCE instance, UINT resource_id,
|
||||
- LPWSTR buffer, INT buflen )
|
||||
-{
|
||||
- HGLOBAL hmem;
|
||||
- HRSRC hrsrc;
|
||||
- WCHAR *p;
|
||||
- int string_num;
|
||||
- int i;
|
||||
-
|
||||
- if (HIWORD(resource_id)==0xFFFF) /* netscape 3 passes this */
|
||||
- resource_id = (UINT)(-((INT)resource_id));
|
||||
- TRACE("instance = %04x, id = %04x, buffer = %08x, "
|
||||
- "length = %d\n", instance, (int)resource_id, (int) buffer, buflen);
|
||||
-
|
||||
- /* Use bits 4 - 19 (incremented by 1) as resourceid, mask out
|
||||
- * 20 - 31. */
|
||||
- hrsrc = FindResourceW( instance, (LPCWSTR)(((resource_id>>4)&0xffff)+1),
|
||||
- RT_STRINGW );
|
||||
- if (!hrsrc) return 0;
|
||||
- hmem = LoadResource( instance, hrsrc );
|
||||
- if (!hmem) return 0;
|
||||
-
|
||||
- p = LockResource(hmem);
|
||||
- string_num = resource_id & 0x000f;
|
||||
- for (i = 0; i < string_num; i++)
|
||||
- p += *p + 1;
|
||||
-
|
||||
- TRACE("strlen = %d\n", (int)*p );
|
||||
-
|
||||
- if (buffer == NULL) return *p;
|
||||
- i = min(buflen - 1, *p);
|
||||
- if (i > 0) {
|
||||
- memcpy(buffer, p + 1, i * sizeof (WCHAR));
|
||||
- buffer[i] = (WCHAR) 0;
|
||||
- } else {
|
||||
- if (buflen > 1) {
|
||||
- buffer[0] = (WCHAR) 0;
|
||||
- return 0;
|
||||
- }
|
||||
-#if 0
|
||||
- WARN("Dont know why caller give buflen=%d *p=%d trying to obtain string '%s'\n", buflen, *p, p + 1);
|
||||
-#endif
|
||||
- }
|
||||
-
|
||||
- TRACE("String loaded !\n");
|
||||
- return i;
|
||||
}
|
||||
|
||||
/* Messages...used by FormatMessage32* (KERNEL32.something)
|
||||
--- lib/videocodec/VideoDecoder.cpp.orig Sat Sep 16 17:11:41 2000
|
||||
+++ lib/videocodec/VideoDecoder.cpp Sat Sep 16 17:16:25 2000
|
||||
@@ -20,7 +20,6 @@
|
||||
#include <fcntl.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/types.h>
|
||||
-#include <malloc.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <strstream>
|
||||
--- lib/avifile/Cache.h.orig Sat Sep 16 17:22:11 2000
|
||||
+++ lib/avifile/Cache.h Sat Sep 16 17:22:14 2000
|
||||
@@ -2,7 +2,7 @@
|
||||
#include <default.h>
|
||||
#define _LARGEFILE64_SOURCE
|
||||
#include <unistd.h>
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <pthread.h>
|
||||
--- lib/avifile/FastReadStream.cpp.orig Sat Sep 16 17:23:45 2000
|
||||
+++ lib/avifile/FastReadStream.cpp Sat Sep 16 17:23:47 2000
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <features.h>
|
||||
#endif
|
||||
#include <unistd.h>
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#define lseek64 lseek
|
||||
--- lib/avifile/AviRead.h.orig Sat Sep 16 17:25:10 2000
|
||||
+++ lib/avifile/AviRead.h Sat Sep 16 17:25:13 2000
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <avifmt.h>
|
||||
#include <default.h>
|
||||
#include <unistd.h>
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <pthread.h>
|
||||
--- lib/avifile/AviWrite.h.orig Sat Sep 16 17:26:35 2000
|
||||
+++ lib/avifile/AviWrite.h Sat Sep 16 17:26:37 2000
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <avifmt.h>
|
||||
#include <default.h>
|
||||
#include <unistd.h>
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <pthread.h>
|
||||
--- samples/benchmark/main.cpp.orig Sat Sep 16 17:28:22 2000
|
||||
+++ samples/benchmark/main.cpp Sat Sep 16 17:28:24 2000
|
||||
@@ -9,7 +9,6 @@
|
||||
#include <config.h>
|
||||
|
||||
#include <stdio.h>
|
||||
-#include <malloc.h>
|
||||
#include <signal.h>
|
||||
#include <iostream.h>
|
||||
#include <unistd.h>
|
||||
--- samples/benchmark/renderer.cpp.orig Sat Sep 16 17:29:28 2000
|
||||
+++ samples/benchmark/renderer.cpp Sat Sep 16 17:29:29 2000
|
||||
@@ -14,7 +14,7 @@
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
#include <pthread.h>
|
||||
#include "renderer.h"
|
||||
#include "RegAccess.h"
|
||||
--- player/renderer.cpp.orig Sat Sep 16 22:31:56 2000
|
||||
+++ player/renderer.cpp Sat Sep 16 22:32:02 2000
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
#include <pthread.h>
|
||||
#include "renderer.h"
|
||||
#include "RegAccess.h"
|
||||
install:
|
||||
- -$(INSTALL_PROGRAM) -d $(datadir)
|
||||
-$(INSTALL_PROGRAM) -d $(includedir)/avifile/wine
|
||||
-$(INSTALL_PROGRAM) -d $(datadir)/avifile
|
||||
- -$(INSTALL_PROGRAM) -d $(libdir)
|
||||
- -$(INSTALL_PROGRAM) -d $(bindir)
|
||||
-$(INSTALL_PROGRAM) ./lib/libaviplay.so $(libdir)
|
||||
-$(INSTALL_PROGRAM) ./include/*.h $(includedir)/avifile
|
||||
-$(INSTALL_PROGRAM) ./include/wine/*.h $(includedir)/avifile/wine
|
||||
ifeq (@USE_QT@,1)
|
||||
- -$(INSTALL_PROGRAM) ./bin/aviplay $(bindir)
|
||||
- -$(INSTALL_PROGRAM) ./bin/benchmark $(bindir)
|
||||
+ -$(INSTALL_PROGRAM) -s ./bin/aviplay $(bindir)
|
||||
+ -$(INSTALL_PROGRAM) -s ./bin/benchmark $(bindir)
|
||||
-$(INSTALL_PROGRAM) ./bin/*.ppm $(datadir)/avifile
|
||||
-$(INSTALL_PROGRAM) ./bin/*.png $(datadir)/avifile
|
||||
ifeq (@USE_VIDCAP@,1)
|
||||
|
@ -1,3 +1,5 @@
|
||||
An MPEG-4 (aka DivX) player built around the Windows binaries,
|
||||
but does not need Wine.
|
||||
There is also a xmps plugin you can build (manually).
|
||||
|
||||
WWW: http://divx.euro.ru/
|
||||
|
@ -7,6 +7,7 @@ include/avifile/aviutil.h
|
||||
include/avifile/config.h
|
||||
include/avifile/default.h
|
||||
include/avifile/except.h
|
||||
include/avifile/image.h
|
||||
include/avifile/loader.h
|
||||
include/avifile/registry.h
|
||||
include/avifile/videodecoder.h
|
||||
@ -40,12 +41,15 @@ include/avifile/wine/winreg.h
|
||||
include/avifile/wine/winuser.h
|
||||
@dirrm include/avifile/wine
|
||||
@dirrm include/avifile
|
||||
bin/avifile-config
|
||||
bin/aviplay
|
||||
bin/benchmark
|
||||
bin/qtrecompress
|
||||
share/avifile/open.ppm
|
||||
share/avifile/pause.ppm
|
||||
share/avifile/play.ppm
|
||||
share/avifile/stop.ppm
|
||||
share/avifile/about.ppm
|
||||
share/avifile/test.png
|
||||
@dirrm share/avifile
|
||||
lib/win32/ativcr2.dll
|
||||
@ -59,8 +63,7 @@ lib/win32/ir41_32.dll
|
||||
lib/win32/ir41_qc.dll
|
||||
lib/win32/ir50_32.dll
|
||||
lib/win32/ir50_qc.dll
|
||||
lib/win32/m3jpeg32.dll
|
||||
lib/win32/mpg4c32.dll
|
||||
@dirrm lib/win32
|
||||
lib/libaviplay.so
|
||||
@exec /sbin/ldconfig -m %D/lib
|
||||
@unexec /sbin/ldconfig -R
|
||||
|
@ -6,33 +6,52 @@
|
||||
#
|
||||
|
||||
PORTNAME= avifile
|
||||
PORTVERSION= 0.47.1
|
||||
PORTVERSION= 0.49
|
||||
CATEGORIES= graphics
|
||||
MASTER_SITES= http://divx.euro.ru/
|
||||
DISTFILES= avifile-${PORTVERSION}${EXTRACT_SUFX} binaries.zip
|
||||
EXTRACT_ONLY= avifile-${PORTVERSION}${EXTRACT_SUFX}
|
||||
MASTER_SITES= http://ernie.eit.uni-kl.de/avifile/ \
|
||||
http://divx.euro.ru/ \
|
||||
http://www.toon.eu.org/divx/
|
||||
DISTFILES= avifile-${PORTVERSION}.tar.gz \
|
||||
binaries-${CODEC_VERSION}.zip
|
||||
EXTRACT_ONLY= avifile-${PORTVERSION}.tar.gz
|
||||
|
||||
MAINTAINER= holger@eit.uni-kl.de
|
||||
|
||||
LIB_DEPENDS= qt2.4:${PORTSDIR}/x11-toolkits/qt22 \
|
||||
SDL-1.1.2:${PORTSDIR}/devel/sdl-devel
|
||||
LIB_DEPENDS= SDL-1.1.2:${PORTSDIR}/devel/sdl-devel
|
||||
BUILD_DEPENDS= unzip:${PORTSDIR}/archivers/unzip
|
||||
|
||||
RESTRICTED= Unsure of codec\'s license
|
||||
RESTRICTED_FILES= binaries-${CODEC_VERSION}.zip
|
||||
|
||||
ONLY_FOR_ARCHS= i386
|
||||
USE_GMAKE= yes
|
||||
USE_QT2= yes
|
||||
USE_XLIB= yes
|
||||
USE_GMAKE= yes
|
||||
INSTALLS_SHLIB= yes
|
||||
|
||||
HAS_CONFIGURE= yes
|
||||
CONFIGURE_ENV= SDL_CONFIG="${SDL_CONFIG}" \
|
||||
MOC="${MOC}"
|
||||
CONFIGURE_ARGS+= --enable-mmx \
|
||||
--with-qt-includes=${X11BASE}/include/qt2 \
|
||||
--with-qt-libraries=${X11BASE}/lib \
|
||||
--with-win32-path=${LOCALBASE}/lib/win32
|
||||
|
||||
CODEC_VERSION= 000918
|
||||
|
||||
SDL_CONFIG?= ${LOCALBASE}/bin/sdl11-config
|
||||
MOC?= ${X11BASE}/bin/moc2
|
||||
|
||||
CONFIGURE_ENV= SDL_CONFIG="${SDL_CONFIG}" \
|
||||
MOC="${MOC}"
|
||||
CONFIGURE_ARGS= --enable-mmx \
|
||||
--with-qt-includes=${X11BASE}/include/qt2 \
|
||||
--with-win32-path=${LOCALBASE}/lib/win32
|
||||
post-extract:
|
||||
@${LOCALBASE}/bin/unzip ${DISTDIR}/binaries-${CODEC_VERSION}.zip \
|
||||
-d ${WRKDIR}/codecs
|
||||
|
||||
#post-build:
|
||||
# (cd ${WRKSRC}/samples && ${SETENV} ${MAKE_ENV} ${GMAKE})
|
||||
|
||||
post-install:
|
||||
@${MKDIR} ${PREFIX}/lib/win32
|
||||
@${INSTALL_DATA} ${WRKDIR}/codecs/* ${PREFIX}/lib/win32
|
||||
@/usr/bin/fmt < ${PKGMESSAGE}
|
||||
|
||||
pre-install:
|
||||
unzip ${DISTDIR}/binaries.zip -d ${LOCALBASE}/lib/win32
|
||||
strip ${WRKSRC}/bin/aviplay ${WRKSRC}/bin/benchmark
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,2 +1,2 @@
|
||||
MD5 (avifile-0.47.1.tar.gz) = edbad85f6c72d61f3a66d99c61620f39
|
||||
MD5 (binaries.zip) = 6df7c0a266ba6e8c022160605791644b
|
||||
MD5 (avifile-0.49.tar.gz) = 96115ac6436b16109ce0c8d65ad3e915
|
||||
MD5 (binaries-000918.zip) = 2b59bf068c7508ad071fa9aca58cd1e7
|
||||
|
@ -1,42 +1,14 @@
|
||||
--- configure.orig Sat Sep 16 11:33:30 2000
|
||||
+++ configure Sat Sep 16 11:43:00 2000
|
||||
@@ -2302,7 +2302,7 @@
|
||||
|
||||
|
||||
USE_QT=1
|
||||
-USE_VIDCAP=1
|
||||
+USE_VIDCAP=0
|
||||
|
||||
# Check whether --enable-qt or --disable-qt was given.
|
||||
if test "${enable_qt+set}" = set; then
|
||||
@@ -2631,7 +2631,7 @@
|
||||
|
||||
CXXFLAGS="$CXXFLAGS -I$qt_incdir"
|
||||
LDFLAGS="-L$qt_libdir $X_LDFLAGS"
|
||||
-LIBS="$LIBS -lqt -lXext -lX11 $LIBSOCKET"
|
||||
+LIBS="$LIBS -lqt2 -lXext -lX11 $LIBSOCKET"
|
||||
|
||||
|
||||
ac_ext=C
|
||||
--- player/Makefile.in.orig Sat Sep 16 11:33:26 2000
|
||||
+++ player/Makefile.in Sat Sep 16 11:43:46 2000
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
|
||||
MOC=@MOC@
|
||||
-LIBS=@LIBS@ -lX11 -lXext -lqt -laviplay @DGA_LDADD@ @SDL_LIBS@
|
||||
+LIBS=@LIBS@ -lX11 -lXext -lqt2 -laviplay @DGA_LDADD@ @SDL_LIBS@
|
||||
LIB_DIRS=-L../lib @QT_LDFLAGS@ -L/usr/X11R6/lib -L/usr/local/lib
|
||||
CDOPT=@CD_OPT@
|
||||
LDOPT=@LD_OPT@
|
||||
--- samples/benchmark/Makefile.in.orig Sat Sep 16 11:33:29 2000
|
||||
+++ samples/benchmark/Makefile.in Sat Sep 16 11:43:27 2000
|
||||
@@ -5,7 +5,7 @@
|
||||
CFLAGS=-I../../include -I/usr/X11R6/include @QT_INCLUDES@ @SDL_CFLAGS@
|
||||
|
||||
|
||||
-LIBS=@LIBS@ -lX11 -lXext -lqt -laviplay @DGA_LDADD@ @SDL_LIBS@
|
||||
+LIBS=@LIBS@ -lX11 -lXext -lqt2 -laviplay @DGA_LDADD@ @SDL_LIBS@
|
||||
LIB_DIRS=@QT_LDFLAGS@ -L/usr/X11R6/lib -L../../lib
|
||||
|
||||
MOC=@MOC@
|
||||
--- lib/avifile/AviWrite.cpp.orig Fri Oct 6 12:58:16 2000
|
||||
+++ lib/avifile/AviWrite.cpp Fri Oct 6 12:59:14 2000
|
||||
@@ -23,7 +23,11 @@
|
||||
try
|
||||
{
|
||||
m_status=0;
|
||||
+#ifdef O_LARGEFILE
|
||||
m_fd=new FileBuffer(name, O_WRONLY | O_CREAT | O_TRUNC | O_LARGEFILE, mask);
|
||||
+#else
|
||||
+ m_fd=new FileBuffer(name, O_WRONLY | O_CREAT | O_TRUNC, mask);
|
||||
+#endif
|
||||
const int junk_size=0x800;
|
||||
char* junk=new char[junk_size];
|
||||
memset(junk, 0, junk_size);
|
||||
|
@ -1,82 +1,11 @@
|
||||
--- lib/avifile/AviWrite.cpp.orig Mon Sep 11 15:40:31 2000
|
||||
+++ lib/avifile/AviWrite.cpp Wed Sep 13 20:52:55 2000
|
||||
@@ -19,7 +19,11 @@
|
||||
try
|
||||
{
|
||||
m_status=0;
|
||||
+#ifdef O_LARGEFILE
|
||||
m_fd=open(name, O_WRONLY | O_CREAT | O_TRUNC | O_LARGEFILE, mask);
|
||||
+#else
|
||||
+ m_fd=open(name, O_WRONLY | O_CREAT | O_TRUNC, mask);
|
||||
+#endif
|
||||
if(m_fd==-1)
|
||||
throw FATAL("Can't open file for writing");
|
||||
--- xmps-avi-plugin/Makefile.in.orig Fri Oct 6 13:05:55 2000
|
||||
+++ xmps-avi-plugin/Makefile.in Fri Oct 6 13:06:22 2000
|
||||
@@ -1,6 +1,6 @@
|
||||
-LIBS = -lstdc++ -L../lib -L@libdir@ -laviplay -lpthread @XMPS_LIBS@
|
||||
+LIBS = -lstdc++ -L../lib -L@libdir@ -laviplay -lpthread @XMPS_LIBS@ @SDL_LIBS@
|
||||
|
||||
@@ -203,7 +207,11 @@
|
||||
}
|
||||
long long AviWriteFile::FileSize()
|
||||
{
|
||||
+#ifdef __Linux__
|
||||
return lseek64(m_fd, 0, SEEK_CUR);
|
||||
+#else
|
||||
+ return lseek(m_fd, 0, SEEK_CUR);
|
||||
+#endif
|
||||
}
|
||||
-INCLUDES = -I. -I../include -I@includedir@/avifile @XMPS_CFLAGS@
|
||||
+INCLUDES = -I. -I../include -I@includedir@/avifile @XMPS_CFLAGS@ @SDL_CFLAGS@
|
||||
|
||||
AviWriteStream::AviWriteStream
|
||||
--- lib/videocodec/Module.h.orig Sat Sep 9 14:24:49 2000
|
||||
+++ lib/videocodec/Module.h Wed Sep 13 20:20:25 2000
|
||||
@@ -4,6 +4,10 @@
|
||||
#include <videoencoder.h>
|
||||
#include <list>
|
||||
#include <string>
|
||||
+#ifdef __FreeBSD__
|
||||
+#include <sys/time.h>
|
||||
+#endif
|
||||
+
|
||||
using namespace std;
|
||||
|
||||
class VideoCodecControl;
|
||||
--- player/renderer.cpp.orig Mon Sep 11 08:38:07 2000
|
||||
+++ player/renderer.cpp Fri Sep 15 20:22:55 2000
|
||||
@@ -11,6 +11,7 @@
|
||||
#ifdef __FreeBSD__
|
||||
#include <machine/param.h>
|
||||
#include <sys/types.h>
|
||||
+#include <unistd.h>
|
||||
#endif
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
--- lib/aviplay/aviutil.cpp.orig Sat Sep 16 13:49:08 2000
|
||||
+++ lib/aviplay/aviutil.cpp Sat Sep 16 13:54:06 2000
|
||||
@@ -28,16 +28,18 @@
|
||||
}
|
||||
CPU_Freq::CPU_Freq()
|
||||
{
|
||||
- FILE *f = fopen ("/proc/cpuinfo", "r");
|
||||
char line[200];
|
||||
char model[200]="unknown";
|
||||
char flags[500]="";
|
||||
char *s,*value;
|
||||
|
||||
+#ifdef __FreeBSD__
|
||||
+ freq=old_freq();
|
||||
+ cerr<<freq/1000.<<" MHz processor detected"<<endl;
|
||||
+#else
|
||||
+ FILE *f = fopen ("/proc/cpuinfo", "r");
|
||||
+
|
||||
freq=-1;
|
||||
-// freq=old_freq();
|
||||
-// cerr<<freq/1000.<<" MHz processor detected"<<endl;
|
||||
-// return;
|
||||
if (!f)
|
||||
{
|
||||
printf("Can't open /proc/cpuinfo for reading\n");
|
||||
@@ -86,6 +88,7 @@
|
||||
}
|
||||
#endif
|
||||
fclose(f);
|
||||
+#endif
|
||||
}
|
||||
|
||||
CPU_Freq freq;
|
||||
all: avi_configure.o avi_codec.o
|
||||
$(CC) -shared avi_configure.o avi_codec.o $(LIBS) -o libavi.so
|
||||
|
@ -1,11 +1,15 @@
|
||||
--- xmps-avi-plugin/Makefile.in.orig Sat Sep 16 14:13:04 2000
|
||||
+++ xmps-avi-plugin/Makefile.in Sat Sep 16 14:20:30 2000
|
||||
@@ -1,6 +1,6 @@
|
||||
-LIBS = -lstdc++ -L../lib -L@libdir@ -laviplay -lpthread @XMPS_LIBS@
|
||||
+LIBS = -lstdc++ -L../lib -L@libdir@ -laviplay -pthread @XMPS_LIBS@
|
||||
--- lib/videocodec/Module.h.orig Fri Oct 6 13:01:34 2000
|
||||
+++ lib/videocodec/Module.h Fri Oct 6 13:02:09 2000
|
||||
@@ -4,6 +4,12 @@
|
||||
#include <videoencoder.h>
|
||||
#include <list>
|
||||
#include <string>
|
||||
+#if (defined(__unix__) || defined(unix)) && !defined(USG)
|
||||
+#include <sys/param.h>
|
||||
+#endif
|
||||
+#if (defined(BSD) && (BSD >= 199103))
|
||||
+#include <sys/time.h>
|
||||
+#endif
|
||||
using namespace std;
|
||||
|
||||
-INCLUDES = -I. -I../include -I@includedir@/avifile @XMPS_CFLAGS@
|
||||
+INCLUDES = -I. -I../include -I@includedir@/avifile @XMPS_CFLAGS@ @SDL_CFLAGS@
|
||||
|
||||
all: avi_configure.o avi_codec.o
|
||||
$(CC) -shared avi_configure.o avi_codec.o $(LIBS) -o libavi.so
|
||||
class VideoCodecControl;
|
||||
|
@ -1,235 +1,22 @@
|
||||
--- lib/loader/ext.c.orig Sat Sep 16 17:02:10 2000
|
||||
+++ lib/loader/ext.c Sat Sep 16 17:02:14 2000
|
||||
@@ -7,7 +7,7 @@
|
||||
********************************************************/
|
||||
#include <config.h>
|
||||
--- Makefile.in.orig Tue Oct 3 08:19:35 2000
|
||||
+++ Makefile.in Fri Oct 6 13:36:01 2000
|
||||
@@ -66,17 +66,14 @@
|
||||
$(INSTALL_PROGRAM) -m0755 ./avifile-config $(bindir)
|
||||
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/mman.h>
|
||||
#include <errno.h>
|
||||
--- lib/loader/win32.c.orig Sat Sep 16 17:03:28 2000
|
||||
+++ lib/loader/win32.c Sat Sep 16 17:03:30 2000
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "win32.h"
|
||||
#include <stdio.h>
|
||||
#include <pthread.h>
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
--- lib/loader/driver.c.orig Sat Sep 16 17:04:30 2000
|
||||
+++ lib/loader/driver.c Sat Sep 16 17:04:32 2000
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <config.h>
|
||||
#include <stdio.h>
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
#include <wine/driver.h>
|
||||
#include <wine/pe_image.h>
|
||||
#include <wine/winreg.h>
|
||||
--- lib/loader/resource.c.orig Sat Sep 16 17:07:41 2000
|
||||
+++ lib/loader/resource.c Sat Sep 16 17:08:00 2000
|
||||
@@ -253,6 +253,56 @@
|
||||
return RES_SizeofResource( hModule, hRsrc );
|
||||
}
|
||||
|
||||
+/**********************************************************************
|
||||
+ * LoadStringW (USER32.376)
|
||||
+ */
|
||||
+INT WINAPI LoadStringW( HINSTANCE instance, UINT resource_id,
|
||||
+ LPWSTR buffer, INT buflen )
|
||||
+{
|
||||
+ HGLOBAL hmem;
|
||||
+ HRSRC hrsrc;
|
||||
+ WCHAR *p;
|
||||
+ int string_num;
|
||||
+ int i;
|
||||
+
|
||||
+ if (HIWORD(resource_id)==0xFFFF) /* netscape 3 passes this */
|
||||
+ resource_id = (UINT)(-((INT)resource_id));
|
||||
+ TRACE("instance = %04x, id = %04x, buffer = %08x, "
|
||||
+ "length = %d\n", instance, (int)resource_id, (int) buffer, buflen);
|
||||
+
|
||||
+ /* Use bits 4 - 19 (incremented by 1) as resourceid, mask out
|
||||
+ * 20 - 31. */
|
||||
+ hrsrc = FindResourceW( instance, (LPCWSTR)(((resource_id>>4)&0xffff)+1),
|
||||
+ RT_STRINGW );
|
||||
+ if (!hrsrc) return 0;
|
||||
+ hmem = LoadResource( instance, hrsrc );
|
||||
+ if (!hmem) return 0;
|
||||
+
|
||||
+ p = LockResource(hmem);
|
||||
+ string_num = resource_id & 0x000f;
|
||||
+ for (i = 0; i < string_num; i++)
|
||||
+ p += *p + 1;
|
||||
+
|
||||
+ TRACE("strlen = %d\n", (int)*p );
|
||||
+
|
||||
+ if (buffer == NULL) return *p;
|
||||
+ i = min(buflen - 1, *p);
|
||||
+ if (i > 0) {
|
||||
+ memcpy(buffer, p + 1, i * sizeof (WCHAR));
|
||||
+ buffer[i] = (WCHAR) 0;
|
||||
+ } else {
|
||||
+ if (buflen > 1) {
|
||||
+ buffer[0] = (WCHAR) 0;
|
||||
+ return 0;
|
||||
+ }
|
||||
+#if 0
|
||||
+ WARN("Dont know why caller give buflen=%d *p=%d trying to obtain string '%s'\n", buflen, *p, p + 1);
|
||||
+#endif
|
||||
+ }
|
||||
+
|
||||
+ TRACE("String loaded !\n");
|
||||
+ return i;
|
||||
+}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
@@ -303,57 +353,6 @@
|
||||
HeapFree( GetProcessHeap(), 0, wbuf );
|
||||
|
||||
return retval;
|
||||
-}
|
||||
-
|
||||
-/**********************************************************************
|
||||
- * LoadStringW (USER32.376)
|
||||
- */
|
||||
-INT WINAPI LoadStringW( HINSTANCE instance, UINT resource_id,
|
||||
- LPWSTR buffer, INT buflen )
|
||||
-{
|
||||
- HGLOBAL hmem;
|
||||
- HRSRC hrsrc;
|
||||
- WCHAR *p;
|
||||
- int string_num;
|
||||
- int i;
|
||||
-
|
||||
- if (HIWORD(resource_id)==0xFFFF) /* netscape 3 passes this */
|
||||
- resource_id = (UINT)(-((INT)resource_id));
|
||||
- TRACE("instance = %04x, id = %04x, buffer = %08x, "
|
||||
- "length = %d\n", instance, (int)resource_id, (int) buffer, buflen);
|
||||
-
|
||||
- /* Use bits 4 - 19 (incremented by 1) as resourceid, mask out
|
||||
- * 20 - 31. */
|
||||
- hrsrc = FindResourceW( instance, (LPCWSTR)(((resource_id>>4)&0xffff)+1),
|
||||
- RT_STRINGW );
|
||||
- if (!hrsrc) return 0;
|
||||
- hmem = LoadResource( instance, hrsrc );
|
||||
- if (!hmem) return 0;
|
||||
-
|
||||
- p = LockResource(hmem);
|
||||
- string_num = resource_id & 0x000f;
|
||||
- for (i = 0; i < string_num; i++)
|
||||
- p += *p + 1;
|
||||
-
|
||||
- TRACE("strlen = %d\n", (int)*p );
|
||||
-
|
||||
- if (buffer == NULL) return *p;
|
||||
- i = min(buflen - 1, *p);
|
||||
- if (i > 0) {
|
||||
- memcpy(buffer, p + 1, i * sizeof (WCHAR));
|
||||
- buffer[i] = (WCHAR) 0;
|
||||
- } else {
|
||||
- if (buflen > 1) {
|
||||
- buffer[0] = (WCHAR) 0;
|
||||
- return 0;
|
||||
- }
|
||||
-#if 0
|
||||
- WARN("Dont know why caller give buflen=%d *p=%d trying to obtain string '%s'\n", buflen, *p, p + 1);
|
||||
-#endif
|
||||
- }
|
||||
-
|
||||
- TRACE("String loaded !\n");
|
||||
- return i;
|
||||
}
|
||||
|
||||
/* Messages...used by FormatMessage32* (KERNEL32.something)
|
||||
--- lib/videocodec/VideoDecoder.cpp.orig Sat Sep 16 17:11:41 2000
|
||||
+++ lib/videocodec/VideoDecoder.cpp Sat Sep 16 17:16:25 2000
|
||||
@@ -20,7 +20,6 @@
|
||||
#include <fcntl.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/types.h>
|
||||
-#include <malloc.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <strstream>
|
||||
--- lib/avifile/Cache.h.orig Sat Sep 16 17:22:11 2000
|
||||
+++ lib/avifile/Cache.h Sat Sep 16 17:22:14 2000
|
||||
@@ -2,7 +2,7 @@
|
||||
#include <default.h>
|
||||
#define _LARGEFILE64_SOURCE
|
||||
#include <unistd.h>
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <pthread.h>
|
||||
--- lib/avifile/FastReadStream.cpp.orig Sat Sep 16 17:23:45 2000
|
||||
+++ lib/avifile/FastReadStream.cpp Sat Sep 16 17:23:47 2000
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <features.h>
|
||||
#endif
|
||||
#include <unistd.h>
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#define lseek64 lseek
|
||||
--- lib/avifile/AviRead.h.orig Sat Sep 16 17:25:10 2000
|
||||
+++ lib/avifile/AviRead.h Sat Sep 16 17:25:13 2000
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <avifmt.h>
|
||||
#include <default.h>
|
||||
#include <unistd.h>
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <pthread.h>
|
||||
--- lib/avifile/AviWrite.h.orig Sat Sep 16 17:26:35 2000
|
||||
+++ lib/avifile/AviWrite.h Sat Sep 16 17:26:37 2000
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <avifmt.h>
|
||||
#include <default.h>
|
||||
#include <unistd.h>
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <pthread.h>
|
||||
--- samples/benchmark/main.cpp.orig Sat Sep 16 17:28:22 2000
|
||||
+++ samples/benchmark/main.cpp Sat Sep 16 17:28:24 2000
|
||||
@@ -9,7 +9,6 @@
|
||||
#include <config.h>
|
||||
|
||||
#include <stdio.h>
|
||||
-#include <malloc.h>
|
||||
#include <signal.h>
|
||||
#include <iostream.h>
|
||||
#include <unistd.h>
|
||||
--- samples/benchmark/renderer.cpp.orig Sat Sep 16 17:29:28 2000
|
||||
+++ samples/benchmark/renderer.cpp Sat Sep 16 17:29:29 2000
|
||||
@@ -14,7 +14,7 @@
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
#include <pthread.h>
|
||||
#include "renderer.h"
|
||||
#include "RegAccess.h"
|
||||
--- player/renderer.cpp.orig Sat Sep 16 22:31:56 2000
|
||||
+++ player/renderer.cpp Sat Sep 16 22:32:02 2000
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
#include <pthread.h>
|
||||
#include "renderer.h"
|
||||
#include "RegAccess.h"
|
||||
install:
|
||||
- -$(INSTALL_PROGRAM) -d $(datadir)
|
||||
-$(INSTALL_PROGRAM) -d $(includedir)/avifile/wine
|
||||
-$(INSTALL_PROGRAM) -d $(datadir)/avifile
|
||||
- -$(INSTALL_PROGRAM) -d $(libdir)
|
||||
- -$(INSTALL_PROGRAM) -d $(bindir)
|
||||
-$(INSTALL_PROGRAM) ./lib/libaviplay.so $(libdir)
|
||||
-$(INSTALL_PROGRAM) ./include/*.h $(includedir)/avifile
|
||||
-$(INSTALL_PROGRAM) ./include/wine/*.h $(includedir)/avifile/wine
|
||||
ifeq (@USE_QT@,1)
|
||||
- -$(INSTALL_PROGRAM) ./bin/aviplay $(bindir)
|
||||
- -$(INSTALL_PROGRAM) ./bin/benchmark $(bindir)
|
||||
+ -$(INSTALL_PROGRAM) -s ./bin/aviplay $(bindir)
|
||||
+ -$(INSTALL_PROGRAM) -s ./bin/benchmark $(bindir)
|
||||
-$(INSTALL_PROGRAM) ./bin/*.ppm $(datadir)/avifile
|
||||
-$(INSTALL_PROGRAM) ./bin/*.png $(datadir)/avifile
|
||||
ifeq (@USE_VIDCAP@,1)
|
||||
|
@ -1,3 +1,5 @@
|
||||
An MPEG-4 (aka DivX) player built around the Windows binaries,
|
||||
but does not need Wine.
|
||||
There is also a xmps plugin you can build (manually).
|
||||
|
||||
WWW: http://divx.euro.ru/
|
||||
|
@ -7,6 +7,7 @@ include/avifile/aviutil.h
|
||||
include/avifile/config.h
|
||||
include/avifile/default.h
|
||||
include/avifile/except.h
|
||||
include/avifile/image.h
|
||||
include/avifile/loader.h
|
||||
include/avifile/registry.h
|
||||
include/avifile/videodecoder.h
|
||||
@ -40,12 +41,15 @@ include/avifile/wine/winreg.h
|
||||
include/avifile/wine/winuser.h
|
||||
@dirrm include/avifile/wine
|
||||
@dirrm include/avifile
|
||||
bin/avifile-config
|
||||
bin/aviplay
|
||||
bin/benchmark
|
||||
bin/qtrecompress
|
||||
share/avifile/open.ppm
|
||||
share/avifile/pause.ppm
|
||||
share/avifile/play.ppm
|
||||
share/avifile/stop.ppm
|
||||
share/avifile/about.ppm
|
||||
share/avifile/test.png
|
||||
@dirrm share/avifile
|
||||
lib/win32/ativcr2.dll
|
||||
@ -59,8 +63,7 @@ lib/win32/ir41_32.dll
|
||||
lib/win32/ir41_qc.dll
|
||||
lib/win32/ir50_32.dll
|
||||
lib/win32/ir50_qc.dll
|
||||
lib/win32/m3jpeg32.dll
|
||||
lib/win32/mpg4c32.dll
|
||||
@dirrm lib/win32
|
||||
lib/libaviplay.so
|
||||
@exec /sbin/ldconfig -m %D/lib
|
||||
@unexec /sbin/ldconfig -R
|
||||
|
@ -6,33 +6,52 @@
|
||||
#
|
||||
|
||||
PORTNAME= avifile
|
||||
PORTVERSION= 0.47.1
|
||||
PORTVERSION= 0.49
|
||||
CATEGORIES= graphics
|
||||
MASTER_SITES= http://divx.euro.ru/
|
||||
DISTFILES= avifile-${PORTVERSION}${EXTRACT_SUFX} binaries.zip
|
||||
EXTRACT_ONLY= avifile-${PORTVERSION}${EXTRACT_SUFX}
|
||||
MASTER_SITES= http://ernie.eit.uni-kl.de/avifile/ \
|
||||
http://divx.euro.ru/ \
|
||||
http://www.toon.eu.org/divx/
|
||||
DISTFILES= avifile-${PORTVERSION}.tar.gz \
|
||||
binaries-${CODEC_VERSION}.zip
|
||||
EXTRACT_ONLY= avifile-${PORTVERSION}.tar.gz
|
||||
|
||||
MAINTAINER= holger@eit.uni-kl.de
|
||||
|
||||
LIB_DEPENDS= qt2.4:${PORTSDIR}/x11-toolkits/qt22 \
|
||||
SDL-1.1.2:${PORTSDIR}/devel/sdl-devel
|
||||
LIB_DEPENDS= SDL-1.1.2:${PORTSDIR}/devel/sdl-devel
|
||||
BUILD_DEPENDS= unzip:${PORTSDIR}/archivers/unzip
|
||||
|
||||
RESTRICTED= Unsure of codec\'s license
|
||||
RESTRICTED_FILES= binaries-${CODEC_VERSION}.zip
|
||||
|
||||
ONLY_FOR_ARCHS= i386
|
||||
USE_GMAKE= yes
|
||||
USE_QT2= yes
|
||||
USE_XLIB= yes
|
||||
USE_GMAKE= yes
|
||||
INSTALLS_SHLIB= yes
|
||||
|
||||
HAS_CONFIGURE= yes
|
||||
CONFIGURE_ENV= SDL_CONFIG="${SDL_CONFIG}" \
|
||||
MOC="${MOC}"
|
||||
CONFIGURE_ARGS+= --enable-mmx \
|
||||
--with-qt-includes=${X11BASE}/include/qt2 \
|
||||
--with-qt-libraries=${X11BASE}/lib \
|
||||
--with-win32-path=${LOCALBASE}/lib/win32
|
||||
|
||||
CODEC_VERSION= 000918
|
||||
|
||||
SDL_CONFIG?= ${LOCALBASE}/bin/sdl11-config
|
||||
MOC?= ${X11BASE}/bin/moc2
|
||||
|
||||
CONFIGURE_ENV= SDL_CONFIG="${SDL_CONFIG}" \
|
||||
MOC="${MOC}"
|
||||
CONFIGURE_ARGS= --enable-mmx \
|
||||
--with-qt-includes=${X11BASE}/include/qt2 \
|
||||
--with-win32-path=${LOCALBASE}/lib/win32
|
||||
post-extract:
|
||||
@${LOCALBASE}/bin/unzip ${DISTDIR}/binaries-${CODEC_VERSION}.zip \
|
||||
-d ${WRKDIR}/codecs
|
||||
|
||||
#post-build:
|
||||
# (cd ${WRKSRC}/samples && ${SETENV} ${MAKE_ENV} ${GMAKE})
|
||||
|
||||
post-install:
|
||||
@${MKDIR} ${PREFIX}/lib/win32
|
||||
@${INSTALL_DATA} ${WRKDIR}/codecs/* ${PREFIX}/lib/win32
|
||||
@/usr/bin/fmt < ${PKGMESSAGE}
|
||||
|
||||
pre-install:
|
||||
unzip ${DISTDIR}/binaries.zip -d ${LOCALBASE}/lib/win32
|
||||
strip ${WRKSRC}/bin/aviplay ${WRKSRC}/bin/benchmark
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,2 +1,2 @@
|
||||
MD5 (avifile-0.47.1.tar.gz) = edbad85f6c72d61f3a66d99c61620f39
|
||||
MD5 (binaries.zip) = 6df7c0a266ba6e8c022160605791644b
|
||||
MD5 (avifile-0.49.tar.gz) = 96115ac6436b16109ce0c8d65ad3e915
|
||||
MD5 (binaries-000918.zip) = 2b59bf068c7508ad071fa9aca58cd1e7
|
||||
|
@ -1,42 +1,14 @@
|
||||
--- configure.orig Sat Sep 16 11:33:30 2000
|
||||
+++ configure Sat Sep 16 11:43:00 2000
|
||||
@@ -2302,7 +2302,7 @@
|
||||
|
||||
|
||||
USE_QT=1
|
||||
-USE_VIDCAP=1
|
||||
+USE_VIDCAP=0
|
||||
|
||||
# Check whether --enable-qt or --disable-qt was given.
|
||||
if test "${enable_qt+set}" = set; then
|
||||
@@ -2631,7 +2631,7 @@
|
||||
|
||||
CXXFLAGS="$CXXFLAGS -I$qt_incdir"
|
||||
LDFLAGS="-L$qt_libdir $X_LDFLAGS"
|
||||
-LIBS="$LIBS -lqt -lXext -lX11 $LIBSOCKET"
|
||||
+LIBS="$LIBS -lqt2 -lXext -lX11 $LIBSOCKET"
|
||||
|
||||
|
||||
ac_ext=C
|
||||
--- player/Makefile.in.orig Sat Sep 16 11:33:26 2000
|
||||
+++ player/Makefile.in Sat Sep 16 11:43:46 2000
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
|
||||
MOC=@MOC@
|
||||
-LIBS=@LIBS@ -lX11 -lXext -lqt -laviplay @DGA_LDADD@ @SDL_LIBS@
|
||||
+LIBS=@LIBS@ -lX11 -lXext -lqt2 -laviplay @DGA_LDADD@ @SDL_LIBS@
|
||||
LIB_DIRS=-L../lib @QT_LDFLAGS@ -L/usr/X11R6/lib -L/usr/local/lib
|
||||
CDOPT=@CD_OPT@
|
||||
LDOPT=@LD_OPT@
|
||||
--- samples/benchmark/Makefile.in.orig Sat Sep 16 11:33:29 2000
|
||||
+++ samples/benchmark/Makefile.in Sat Sep 16 11:43:27 2000
|
||||
@@ -5,7 +5,7 @@
|
||||
CFLAGS=-I../../include -I/usr/X11R6/include @QT_INCLUDES@ @SDL_CFLAGS@
|
||||
|
||||
|
||||
-LIBS=@LIBS@ -lX11 -lXext -lqt -laviplay @DGA_LDADD@ @SDL_LIBS@
|
||||
+LIBS=@LIBS@ -lX11 -lXext -lqt2 -laviplay @DGA_LDADD@ @SDL_LIBS@
|
||||
LIB_DIRS=@QT_LDFLAGS@ -L/usr/X11R6/lib -L../../lib
|
||||
|
||||
MOC=@MOC@
|
||||
--- lib/avifile/AviWrite.cpp.orig Fri Oct 6 12:58:16 2000
|
||||
+++ lib/avifile/AviWrite.cpp Fri Oct 6 12:59:14 2000
|
||||
@@ -23,7 +23,11 @@
|
||||
try
|
||||
{
|
||||
m_status=0;
|
||||
+#ifdef O_LARGEFILE
|
||||
m_fd=new FileBuffer(name, O_WRONLY | O_CREAT | O_TRUNC | O_LARGEFILE, mask);
|
||||
+#else
|
||||
+ m_fd=new FileBuffer(name, O_WRONLY | O_CREAT | O_TRUNC, mask);
|
||||
+#endif
|
||||
const int junk_size=0x800;
|
||||
char* junk=new char[junk_size];
|
||||
memset(junk, 0, junk_size);
|
||||
|
@ -1,82 +1,11 @@
|
||||
--- lib/avifile/AviWrite.cpp.orig Mon Sep 11 15:40:31 2000
|
||||
+++ lib/avifile/AviWrite.cpp Wed Sep 13 20:52:55 2000
|
||||
@@ -19,7 +19,11 @@
|
||||
try
|
||||
{
|
||||
m_status=0;
|
||||
+#ifdef O_LARGEFILE
|
||||
m_fd=open(name, O_WRONLY | O_CREAT | O_TRUNC | O_LARGEFILE, mask);
|
||||
+#else
|
||||
+ m_fd=open(name, O_WRONLY | O_CREAT | O_TRUNC, mask);
|
||||
+#endif
|
||||
if(m_fd==-1)
|
||||
throw FATAL("Can't open file for writing");
|
||||
--- xmps-avi-plugin/Makefile.in.orig Fri Oct 6 13:05:55 2000
|
||||
+++ xmps-avi-plugin/Makefile.in Fri Oct 6 13:06:22 2000
|
||||
@@ -1,6 +1,6 @@
|
||||
-LIBS = -lstdc++ -L../lib -L@libdir@ -laviplay -lpthread @XMPS_LIBS@
|
||||
+LIBS = -lstdc++ -L../lib -L@libdir@ -laviplay -lpthread @XMPS_LIBS@ @SDL_LIBS@
|
||||
|
||||
@@ -203,7 +207,11 @@
|
||||
}
|
||||
long long AviWriteFile::FileSize()
|
||||
{
|
||||
+#ifdef __Linux__
|
||||
return lseek64(m_fd, 0, SEEK_CUR);
|
||||
+#else
|
||||
+ return lseek(m_fd, 0, SEEK_CUR);
|
||||
+#endif
|
||||
}
|
||||
-INCLUDES = -I. -I../include -I@includedir@/avifile @XMPS_CFLAGS@
|
||||
+INCLUDES = -I. -I../include -I@includedir@/avifile @XMPS_CFLAGS@ @SDL_CFLAGS@
|
||||
|
||||
AviWriteStream::AviWriteStream
|
||||
--- lib/videocodec/Module.h.orig Sat Sep 9 14:24:49 2000
|
||||
+++ lib/videocodec/Module.h Wed Sep 13 20:20:25 2000
|
||||
@@ -4,6 +4,10 @@
|
||||
#include <videoencoder.h>
|
||||
#include <list>
|
||||
#include <string>
|
||||
+#ifdef __FreeBSD__
|
||||
+#include <sys/time.h>
|
||||
+#endif
|
||||
+
|
||||
using namespace std;
|
||||
|
||||
class VideoCodecControl;
|
||||
--- player/renderer.cpp.orig Mon Sep 11 08:38:07 2000
|
||||
+++ player/renderer.cpp Fri Sep 15 20:22:55 2000
|
||||
@@ -11,6 +11,7 @@
|
||||
#ifdef __FreeBSD__
|
||||
#include <machine/param.h>
|
||||
#include <sys/types.h>
|
||||
+#include <unistd.h>
|
||||
#endif
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
--- lib/aviplay/aviutil.cpp.orig Sat Sep 16 13:49:08 2000
|
||||
+++ lib/aviplay/aviutil.cpp Sat Sep 16 13:54:06 2000
|
||||
@@ -28,16 +28,18 @@
|
||||
}
|
||||
CPU_Freq::CPU_Freq()
|
||||
{
|
||||
- FILE *f = fopen ("/proc/cpuinfo", "r");
|
||||
char line[200];
|
||||
char model[200]="unknown";
|
||||
char flags[500]="";
|
||||
char *s,*value;
|
||||
|
||||
+#ifdef __FreeBSD__
|
||||
+ freq=old_freq();
|
||||
+ cerr<<freq/1000.<<" MHz processor detected"<<endl;
|
||||
+#else
|
||||
+ FILE *f = fopen ("/proc/cpuinfo", "r");
|
||||
+
|
||||
freq=-1;
|
||||
-// freq=old_freq();
|
||||
-// cerr<<freq/1000.<<" MHz processor detected"<<endl;
|
||||
-// return;
|
||||
if (!f)
|
||||
{
|
||||
printf("Can't open /proc/cpuinfo for reading\n");
|
||||
@@ -86,6 +88,7 @@
|
||||
}
|
||||
#endif
|
||||
fclose(f);
|
||||
+#endif
|
||||
}
|
||||
|
||||
CPU_Freq freq;
|
||||
all: avi_configure.o avi_codec.o
|
||||
$(CC) -shared avi_configure.o avi_codec.o $(LIBS) -o libavi.so
|
||||
|
@ -1,11 +1,15 @@
|
||||
--- xmps-avi-plugin/Makefile.in.orig Sat Sep 16 14:13:04 2000
|
||||
+++ xmps-avi-plugin/Makefile.in Sat Sep 16 14:20:30 2000
|
||||
@@ -1,6 +1,6 @@
|
||||
-LIBS = -lstdc++ -L../lib -L@libdir@ -laviplay -lpthread @XMPS_LIBS@
|
||||
+LIBS = -lstdc++ -L../lib -L@libdir@ -laviplay -pthread @XMPS_LIBS@
|
||||
--- lib/videocodec/Module.h.orig Fri Oct 6 13:01:34 2000
|
||||
+++ lib/videocodec/Module.h Fri Oct 6 13:02:09 2000
|
||||
@@ -4,6 +4,12 @@
|
||||
#include <videoencoder.h>
|
||||
#include <list>
|
||||
#include <string>
|
||||
+#if (defined(__unix__) || defined(unix)) && !defined(USG)
|
||||
+#include <sys/param.h>
|
||||
+#endif
|
||||
+#if (defined(BSD) && (BSD >= 199103))
|
||||
+#include <sys/time.h>
|
||||
+#endif
|
||||
using namespace std;
|
||||
|
||||
-INCLUDES = -I. -I../include -I@includedir@/avifile @XMPS_CFLAGS@
|
||||
+INCLUDES = -I. -I../include -I@includedir@/avifile @XMPS_CFLAGS@ @SDL_CFLAGS@
|
||||
|
||||
all: avi_configure.o avi_codec.o
|
||||
$(CC) -shared avi_configure.o avi_codec.o $(LIBS) -o libavi.so
|
||||
class VideoCodecControl;
|
||||
|
@ -1,235 +1,22 @@
|
||||
--- lib/loader/ext.c.orig Sat Sep 16 17:02:10 2000
|
||||
+++ lib/loader/ext.c Sat Sep 16 17:02:14 2000
|
||||
@@ -7,7 +7,7 @@
|
||||
********************************************************/
|
||||
#include <config.h>
|
||||
--- Makefile.in.orig Tue Oct 3 08:19:35 2000
|
||||
+++ Makefile.in Fri Oct 6 13:36:01 2000
|
||||
@@ -66,17 +66,14 @@
|
||||
$(INSTALL_PROGRAM) -m0755 ./avifile-config $(bindir)
|
||||
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/mman.h>
|
||||
#include <errno.h>
|
||||
--- lib/loader/win32.c.orig Sat Sep 16 17:03:28 2000
|
||||
+++ lib/loader/win32.c Sat Sep 16 17:03:30 2000
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "win32.h"
|
||||
#include <stdio.h>
|
||||
#include <pthread.h>
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
--- lib/loader/driver.c.orig Sat Sep 16 17:04:30 2000
|
||||
+++ lib/loader/driver.c Sat Sep 16 17:04:32 2000
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <config.h>
|
||||
#include <stdio.h>
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
#include <wine/driver.h>
|
||||
#include <wine/pe_image.h>
|
||||
#include <wine/winreg.h>
|
||||
--- lib/loader/resource.c.orig Sat Sep 16 17:07:41 2000
|
||||
+++ lib/loader/resource.c Sat Sep 16 17:08:00 2000
|
||||
@@ -253,6 +253,56 @@
|
||||
return RES_SizeofResource( hModule, hRsrc );
|
||||
}
|
||||
|
||||
+/**********************************************************************
|
||||
+ * LoadStringW (USER32.376)
|
||||
+ */
|
||||
+INT WINAPI LoadStringW( HINSTANCE instance, UINT resource_id,
|
||||
+ LPWSTR buffer, INT buflen )
|
||||
+{
|
||||
+ HGLOBAL hmem;
|
||||
+ HRSRC hrsrc;
|
||||
+ WCHAR *p;
|
||||
+ int string_num;
|
||||
+ int i;
|
||||
+
|
||||
+ if (HIWORD(resource_id)==0xFFFF) /* netscape 3 passes this */
|
||||
+ resource_id = (UINT)(-((INT)resource_id));
|
||||
+ TRACE("instance = %04x, id = %04x, buffer = %08x, "
|
||||
+ "length = %d\n", instance, (int)resource_id, (int) buffer, buflen);
|
||||
+
|
||||
+ /* Use bits 4 - 19 (incremented by 1) as resourceid, mask out
|
||||
+ * 20 - 31. */
|
||||
+ hrsrc = FindResourceW( instance, (LPCWSTR)(((resource_id>>4)&0xffff)+1),
|
||||
+ RT_STRINGW );
|
||||
+ if (!hrsrc) return 0;
|
||||
+ hmem = LoadResource( instance, hrsrc );
|
||||
+ if (!hmem) return 0;
|
||||
+
|
||||
+ p = LockResource(hmem);
|
||||
+ string_num = resource_id & 0x000f;
|
||||
+ for (i = 0; i < string_num; i++)
|
||||
+ p += *p + 1;
|
||||
+
|
||||
+ TRACE("strlen = %d\n", (int)*p );
|
||||
+
|
||||
+ if (buffer == NULL) return *p;
|
||||
+ i = min(buflen - 1, *p);
|
||||
+ if (i > 0) {
|
||||
+ memcpy(buffer, p + 1, i * sizeof (WCHAR));
|
||||
+ buffer[i] = (WCHAR) 0;
|
||||
+ } else {
|
||||
+ if (buflen > 1) {
|
||||
+ buffer[0] = (WCHAR) 0;
|
||||
+ return 0;
|
||||
+ }
|
||||
+#if 0
|
||||
+ WARN("Dont know why caller give buflen=%d *p=%d trying to obtain string '%s'\n", buflen, *p, p + 1);
|
||||
+#endif
|
||||
+ }
|
||||
+
|
||||
+ TRACE("String loaded !\n");
|
||||
+ return i;
|
||||
+}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
@@ -303,57 +353,6 @@
|
||||
HeapFree( GetProcessHeap(), 0, wbuf );
|
||||
|
||||
return retval;
|
||||
-}
|
||||
-
|
||||
-/**********************************************************************
|
||||
- * LoadStringW (USER32.376)
|
||||
- */
|
||||
-INT WINAPI LoadStringW( HINSTANCE instance, UINT resource_id,
|
||||
- LPWSTR buffer, INT buflen )
|
||||
-{
|
||||
- HGLOBAL hmem;
|
||||
- HRSRC hrsrc;
|
||||
- WCHAR *p;
|
||||
- int string_num;
|
||||
- int i;
|
||||
-
|
||||
- if (HIWORD(resource_id)==0xFFFF) /* netscape 3 passes this */
|
||||
- resource_id = (UINT)(-((INT)resource_id));
|
||||
- TRACE("instance = %04x, id = %04x, buffer = %08x, "
|
||||
- "length = %d\n", instance, (int)resource_id, (int) buffer, buflen);
|
||||
-
|
||||
- /* Use bits 4 - 19 (incremented by 1) as resourceid, mask out
|
||||
- * 20 - 31. */
|
||||
- hrsrc = FindResourceW( instance, (LPCWSTR)(((resource_id>>4)&0xffff)+1),
|
||||
- RT_STRINGW );
|
||||
- if (!hrsrc) return 0;
|
||||
- hmem = LoadResource( instance, hrsrc );
|
||||
- if (!hmem) return 0;
|
||||
-
|
||||
- p = LockResource(hmem);
|
||||
- string_num = resource_id & 0x000f;
|
||||
- for (i = 0; i < string_num; i++)
|
||||
- p += *p + 1;
|
||||
-
|
||||
- TRACE("strlen = %d\n", (int)*p );
|
||||
-
|
||||
- if (buffer == NULL) return *p;
|
||||
- i = min(buflen - 1, *p);
|
||||
- if (i > 0) {
|
||||
- memcpy(buffer, p + 1, i * sizeof (WCHAR));
|
||||
- buffer[i] = (WCHAR) 0;
|
||||
- } else {
|
||||
- if (buflen > 1) {
|
||||
- buffer[0] = (WCHAR) 0;
|
||||
- return 0;
|
||||
- }
|
||||
-#if 0
|
||||
- WARN("Dont know why caller give buflen=%d *p=%d trying to obtain string '%s'\n", buflen, *p, p + 1);
|
||||
-#endif
|
||||
- }
|
||||
-
|
||||
- TRACE("String loaded !\n");
|
||||
- return i;
|
||||
}
|
||||
|
||||
/* Messages...used by FormatMessage32* (KERNEL32.something)
|
||||
--- lib/videocodec/VideoDecoder.cpp.orig Sat Sep 16 17:11:41 2000
|
||||
+++ lib/videocodec/VideoDecoder.cpp Sat Sep 16 17:16:25 2000
|
||||
@@ -20,7 +20,6 @@
|
||||
#include <fcntl.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/types.h>
|
||||
-#include <malloc.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <strstream>
|
||||
--- lib/avifile/Cache.h.orig Sat Sep 16 17:22:11 2000
|
||||
+++ lib/avifile/Cache.h Sat Sep 16 17:22:14 2000
|
||||
@@ -2,7 +2,7 @@
|
||||
#include <default.h>
|
||||
#define _LARGEFILE64_SOURCE
|
||||
#include <unistd.h>
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <pthread.h>
|
||||
--- lib/avifile/FastReadStream.cpp.orig Sat Sep 16 17:23:45 2000
|
||||
+++ lib/avifile/FastReadStream.cpp Sat Sep 16 17:23:47 2000
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <features.h>
|
||||
#endif
|
||||
#include <unistd.h>
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#define lseek64 lseek
|
||||
--- lib/avifile/AviRead.h.orig Sat Sep 16 17:25:10 2000
|
||||
+++ lib/avifile/AviRead.h Sat Sep 16 17:25:13 2000
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <avifmt.h>
|
||||
#include <default.h>
|
||||
#include <unistd.h>
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <pthread.h>
|
||||
--- lib/avifile/AviWrite.h.orig Sat Sep 16 17:26:35 2000
|
||||
+++ lib/avifile/AviWrite.h Sat Sep 16 17:26:37 2000
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <avifmt.h>
|
||||
#include <default.h>
|
||||
#include <unistd.h>
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <pthread.h>
|
||||
--- samples/benchmark/main.cpp.orig Sat Sep 16 17:28:22 2000
|
||||
+++ samples/benchmark/main.cpp Sat Sep 16 17:28:24 2000
|
||||
@@ -9,7 +9,6 @@
|
||||
#include <config.h>
|
||||
|
||||
#include <stdio.h>
|
||||
-#include <malloc.h>
|
||||
#include <signal.h>
|
||||
#include <iostream.h>
|
||||
#include <unistd.h>
|
||||
--- samples/benchmark/renderer.cpp.orig Sat Sep 16 17:29:28 2000
|
||||
+++ samples/benchmark/renderer.cpp Sat Sep 16 17:29:29 2000
|
||||
@@ -14,7 +14,7 @@
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
#include <pthread.h>
|
||||
#include "renderer.h"
|
||||
#include "RegAccess.h"
|
||||
--- player/renderer.cpp.orig Sat Sep 16 22:31:56 2000
|
||||
+++ player/renderer.cpp Sat Sep 16 22:32:02 2000
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
#include <pthread.h>
|
||||
#include "renderer.h"
|
||||
#include "RegAccess.h"
|
||||
install:
|
||||
- -$(INSTALL_PROGRAM) -d $(datadir)
|
||||
-$(INSTALL_PROGRAM) -d $(includedir)/avifile/wine
|
||||
-$(INSTALL_PROGRAM) -d $(datadir)/avifile
|
||||
- -$(INSTALL_PROGRAM) -d $(libdir)
|
||||
- -$(INSTALL_PROGRAM) -d $(bindir)
|
||||
-$(INSTALL_PROGRAM) ./lib/libaviplay.so $(libdir)
|
||||
-$(INSTALL_PROGRAM) ./include/*.h $(includedir)/avifile
|
||||
-$(INSTALL_PROGRAM) ./include/wine/*.h $(includedir)/avifile/wine
|
||||
ifeq (@USE_QT@,1)
|
||||
- -$(INSTALL_PROGRAM) ./bin/aviplay $(bindir)
|
||||
- -$(INSTALL_PROGRAM) ./bin/benchmark $(bindir)
|
||||
+ -$(INSTALL_PROGRAM) -s ./bin/aviplay $(bindir)
|
||||
+ -$(INSTALL_PROGRAM) -s ./bin/benchmark $(bindir)
|
||||
-$(INSTALL_PROGRAM) ./bin/*.ppm $(datadir)/avifile
|
||||
-$(INSTALL_PROGRAM) ./bin/*.png $(datadir)/avifile
|
||||
ifeq (@USE_VIDCAP@,1)
|
||||
|
@ -1,3 +1,5 @@
|
||||
An MPEG-4 (aka DivX) player built around the Windows binaries,
|
||||
but does not need Wine.
|
||||
There is also a xmps plugin you can build (manually).
|
||||
|
||||
WWW: http://divx.euro.ru/
|
||||
|
@ -7,6 +7,7 @@ include/avifile/aviutil.h
|
||||
include/avifile/config.h
|
||||
include/avifile/default.h
|
||||
include/avifile/except.h
|
||||
include/avifile/image.h
|
||||
include/avifile/loader.h
|
||||
include/avifile/registry.h
|
||||
include/avifile/videodecoder.h
|
||||
@ -40,12 +41,15 @@ include/avifile/wine/winreg.h
|
||||
include/avifile/wine/winuser.h
|
||||
@dirrm include/avifile/wine
|
||||
@dirrm include/avifile
|
||||
bin/avifile-config
|
||||
bin/aviplay
|
||||
bin/benchmark
|
||||
bin/qtrecompress
|
||||
share/avifile/open.ppm
|
||||
share/avifile/pause.ppm
|
||||
share/avifile/play.ppm
|
||||
share/avifile/stop.ppm
|
||||
share/avifile/about.ppm
|
||||
share/avifile/test.png
|
||||
@dirrm share/avifile
|
||||
lib/win32/ativcr2.dll
|
||||
@ -59,8 +63,7 @@ lib/win32/ir41_32.dll
|
||||
lib/win32/ir41_qc.dll
|
||||
lib/win32/ir50_32.dll
|
||||
lib/win32/ir50_qc.dll
|
||||
lib/win32/m3jpeg32.dll
|
||||
lib/win32/mpg4c32.dll
|
||||
@dirrm lib/win32
|
||||
lib/libaviplay.so
|
||||
@exec /sbin/ldconfig -m %D/lib
|
||||
@unexec /sbin/ldconfig -R
|
||||
|
@ -6,33 +6,52 @@
|
||||
#
|
||||
|
||||
PORTNAME= avifile
|
||||
PORTVERSION= 0.47.1
|
||||
PORTVERSION= 0.49
|
||||
CATEGORIES= graphics
|
||||
MASTER_SITES= http://divx.euro.ru/
|
||||
DISTFILES= avifile-${PORTVERSION}${EXTRACT_SUFX} binaries.zip
|
||||
EXTRACT_ONLY= avifile-${PORTVERSION}${EXTRACT_SUFX}
|
||||
MASTER_SITES= http://ernie.eit.uni-kl.de/avifile/ \
|
||||
http://divx.euro.ru/ \
|
||||
http://www.toon.eu.org/divx/
|
||||
DISTFILES= avifile-${PORTVERSION}.tar.gz \
|
||||
binaries-${CODEC_VERSION}.zip
|
||||
EXTRACT_ONLY= avifile-${PORTVERSION}.tar.gz
|
||||
|
||||
MAINTAINER= holger@eit.uni-kl.de
|
||||
|
||||
LIB_DEPENDS= qt2.4:${PORTSDIR}/x11-toolkits/qt22 \
|
||||
SDL-1.1.2:${PORTSDIR}/devel/sdl-devel
|
||||
LIB_DEPENDS= SDL-1.1.2:${PORTSDIR}/devel/sdl-devel
|
||||
BUILD_DEPENDS= unzip:${PORTSDIR}/archivers/unzip
|
||||
|
||||
RESTRICTED= Unsure of codec\'s license
|
||||
RESTRICTED_FILES= binaries-${CODEC_VERSION}.zip
|
||||
|
||||
ONLY_FOR_ARCHS= i386
|
||||
USE_GMAKE= yes
|
||||
USE_QT2= yes
|
||||
USE_XLIB= yes
|
||||
USE_GMAKE= yes
|
||||
INSTALLS_SHLIB= yes
|
||||
|
||||
HAS_CONFIGURE= yes
|
||||
CONFIGURE_ENV= SDL_CONFIG="${SDL_CONFIG}" \
|
||||
MOC="${MOC}"
|
||||
CONFIGURE_ARGS+= --enable-mmx \
|
||||
--with-qt-includes=${X11BASE}/include/qt2 \
|
||||
--with-qt-libraries=${X11BASE}/lib \
|
||||
--with-win32-path=${LOCALBASE}/lib/win32
|
||||
|
||||
CODEC_VERSION= 000918
|
||||
|
||||
SDL_CONFIG?= ${LOCALBASE}/bin/sdl11-config
|
||||
MOC?= ${X11BASE}/bin/moc2
|
||||
|
||||
CONFIGURE_ENV= SDL_CONFIG="${SDL_CONFIG}" \
|
||||
MOC="${MOC}"
|
||||
CONFIGURE_ARGS= --enable-mmx \
|
||||
--with-qt-includes=${X11BASE}/include/qt2 \
|
||||
--with-win32-path=${LOCALBASE}/lib/win32
|
||||
post-extract:
|
||||
@${LOCALBASE}/bin/unzip ${DISTDIR}/binaries-${CODEC_VERSION}.zip \
|
||||
-d ${WRKDIR}/codecs
|
||||
|
||||
#post-build:
|
||||
# (cd ${WRKSRC}/samples && ${SETENV} ${MAKE_ENV} ${GMAKE})
|
||||
|
||||
post-install:
|
||||
@${MKDIR} ${PREFIX}/lib/win32
|
||||
@${INSTALL_DATA} ${WRKDIR}/codecs/* ${PREFIX}/lib/win32
|
||||
@/usr/bin/fmt < ${PKGMESSAGE}
|
||||
|
||||
pre-install:
|
||||
unzip ${DISTDIR}/binaries.zip -d ${LOCALBASE}/lib/win32
|
||||
strip ${WRKSRC}/bin/aviplay ${WRKSRC}/bin/benchmark
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,2 +1,2 @@
|
||||
MD5 (avifile-0.47.1.tar.gz) = edbad85f6c72d61f3a66d99c61620f39
|
||||
MD5 (binaries.zip) = 6df7c0a266ba6e8c022160605791644b
|
||||
MD5 (avifile-0.49.tar.gz) = 96115ac6436b16109ce0c8d65ad3e915
|
||||
MD5 (binaries-000918.zip) = 2b59bf068c7508ad071fa9aca58cd1e7
|
||||
|
@ -1,42 +1,14 @@
|
||||
--- configure.orig Sat Sep 16 11:33:30 2000
|
||||
+++ configure Sat Sep 16 11:43:00 2000
|
||||
@@ -2302,7 +2302,7 @@
|
||||
|
||||
|
||||
USE_QT=1
|
||||
-USE_VIDCAP=1
|
||||
+USE_VIDCAP=0
|
||||
|
||||
# Check whether --enable-qt or --disable-qt was given.
|
||||
if test "${enable_qt+set}" = set; then
|
||||
@@ -2631,7 +2631,7 @@
|
||||
|
||||
CXXFLAGS="$CXXFLAGS -I$qt_incdir"
|
||||
LDFLAGS="-L$qt_libdir $X_LDFLAGS"
|
||||
-LIBS="$LIBS -lqt -lXext -lX11 $LIBSOCKET"
|
||||
+LIBS="$LIBS -lqt2 -lXext -lX11 $LIBSOCKET"
|
||||
|
||||
|
||||
ac_ext=C
|
||||
--- player/Makefile.in.orig Sat Sep 16 11:33:26 2000
|
||||
+++ player/Makefile.in Sat Sep 16 11:43:46 2000
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
|
||||
MOC=@MOC@
|
||||
-LIBS=@LIBS@ -lX11 -lXext -lqt -laviplay @DGA_LDADD@ @SDL_LIBS@
|
||||
+LIBS=@LIBS@ -lX11 -lXext -lqt2 -laviplay @DGA_LDADD@ @SDL_LIBS@
|
||||
LIB_DIRS=-L../lib @QT_LDFLAGS@ -L/usr/X11R6/lib -L/usr/local/lib
|
||||
CDOPT=@CD_OPT@
|
||||
LDOPT=@LD_OPT@
|
||||
--- samples/benchmark/Makefile.in.orig Sat Sep 16 11:33:29 2000
|
||||
+++ samples/benchmark/Makefile.in Sat Sep 16 11:43:27 2000
|
||||
@@ -5,7 +5,7 @@
|
||||
CFLAGS=-I../../include -I/usr/X11R6/include @QT_INCLUDES@ @SDL_CFLAGS@
|
||||
|
||||
|
||||
-LIBS=@LIBS@ -lX11 -lXext -lqt -laviplay @DGA_LDADD@ @SDL_LIBS@
|
||||
+LIBS=@LIBS@ -lX11 -lXext -lqt2 -laviplay @DGA_LDADD@ @SDL_LIBS@
|
||||
LIB_DIRS=@QT_LDFLAGS@ -L/usr/X11R6/lib -L../../lib
|
||||
|
||||
MOC=@MOC@
|
||||
--- lib/avifile/AviWrite.cpp.orig Fri Oct 6 12:58:16 2000
|
||||
+++ lib/avifile/AviWrite.cpp Fri Oct 6 12:59:14 2000
|
||||
@@ -23,7 +23,11 @@
|
||||
try
|
||||
{
|
||||
m_status=0;
|
||||
+#ifdef O_LARGEFILE
|
||||
m_fd=new FileBuffer(name, O_WRONLY | O_CREAT | O_TRUNC | O_LARGEFILE, mask);
|
||||
+#else
|
||||
+ m_fd=new FileBuffer(name, O_WRONLY | O_CREAT | O_TRUNC, mask);
|
||||
+#endif
|
||||
const int junk_size=0x800;
|
||||
char* junk=new char[junk_size];
|
||||
memset(junk, 0, junk_size);
|
||||
|
@ -1,82 +1,11 @@
|
||||
--- lib/avifile/AviWrite.cpp.orig Mon Sep 11 15:40:31 2000
|
||||
+++ lib/avifile/AviWrite.cpp Wed Sep 13 20:52:55 2000
|
||||
@@ -19,7 +19,11 @@
|
||||
try
|
||||
{
|
||||
m_status=0;
|
||||
+#ifdef O_LARGEFILE
|
||||
m_fd=open(name, O_WRONLY | O_CREAT | O_TRUNC | O_LARGEFILE, mask);
|
||||
+#else
|
||||
+ m_fd=open(name, O_WRONLY | O_CREAT | O_TRUNC, mask);
|
||||
+#endif
|
||||
if(m_fd==-1)
|
||||
throw FATAL("Can't open file for writing");
|
||||
--- xmps-avi-plugin/Makefile.in.orig Fri Oct 6 13:05:55 2000
|
||||
+++ xmps-avi-plugin/Makefile.in Fri Oct 6 13:06:22 2000
|
||||
@@ -1,6 +1,6 @@
|
||||
-LIBS = -lstdc++ -L../lib -L@libdir@ -laviplay -lpthread @XMPS_LIBS@
|
||||
+LIBS = -lstdc++ -L../lib -L@libdir@ -laviplay -lpthread @XMPS_LIBS@ @SDL_LIBS@
|
||||
|
||||
@@ -203,7 +207,11 @@
|
||||
}
|
||||
long long AviWriteFile::FileSize()
|
||||
{
|
||||
+#ifdef __Linux__
|
||||
return lseek64(m_fd, 0, SEEK_CUR);
|
||||
+#else
|
||||
+ return lseek(m_fd, 0, SEEK_CUR);
|
||||
+#endif
|
||||
}
|
||||
-INCLUDES = -I. -I../include -I@includedir@/avifile @XMPS_CFLAGS@
|
||||
+INCLUDES = -I. -I../include -I@includedir@/avifile @XMPS_CFLAGS@ @SDL_CFLAGS@
|
||||
|
||||
AviWriteStream::AviWriteStream
|
||||
--- lib/videocodec/Module.h.orig Sat Sep 9 14:24:49 2000
|
||||
+++ lib/videocodec/Module.h Wed Sep 13 20:20:25 2000
|
||||
@@ -4,6 +4,10 @@
|
||||
#include <videoencoder.h>
|
||||
#include <list>
|
||||
#include <string>
|
||||
+#ifdef __FreeBSD__
|
||||
+#include <sys/time.h>
|
||||
+#endif
|
||||
+
|
||||
using namespace std;
|
||||
|
||||
class VideoCodecControl;
|
||||
--- player/renderer.cpp.orig Mon Sep 11 08:38:07 2000
|
||||
+++ player/renderer.cpp Fri Sep 15 20:22:55 2000
|
||||
@@ -11,6 +11,7 @@
|
||||
#ifdef __FreeBSD__
|
||||
#include <machine/param.h>
|
||||
#include <sys/types.h>
|
||||
+#include <unistd.h>
|
||||
#endif
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
--- lib/aviplay/aviutil.cpp.orig Sat Sep 16 13:49:08 2000
|
||||
+++ lib/aviplay/aviutil.cpp Sat Sep 16 13:54:06 2000
|
||||
@@ -28,16 +28,18 @@
|
||||
}
|
||||
CPU_Freq::CPU_Freq()
|
||||
{
|
||||
- FILE *f = fopen ("/proc/cpuinfo", "r");
|
||||
char line[200];
|
||||
char model[200]="unknown";
|
||||
char flags[500]="";
|
||||
char *s,*value;
|
||||
|
||||
+#ifdef __FreeBSD__
|
||||
+ freq=old_freq();
|
||||
+ cerr<<freq/1000.<<" MHz processor detected"<<endl;
|
||||
+#else
|
||||
+ FILE *f = fopen ("/proc/cpuinfo", "r");
|
||||
+
|
||||
freq=-1;
|
||||
-// freq=old_freq();
|
||||
-// cerr<<freq/1000.<<" MHz processor detected"<<endl;
|
||||
-// return;
|
||||
if (!f)
|
||||
{
|
||||
printf("Can't open /proc/cpuinfo for reading\n");
|
||||
@@ -86,6 +88,7 @@
|
||||
}
|
||||
#endif
|
||||
fclose(f);
|
||||
+#endif
|
||||
}
|
||||
|
||||
CPU_Freq freq;
|
||||
all: avi_configure.o avi_codec.o
|
||||
$(CC) -shared avi_configure.o avi_codec.o $(LIBS) -o libavi.so
|
||||
|
@ -1,11 +1,15 @@
|
||||
--- xmps-avi-plugin/Makefile.in.orig Sat Sep 16 14:13:04 2000
|
||||
+++ xmps-avi-plugin/Makefile.in Sat Sep 16 14:20:30 2000
|
||||
@@ -1,6 +1,6 @@
|
||||
-LIBS = -lstdc++ -L../lib -L@libdir@ -laviplay -lpthread @XMPS_LIBS@
|
||||
+LIBS = -lstdc++ -L../lib -L@libdir@ -laviplay -pthread @XMPS_LIBS@
|
||||
--- lib/videocodec/Module.h.orig Fri Oct 6 13:01:34 2000
|
||||
+++ lib/videocodec/Module.h Fri Oct 6 13:02:09 2000
|
||||
@@ -4,6 +4,12 @@
|
||||
#include <videoencoder.h>
|
||||
#include <list>
|
||||
#include <string>
|
||||
+#if (defined(__unix__) || defined(unix)) && !defined(USG)
|
||||
+#include <sys/param.h>
|
||||
+#endif
|
||||
+#if (defined(BSD) && (BSD >= 199103))
|
||||
+#include <sys/time.h>
|
||||
+#endif
|
||||
using namespace std;
|
||||
|
||||
-INCLUDES = -I. -I../include -I@includedir@/avifile @XMPS_CFLAGS@
|
||||
+INCLUDES = -I. -I../include -I@includedir@/avifile @XMPS_CFLAGS@ @SDL_CFLAGS@
|
||||
|
||||
all: avi_configure.o avi_codec.o
|
||||
$(CC) -shared avi_configure.o avi_codec.o $(LIBS) -o libavi.so
|
||||
class VideoCodecControl;
|
||||
|
@ -1,235 +1,22 @@
|
||||
--- lib/loader/ext.c.orig Sat Sep 16 17:02:10 2000
|
||||
+++ lib/loader/ext.c Sat Sep 16 17:02:14 2000
|
||||
@@ -7,7 +7,7 @@
|
||||
********************************************************/
|
||||
#include <config.h>
|
||||
--- Makefile.in.orig Tue Oct 3 08:19:35 2000
|
||||
+++ Makefile.in Fri Oct 6 13:36:01 2000
|
||||
@@ -66,17 +66,14 @@
|
||||
$(INSTALL_PROGRAM) -m0755 ./avifile-config $(bindir)
|
||||
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/mman.h>
|
||||
#include <errno.h>
|
||||
--- lib/loader/win32.c.orig Sat Sep 16 17:03:28 2000
|
||||
+++ lib/loader/win32.c Sat Sep 16 17:03:30 2000
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "win32.h"
|
||||
#include <stdio.h>
|
||||
#include <pthread.h>
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
--- lib/loader/driver.c.orig Sat Sep 16 17:04:30 2000
|
||||
+++ lib/loader/driver.c Sat Sep 16 17:04:32 2000
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <config.h>
|
||||
#include <stdio.h>
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
#include <wine/driver.h>
|
||||
#include <wine/pe_image.h>
|
||||
#include <wine/winreg.h>
|
||||
--- lib/loader/resource.c.orig Sat Sep 16 17:07:41 2000
|
||||
+++ lib/loader/resource.c Sat Sep 16 17:08:00 2000
|
||||
@@ -253,6 +253,56 @@
|
||||
return RES_SizeofResource( hModule, hRsrc );
|
||||
}
|
||||
|
||||
+/**********************************************************************
|
||||
+ * LoadStringW (USER32.376)
|
||||
+ */
|
||||
+INT WINAPI LoadStringW( HINSTANCE instance, UINT resource_id,
|
||||
+ LPWSTR buffer, INT buflen )
|
||||
+{
|
||||
+ HGLOBAL hmem;
|
||||
+ HRSRC hrsrc;
|
||||
+ WCHAR *p;
|
||||
+ int string_num;
|
||||
+ int i;
|
||||
+
|
||||
+ if (HIWORD(resource_id)==0xFFFF) /* netscape 3 passes this */
|
||||
+ resource_id = (UINT)(-((INT)resource_id));
|
||||
+ TRACE("instance = %04x, id = %04x, buffer = %08x, "
|
||||
+ "length = %d\n", instance, (int)resource_id, (int) buffer, buflen);
|
||||
+
|
||||
+ /* Use bits 4 - 19 (incremented by 1) as resourceid, mask out
|
||||
+ * 20 - 31. */
|
||||
+ hrsrc = FindResourceW( instance, (LPCWSTR)(((resource_id>>4)&0xffff)+1),
|
||||
+ RT_STRINGW );
|
||||
+ if (!hrsrc) return 0;
|
||||
+ hmem = LoadResource( instance, hrsrc );
|
||||
+ if (!hmem) return 0;
|
||||
+
|
||||
+ p = LockResource(hmem);
|
||||
+ string_num = resource_id & 0x000f;
|
||||
+ for (i = 0; i < string_num; i++)
|
||||
+ p += *p + 1;
|
||||
+
|
||||
+ TRACE("strlen = %d\n", (int)*p );
|
||||
+
|
||||
+ if (buffer == NULL) return *p;
|
||||
+ i = min(buflen - 1, *p);
|
||||
+ if (i > 0) {
|
||||
+ memcpy(buffer, p + 1, i * sizeof (WCHAR));
|
||||
+ buffer[i] = (WCHAR) 0;
|
||||
+ } else {
|
||||
+ if (buflen > 1) {
|
||||
+ buffer[0] = (WCHAR) 0;
|
||||
+ return 0;
|
||||
+ }
|
||||
+#if 0
|
||||
+ WARN("Dont know why caller give buflen=%d *p=%d trying to obtain string '%s'\n", buflen, *p, p + 1);
|
||||
+#endif
|
||||
+ }
|
||||
+
|
||||
+ TRACE("String loaded !\n");
|
||||
+ return i;
|
||||
+}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
@@ -303,57 +353,6 @@
|
||||
HeapFree( GetProcessHeap(), 0, wbuf );
|
||||
|
||||
return retval;
|
||||
-}
|
||||
-
|
||||
-/**********************************************************************
|
||||
- * LoadStringW (USER32.376)
|
||||
- */
|
||||
-INT WINAPI LoadStringW( HINSTANCE instance, UINT resource_id,
|
||||
- LPWSTR buffer, INT buflen )
|
||||
-{
|
||||
- HGLOBAL hmem;
|
||||
- HRSRC hrsrc;
|
||||
- WCHAR *p;
|
||||
- int string_num;
|
||||
- int i;
|
||||
-
|
||||
- if (HIWORD(resource_id)==0xFFFF) /* netscape 3 passes this */
|
||||
- resource_id = (UINT)(-((INT)resource_id));
|
||||
- TRACE("instance = %04x, id = %04x, buffer = %08x, "
|
||||
- "length = %d\n", instance, (int)resource_id, (int) buffer, buflen);
|
||||
-
|
||||
- /* Use bits 4 - 19 (incremented by 1) as resourceid, mask out
|
||||
- * 20 - 31. */
|
||||
- hrsrc = FindResourceW( instance, (LPCWSTR)(((resource_id>>4)&0xffff)+1),
|
||||
- RT_STRINGW );
|
||||
- if (!hrsrc) return 0;
|
||||
- hmem = LoadResource( instance, hrsrc );
|
||||
- if (!hmem) return 0;
|
||||
-
|
||||
- p = LockResource(hmem);
|
||||
- string_num = resource_id & 0x000f;
|
||||
- for (i = 0; i < string_num; i++)
|
||||
- p += *p + 1;
|
||||
-
|
||||
- TRACE("strlen = %d\n", (int)*p );
|
||||
-
|
||||
- if (buffer == NULL) return *p;
|
||||
- i = min(buflen - 1, *p);
|
||||
- if (i > 0) {
|
||||
- memcpy(buffer, p + 1, i * sizeof (WCHAR));
|
||||
- buffer[i] = (WCHAR) 0;
|
||||
- } else {
|
||||
- if (buflen > 1) {
|
||||
- buffer[0] = (WCHAR) 0;
|
||||
- return 0;
|
||||
- }
|
||||
-#if 0
|
||||
- WARN("Dont know why caller give buflen=%d *p=%d trying to obtain string '%s'\n", buflen, *p, p + 1);
|
||||
-#endif
|
||||
- }
|
||||
-
|
||||
- TRACE("String loaded !\n");
|
||||
- return i;
|
||||
}
|
||||
|
||||
/* Messages...used by FormatMessage32* (KERNEL32.something)
|
||||
--- lib/videocodec/VideoDecoder.cpp.orig Sat Sep 16 17:11:41 2000
|
||||
+++ lib/videocodec/VideoDecoder.cpp Sat Sep 16 17:16:25 2000
|
||||
@@ -20,7 +20,6 @@
|
||||
#include <fcntl.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/types.h>
|
||||
-#include <malloc.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <strstream>
|
||||
--- lib/avifile/Cache.h.orig Sat Sep 16 17:22:11 2000
|
||||
+++ lib/avifile/Cache.h Sat Sep 16 17:22:14 2000
|
||||
@@ -2,7 +2,7 @@
|
||||
#include <default.h>
|
||||
#define _LARGEFILE64_SOURCE
|
||||
#include <unistd.h>
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <pthread.h>
|
||||
--- lib/avifile/FastReadStream.cpp.orig Sat Sep 16 17:23:45 2000
|
||||
+++ lib/avifile/FastReadStream.cpp Sat Sep 16 17:23:47 2000
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <features.h>
|
||||
#endif
|
||||
#include <unistd.h>
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#define lseek64 lseek
|
||||
--- lib/avifile/AviRead.h.orig Sat Sep 16 17:25:10 2000
|
||||
+++ lib/avifile/AviRead.h Sat Sep 16 17:25:13 2000
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <avifmt.h>
|
||||
#include <default.h>
|
||||
#include <unistd.h>
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <pthread.h>
|
||||
--- lib/avifile/AviWrite.h.orig Sat Sep 16 17:26:35 2000
|
||||
+++ lib/avifile/AviWrite.h Sat Sep 16 17:26:37 2000
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <avifmt.h>
|
||||
#include <default.h>
|
||||
#include <unistd.h>
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <pthread.h>
|
||||
--- samples/benchmark/main.cpp.orig Sat Sep 16 17:28:22 2000
|
||||
+++ samples/benchmark/main.cpp Sat Sep 16 17:28:24 2000
|
||||
@@ -9,7 +9,6 @@
|
||||
#include <config.h>
|
||||
|
||||
#include <stdio.h>
|
||||
-#include <malloc.h>
|
||||
#include <signal.h>
|
||||
#include <iostream.h>
|
||||
#include <unistd.h>
|
||||
--- samples/benchmark/renderer.cpp.orig Sat Sep 16 17:29:28 2000
|
||||
+++ samples/benchmark/renderer.cpp Sat Sep 16 17:29:29 2000
|
||||
@@ -14,7 +14,7 @@
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
#include <pthread.h>
|
||||
#include "renderer.h"
|
||||
#include "RegAccess.h"
|
||||
--- player/renderer.cpp.orig Sat Sep 16 22:31:56 2000
|
||||
+++ player/renderer.cpp Sat Sep 16 22:32:02 2000
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
#include <pthread.h>
|
||||
#include "renderer.h"
|
||||
#include "RegAccess.h"
|
||||
install:
|
||||
- -$(INSTALL_PROGRAM) -d $(datadir)
|
||||
-$(INSTALL_PROGRAM) -d $(includedir)/avifile/wine
|
||||
-$(INSTALL_PROGRAM) -d $(datadir)/avifile
|
||||
- -$(INSTALL_PROGRAM) -d $(libdir)
|
||||
- -$(INSTALL_PROGRAM) -d $(bindir)
|
||||
-$(INSTALL_PROGRAM) ./lib/libaviplay.so $(libdir)
|
||||
-$(INSTALL_PROGRAM) ./include/*.h $(includedir)/avifile
|
||||
-$(INSTALL_PROGRAM) ./include/wine/*.h $(includedir)/avifile/wine
|
||||
ifeq (@USE_QT@,1)
|
||||
- -$(INSTALL_PROGRAM) ./bin/aviplay $(bindir)
|
||||
- -$(INSTALL_PROGRAM) ./bin/benchmark $(bindir)
|
||||
+ -$(INSTALL_PROGRAM) -s ./bin/aviplay $(bindir)
|
||||
+ -$(INSTALL_PROGRAM) -s ./bin/benchmark $(bindir)
|
||||
-$(INSTALL_PROGRAM) ./bin/*.ppm $(datadir)/avifile
|
||||
-$(INSTALL_PROGRAM) ./bin/*.png $(datadir)/avifile
|
||||
ifeq (@USE_VIDCAP@,1)
|
||||
|
@ -1,3 +1,5 @@
|
||||
An MPEG-4 (aka DivX) player built around the Windows binaries,
|
||||
but does not need Wine.
|
||||
There is also a xmps plugin you can build (manually).
|
||||
|
||||
WWW: http://divx.euro.ru/
|
||||
|
@ -7,6 +7,7 @@ include/avifile/aviutil.h
|
||||
include/avifile/config.h
|
||||
include/avifile/default.h
|
||||
include/avifile/except.h
|
||||
include/avifile/image.h
|
||||
include/avifile/loader.h
|
||||
include/avifile/registry.h
|
||||
include/avifile/videodecoder.h
|
||||
@ -40,12 +41,15 @@ include/avifile/wine/winreg.h
|
||||
include/avifile/wine/winuser.h
|
||||
@dirrm include/avifile/wine
|
||||
@dirrm include/avifile
|
||||
bin/avifile-config
|
||||
bin/aviplay
|
||||
bin/benchmark
|
||||
bin/qtrecompress
|
||||
share/avifile/open.ppm
|
||||
share/avifile/pause.ppm
|
||||
share/avifile/play.ppm
|
||||
share/avifile/stop.ppm
|
||||
share/avifile/about.ppm
|
||||
share/avifile/test.png
|
||||
@dirrm share/avifile
|
||||
lib/win32/ativcr2.dll
|
||||
@ -59,8 +63,7 @@ lib/win32/ir41_32.dll
|
||||
lib/win32/ir41_qc.dll
|
||||
lib/win32/ir50_32.dll
|
||||
lib/win32/ir50_qc.dll
|
||||
lib/win32/m3jpeg32.dll
|
||||
lib/win32/mpg4c32.dll
|
||||
@dirrm lib/win32
|
||||
lib/libaviplay.so
|
||||
@exec /sbin/ldconfig -m %D/lib
|
||||
@unexec /sbin/ldconfig -R
|
||||
|
Loading…
Reference in New Issue
Block a user