fun with quicktime:
authorStefan Gartner <stefang@aon.at>
Fri, 2 May 2003 13:36:56 +0000 (13:36 +0000)
committerStefan Gartner <stefang@aon.at>
Fri, 2 May 2003 13:36:56 +0000 (13:36 +0000)
#include <QuickTime/Movies.h> instead of #include <Movies.h> on OS X to
avoid having to specify the full path to the QT headers in the Makefiles

#undef NDEBUG on OS X to avoid errors about ID being declared twice

enable support for QuickTime in the original Makefiles on OS X

16 files changed:
source/Makefile
source/blender/Makefile
source/blender/imbuf/intern/Makefile
source/blender/quicktime/Makefile [new file with mode: 0644]
source/blender/quicktime/apple/Makefile [new file with mode: 0644]
source/blender/quicktime/apple/quicktime_export.c
source/blender/quicktime/apple/quicktime_import.c
source/blender/quicktime/quicktime_import.h
source/blender/render/intern/source/Makefile
source/blender/src/Makefile
source/blender/src/playanim.c
source/blender/src/usiblender.c
source/creator/Makefile
source/creator/creator.c
source/nan_definitions.mk
source/nan_link.mk

index 399f7df6639429534ecabe757198673bc617ec6f..54dda35e617a7c02313980dbbdc1e1feb15e7270 100644 (file)
@@ -133,6 +133,9 @@ PYPLAYERLIB ?= $(PYLIB)
     COMLIB += $(NAN_GUARDEDALLOC)/lib/libguardedalloc.a
     COMLIB += $(NAN_BMFONT)/lib/$(DEBUG_DIR)libbmfont.a
     COMLIB += $(NAN_PNG)/lib/libpng.a
+  ifeq ($(WITH_QUICKTIME), true)
+    COMLIB += $(OCGDIR)/blender/blenderqt/$(DEBUG_DIR)libblenderqt.a
+  endif
 
     PULIB = $(NAN_IKSOLVER)/lib/libiksolver.a
     PULIB += $(NAN_MOTO)/lib/libmoto.a
index 7ccb0f0c0423624aff8b67f8eea83fc10bd81b40..eb139d8d61799a0fce9fa5458431710d3529e323 100644 (file)
@@ -39,6 +39,10 @@ DIRS += writestreamglue readstreamglue writeblenfile readblenfile
 DIRS += avi imbuf img render radiosity blenlib blenkernel blenpluginapi
 DIRS += bpython makesdna src renderconverter
 
+ifeq ($(WITH_QUICKTIME), true)
+       DIRS += quicktime
+endif
+
 DIR = $(OCGDIR)/blender
 SOURCEDIR = source/blender
 TESTDIRS = deflate streamglue
index 1517a508cec393c666659efd72ef4466e7ee4ff2..0cb0316524dac2e0144d4e148e762b6ca5eebada 100644 (file)
@@ -59,3 +59,7 @@ CPPFLAGS += -I../../makesdna
 # external interface of this module
 CPPFLAGS += -I..
 
+ifeq ($(WITH_QUICKTIME), true)
+       CPPFLAGS += -DWITH_QUICKTIME
+endif
+
diff --git a/source/blender/quicktime/Makefile b/source/blender/quicktime/Makefile
new file mode 100644 (file)
index 0000000..c71ebc4
--- /dev/null
@@ -0,0 +1,40 @@
+#
+# $Id$
+#
+# ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version. The Blender
+# Foundation also sells licenses for use in proprietary software under
+# the Blender License.  See http://www.blender.org/BL/ for information
+# about this.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+# All rights reserved.
+#
+# The Original Code is: all of this file.
+#
+# Contributor(s): none yet.
+#
+# ***** END GPL/BL DUAL LICENSE BLOCK *****
+#
+# Bounces make to subdirectories.
+
+SOURCEDIR = source/blender/quicktime
+
+ifeq ($(OS), $(findstring $(OS), "windows, darwin"))
+       DIRS = apple
+endif
+
+include nan_subdirs.mk
diff --git a/source/blender/quicktime/apple/Makefile b/source/blender/quicktime/apple/Makefile
new file mode 100644 (file)
index 0000000..7910f25
--- /dev/null
@@ -0,0 +1,60 @@
+#
+# $Id$
+#
+# ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version. The Blender
+# Foundation also sells licenses for use in proprietary software under
+# the Blender License.  See http://www.blender.org/BL/ for information
+# about this.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+# All rights reserved.
+#
+# The Original Code is: all of this file.
+#
+# Contributor(s): none yet.
+#
+# ***** END GPL/BL DUAL LICENSE BLOCK *****
+#
+#
+
+LIBNAME = blenderqt
+DIR = $(OCGDIR)/blender/$(LIBNAME)
+
+include nan_compile.mk
+
+CFLAGS += $(LEVEL1_C_WARNINGS)
+
+CPPFLAGS += -DWITH_QUICKTIME
+
+ifeq ($(CPU),$(findstring $(CPU), "powerpc mips sparc"))
+    CPPFLAGS += -DWORDS_BIGENDIAN
+else
+    # alpha i386
+    CPPFLAGS += -DWORDS_LITTLEENDIAN
+endif
+
+# path to the guarded memory allocator
+CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
+# our own include
+CPPFLAGS += -I..
+
+# stuff needed by quicktime_[import|export].c
+CPPFLAGS += -I../../readstreamglue -I../../imbuf/intern -I../../imbuf 
+CPPFLAGS += -I../../blenlib -I../../makesdna -I../../include -I../../avi 
+CPPFLAGS += -I../../blenkernel -I../../render/extern/include
+
+
index 7ca6875ea78ba81042f85bd88d9bbb0e33785ae9..b88c72bfb5425f5a9099a1838fd97bfd8e9a9978 100644 (file)
@@ -82,16 +82,18 @@ DONE:
 
 #include "quicktime_export.h"
 
-#include <Movies.h>
-#include <QuicktimeComponents.h>
-
 #ifdef _WIN32
 #include <FixMath.h>
 #include <QTML.h>
 #include <TextUtils.h> 
+#include <Movies.h>
+#include <QuicktimeComponents.h>
 #endif /* _WIN32 */
 
 #ifdef __APPLE__
+#undef NDEBUG
+#include <QuickTime/Movies.h>
+#include <QuickTime/QuicktimeComponents.h>
 #include <fcntl.h> /* open() */
 #include <unistd.h> /* close() */
 #include <sys/stat.h> /* file permissions */
index 61c4fcec215a7d044c77ec8c9c82c44072ef5afe..c961472318b5f4318170f6dae91a5d1f3786c096 100644 (file)
 #include "IMB_anim.h"
 #include "BLO_sys_types.h"
 
-#include <Movies.h>
+#ifdef __APPLE__
+#include <QuickTime/Movies.h>
+#include <QuickTime/QuickTimeComponents.h>
+#endif
 
 #ifdef _WIN32
+#include <Movies.h>
 #include <QTML.h>
-#include <TextUtils.h> 
-#endif /* _WIN32 */
-
-//#ifdef __APPLE__
+#include <TextUtils.h>
 #include <QuickTimeComponents.h>
-//#endif /* __APPLE__ */
+#endif /* _WIN32 */
 
 #include "quicktime_import.h"
 
@@ -81,7 +82,7 @@ int anim_is_quicktime (char *name)
                BLI_testextensie(name, ".zip") ||
                BLI_testextensie(name, ".mp3")) return 0;
 
-       if(QTIME_DEBUG) printf("qt: checking as movie %s\n");
+       if(QTIME_DEBUG) printf("qt: checking as movie\n");
 
        sprintf(theFullPath, "%s", name);
 #ifdef __APPLE__
index 2a2e35fd6714f65e0570c01a4dfb1375b6116586..070346413a19381ade0d76c930e072ec88892703 100644 (file)
 #include "../imbuf/IMB_imbuf_types.h"
 
 #ifndef __MOVIES__
+#ifdef _WIN32
 #include <Movies.h>
+#elif defined(__APPLE__)
+#include <QuickTime/Movies.h>
+#endif
 #endif
 
 #ifdef _WIN32
index 458d26bf05069b97dc8f359f0b9f49fe24a70080..ff8fc1fceae1201a0c994162acacef0898dc098c 100644 (file)
@@ -58,3 +58,7 @@ CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
 # not very neat: the rest of blender..
 CPPFLAGS += -I../../../include 
 
+ifeq ($(WITH_QUICKTIME), true)
+       CPPFLAGS += -DWITH_QUICKTIME
+endif
+
index faae6598263471b8086d2afc2877ae5389d20c60..a20c6e4db3d1485d9040cf4194ed638f75f3c694 100644 (file)
@@ -104,3 +104,9 @@ ifeq ($(OS),linux)
        CPPFLAGS += -I/usr/src/MesaCVS/include
     endif
 endif
+
+ifeq ($(WITH_QUICKTIME),true)
+       CPPFLAGS += -I../quicktime
+       CPPFLAGS += -DWITH_QUICKTIME
+endif
+
index 70232870b2ba74f747c7cac4101b7dc2fa2b49b3..061df8f7f469ee7f2b0d6538f362ef42d4aa7f08 100644 (file)
 #ifdef WITH_QUICKTIME
 #ifdef _WIN32
 #include <QTML.h>
-#endif /* _WIN32 */
-#if defined (_WIN32) || defined (__APPLE__)
 #include <Movies.h>
-#endif /* _WIN32 || __APPLE__ */
+#elif defined(__APPLE__)
+#include <QuickTime/Movies.h>
+#endif /* __APPLE__ */
 #endif /* WITH_QUICKTIME */
 
 #include "PIL_time.h"
index 2b5f05c4be1b8c5f7e9d16682833b0ce2774243d..5a9d079771507885ef2b32fa9c863150509eaf55 100644 (file)
 #include "quicktime_export.h"
 #ifdef _WIN32
 #include <QTML.h>
-#endif /* _WIN32 */
-#if defined (_WIN32) || defined (__APPLE__)
 #include <Movies.h>
-#endif /* _WIN32 || __APPLE__ */
+#elif defined (__APPLE__)
+#undef NDEBUG
+#include <QuickTime/Movies.h>
+#endif /* __APPLE__ */
 #endif /* WITH_QUICKTIME */
 
 /***/
index 9c754c74bbe53128d828c4fd7afd3c71041d082f..b5f9679c6e92c4c39e4990df88ca58e8a81b3507 100644 (file)
@@ -60,3 +60,7 @@ CPPFLAGS += -I../kernel/gen_system
 CPPFLAGS += -I../kernel/gen_messaging
 CPPFLAGS += -I$(NAN_BLENKEY)/include
 CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
+
+ifeq ($(WITH_QUICKTIME), true)
+       CPPFLAGS += -I$(NAN_QUICKTIME)/include -DWITH_QUICKTIME
+endif
index 0564929fa190f586391af8c322725b504fb0175a..851144d14bc5d8e007e60c5d4e3c2eff9ab94496 100644 (file)
 #endif
 
 #ifdef WITH_QUICKTIME
-#      ifdef _WIN32
-#              include <QTML.h>
-#      endif /* _WIN32 */
-#      if defined (_WIN32) || defined (__APPLE__)
-#              include <Movies.h>
-#      elif defined (__linux__)
-#              include <quicktime/lqt.h>
-#      endif /* __linux__ */
+#ifdef _WIN32
+#include <QTML.h>
+#include <Movies.h>
+#elif defined(__APPLE__)
+#undef NDEBUG
+#include <QuickTime/Movies.h>
+#endif /* __APPLE__ */
 #endif /* WITH_QUICKTIME */
 
 // from buildinfo.c
index 496f271f8c5852a4637ca4af122d79fa56806a7d..4f6e82275d483a544b3b18b822b7e91dd33aa063 100644 (file)
@@ -145,6 +145,9 @@ all debug::
     # Be paranoid regarding library creation (do not update archives)
     export NAN_PARANOID ?= true
 
+    # enable quicktime by default on OS X
+    export WITH_QUICKTIME ?= true
+
   else
   ifeq ($(OS),freebsd)
 
index 6a9ebded01717f3f639c77685bfb2cd7efade942..1006bf6d9ddb2e16087c5bb8e726308bffd53b23 100644 (file)
@@ -58,6 +58,9 @@ endif
 ifeq ($(OS),darwin)
     LLIBS    += -lGLU -lGL
     LLIBS    += -lz -framework Carbon -framework AGL
+    ifeq ($(WITH_QUICKTIME), true)
+        LLIBS += -framework QuickTime
+    endif
     LDFLAGS += -L/System/Library/Frameworks/OpenGL.framework/Libraries
     DBG_LDFLAGS += -L/System/Library/Frameworks/OpenGL.framework/Libraries
 endif