diff -ru quicktime4linux-1.4/Makefile quicktime4linux-1.4-patched/Makefile --- quicktime4linux-1.4/Makefile Fri Aug 10 13:14:11 2001 +++ quicktime4linux-1.4-patched/Makefile Tue Aug 28 16:47:30 2001 @@ -12,6 +12,11 @@ USE_MMX = 0 endif +USE_FIREWIRE = 1 +ifeq ($(OBJDIR), Darwin) + USE_FIREWIRE = 0 +endif + ifeq ($(USE_MMX), 1) CFLAGS += -DARCH_X86 @@ -139,13 +144,16 @@ $(OBJDIR)/libdv/rgb.o \ $(OBJDIR)/libdv/util.o \ $(OBJDIR)/libdv/vlc.o \ - $(OBJDIR)/libdv/weighting.o \ - $(OBJDIR)/libraw1394/eventloop.o \ + $(OBJDIR)/libdv/weighting.o + +ifeq ($(USE_FIREWIRE), 1) +FIREWIREOBJS= $(OBJDIR)/libraw1394/eventloop.o \ $(OBJDIR)/libraw1394/fcp.o \ $(OBJDIR)/libraw1394/iso.o \ $(OBJDIR)/libraw1394/main.o \ $(OBJDIR)/libraw1394/readwrite.o - +OBJS += $(FIREWIREOBJS) +endif OUTPUT = $(OBJDIR)/libquicktime.a SHAREDOUTPUT = $(OBJDIR)/libquicktime.so @@ -154,7 +162,7 @@ all: $(OUTPUT) $(OUTPUT): $(DVMMXOBJ) $(OBJS) $(DVMMXOBJS) - ar rcs $(OUTPUT) $(OBJS) $(DVMMXOBJS) + ar rc $(OUTPUT) $(OBJS) $(DVMMXOBJS) # g++ -shared -o $(SHAREDOUTPUT) $(OBJS) $(OBJDIR)/qtdump: $(OBJDIR)/dump.o $(OUTPUT) @@ -193,9 +201,9 @@ tar zcvf quicktime.tar.gz quicktime install: - cp libquicktime.so /usr/lib/libquicktime.so.1 - ln -s /usr/lib/libquicktime.so.1 /usr/lib/libquicktime.so - cp quicktime.h qtprivate.h /usr/include + cp $(OUTPUT) $(LIBDIR)/libquicktime.a + ranlib $(LIBDIR)/libquicktime.a + cp quicktime.h qtprivate.h codecs.h $(INCDIR) $(OBJDIR)/dump.o \ $(OBJDIR)/make_streamable.o \ diff -ru quicktime4linux-1.4/configure quicktime4linux-1.4-patched/configure --- quicktime4linux-1.4/configure Fri Aug 10 13:14:10 2001 +++ quicktime4linux-1.4-patched/configure Tue Aug 28 16:44:30 2001 @@ -35,15 +35,12 @@ EOF if test -z "$CFLAGS" -a `uname --machine` != alpha; then - echo >> global_config "CFLAGS = -O2 -fomit-frame-pointer -malign-loops=2 -malign-jumps=2 -malign-functions=2 -march=i486 -I/usr/local/include" + echo >> global_config "CFLAGS = -O2 -fomit-frame-pointer" fi -echo >> global_config "CFLAGS += -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" - cat >> global_config << EOF -CFLAGS += -DHAVE_FIREWIRE CFLAGS += -I. -Ijpeg -Ilibdv \$(shell glib-config --cflags) export CFLAGS -CC = gcc +CC = cc EOF diff -ru quicktime4linux-1.4/libdv/audio.c quicktime4linux-1.4-patched/libdv/audio.c --- quicktime4linux-1.4/libdv/audio.c Fri Aug 10 13:14:10 2001 +++ quicktime4linux-1.4-patched/libdv/audio.c Tue Aug 28 16:44:30 2001 @@ -87,7 +87,7 @@ }; -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(__APPLE__) static gint quantization[8] = { [0] 16, [1] 12, diff -ru quicktime4linux-1.4/libdv/parse.c quicktime4linux-1.4-patched/libdv/parse.c --- quicktime4linux-1.4/libdv/parse.c Fri Aug 10 13:14:10 2001 +++ quicktime4linux-1.4-patched/libdv/parse.c Tue Aug 28 16:44:30 2001 @@ -41,7 +41,7 @@ #define PARSE_VLC_TRACE 0 -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(__APPLE__) #if PARSE_VLC_TRACE #define vlc_trace(format,args...) fprintf(stdout,format,##args) #else diff -ru quicktime4linux-1.4/libdv/vlc.c quicktime4linux-1.4-patched/libdv/vlc.c --- quicktime4linux-1.4/libdv/vlc.c Fri Aug 10 13:14:10 2001 +++ quicktime4linux-1.4-patched/libdv/vlc.c Tue Aug 28 16:44:31 2001 @@ -56,7 +56,7 @@ * identical. */ /* 7 - 10 bits available class selector is [0:1] */ -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(__APPLE__) static gint8 dv_vlc_class_lookup2[4] = { [0x0 ... 0x2] = 1, [0x3 ] = 2, @@ -68,7 +68,7 @@ #endif /* ! __GNUC__ */ /* 11 - 16 bits available, class selector is [0:6] */ -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(__APPLE__) static gint8 dv_vlc_class_lookup3[128] = { [0x00 ... 0x5f] = 1, [0x60 ... 0x7b] = 2, @@ -89,7 +89,7 @@ }; /* dv_vlc_class_lookup3 */ #endif /* ! __GNUC__ */ -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(__APPLE__) static gint8 dv_vlc_class_lookup4[128] = { [0x00 ... 0x5f] = 1, [0x60 ... 0x7b] = 2, @@ -110,7 +110,7 @@ }; /* dv_vlc_class_lookup4 */ #endif /* ! __GNUC__ */ -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(__APPLE__) gint8 dv_vlc_class_lookup5[128] = { [0x00 ... 0x5f] = 1, [0x60 ... 0x7b] = 2, @@ -132,7 +132,7 @@ #endif /* ! __GNUC__ */ /* Indexed by number of bits available */ -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(__APPLE__) const gint8 *dv_vlc_classes[17] = { [0 ... 2] = &dv_vlc_class_broken[0], [3 ... 6] = &dv_vlc_class_lookup1[0], @@ -165,7 +165,7 @@ /* bitmask to extract class index, given x bits of left-aligned input * the class index is derived from y prefix bits */ -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(__APPLE__) const gint dv_vlc_class_index_mask[17] = { [ 0 ... 6] = 0x0000, [ 7 ... 10] = 0xc000, @@ -179,7 +179,7 @@ }; /* class_index_mask */ #endif /* ! __GNUC__ */ -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(__APPLE__) const gint dv_vlc_class_index_rshift[17] = { [ 0 ... 6] = 0, [ 7 ... 10] = 14, @@ -193,13 +193,13 @@ }; /* class_index_mask */ #endif /* ! __GNUC__ */ -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(__APPLE__) const dv_vlc_tab_t dv_vlc_broken[1] = { [0] = {run: -1, amp: -1, len: VLC_NOBITS} }; #else /* ! __GNUC__ */ const dv_vlc_tab_t dv_vlc_broken[1] = { {-1, VLC_NOBITS, -1} }; #endif /* ! __GNUC__ */ -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(__APPLE__) const dv_vlc_tab_t dv_vlc_lookup1[32] = { /* prefix 00 */ [0x00 ... 0x07] = {run: 0, amp: 1, len: 1+2}, /* 00s */ @@ -246,7 +246,7 @@ dv_vlc_tab_t dv_vlc_class1_shortcut[128]; -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(__APPLE__) const dv_vlc_tab_t dv_vlc_lookup2[128] = { /* prefix 110 */ [0x00 ... 0x07] = {run: 3, amp: 1, len: 1+6}, /* 110000s */ @@ -377,7 +377,7 @@ }; /* dv_vlc_lookup2 */ #endif /* ! __GNUC__ */ -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(__APPLE__) const dv_vlc_tab_t dv_vlc_lookup3[64] = { /* len 10+1/prefix 1111 1000 */ [0x00 ... 0x03] = {run: 5, amp: 3, len: 1+10}, /* 1111 1000 00s */ @@ -506,7 +506,7 @@ }; /* dv_vlc_lookup3 */ #endif /* ! __GNUC__ */ -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(__APPLE__) dv_vlc_tab_t dv_vlc_lookup4[64] = { /* len 13/prefix 1111 110 */ [0 ... 63] = {run: 0, amp: -1, len: VLC_ERROR}, }; /* dv_vlc_lookup4 */ @@ -532,7 +532,7 @@ }; /* dv_vlc_lookup4 */ #endif /* ! __GNUC__ */ -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(__APPLE__) dv_vlc_tab_t dv_vlc_lookup5[256] = { /* len 15+1/prefix 1111 111 */ [0 ... 255] = {run: 0, amp: -1, len: VLC_ERROR}, }; /* dv_vlc_lookup6 */ @@ -615,7 +615,7 @@ dv_vlc_lookup5, }; /* dv_vlc_lookups */ -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(__APPLE__) const gint dv_vlc_index_mask[6] = { [0] = 0x0000, /* no choice */ [1] = 0xf800, /* 5 bit selector [0:4] */ @@ -635,7 +635,7 @@ }; /* dv_vlc_index_mask */ #endif /* ! __GNUC__ */ -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(__APPLE__) const gint dv_vlc_index_rshift[6] = { [0] = 0, [1] = 11, @@ -655,7 +655,7 @@ }; /* */ #endif /* ! __GNUC__ */ -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(__APPLE__) const gint sign_mask[17] = { [1] = 0x1 << 15, [2] = 0x1 << 14, @@ -697,7 +697,7 @@ #endif /* ! __GNUC__ */ -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(__APPLE__) const gint sign_rshift[17] = { [1] = 15, [2] = 14, @@ -785,7 +785,7 @@ #if ! ARCH_X86 void dv_decode_vlc(gint bits,gint maxbits, dv_vlc_t *result) { -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(__APPLE__) static dv_vlc_t vlc_broken = {run: -1, amp: -1, len: VLC_NOBITS}; #else /* ! __GNUC__ */ static dv_vlc_t vlc_broken = {-1, VLC_NOBITS, -1}; diff -ru quicktime4linux-1.4/libmjpeg.h quicktime4linux-1.4-patched/libmjpeg.h --- quicktime4linux-1.4/libmjpeg.h Fri Aug 10 13:14:10 2001 +++ quicktime4linux-1.4-patched/libmjpeg.h Tue Aug 28 16:44:31 2001 @@ -14,7 +14,11 @@ #include #include "jpeg/jpeglib.h" +#ifdef __APPLE__ +#include "png.h" /* Need setjmp.h included by png.h */ +#else #include /* Need setjmp.h included by png.h */ +#endif #include "pthread.h" #define MAXFIELDS 2 diff -ru quicktime4linux-1.4/qtprivate.h quicktime4linux-1.4-patched/qtprivate.h --- quicktime4linux-1.4/qtprivate.h Fri Aug 10 13:14:11 2001 +++ quicktime4linux-1.4-patched/qtprivate.h Tue Aug 28 16:44:31 2001 @@ -13,8 +13,13 @@ typedef int64_t longest; typedef u_int64_t ulongest; +#ifdef __APPLE__ +#define FTELL ftello +#define FSEEK fseeko +#else #define FTELL ftello64 #define FSEEK fseeko64 +#endif typedef struct {