removed native quicktime init/exit calls from main blender code.
authorRob Haarsma <phaseIV@zonnet.nl>
Thu, 18 Sep 2003 11:41:50 +0000 (11:41 +0000)
committerRob Haarsma <phaseIV@zonnet.nl>
Thu, 18 Sep 2003 11:41:50 +0000 (11:41 +0000)
projectfiles/blender/blender.dsp
source/blender/imbuf/IMB_imbuf.h
source/blender/quicktime/apple/quicktime_import.c
source/blender/src/usiblender.c
source/creator/creator.c

index 6d9ec77942a71b81892c73ea3c60277e8aa97e01..b6e2270812e44e2d756fd0a956bf32f3e88f451b 100644 (file)
@@ -42,7 +42,7 @@ RSC=rc.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\source\blender\misc" /I "..\..\..\lib\windows\guardedalloc\include" /I "..\..\source\blender\blenlib" /I "..\..\source\kernel\gen_messaging" /I "..\..\source\blender\include" /I "..\..\source\blender" /I "..\..\source\blender\makesdna" /I "..\..\source\blender\blenkernel" /I "..\..\source\blender\blenloader" /I "..\..\source\blender\bpython\include" /I "..\..\source\blender\render\extern\include" /I "..\..\source\blender\radiosity\extern\include" /I "..\..\source\kernel\gen_system" /I "..\..\source\blender\renderconverter\\" /I "..\..\source\blender\renderui\\" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "WITH_QUICKTIME" /YX /FD /c
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\source\blender\misc" /I "..\..\..\lib\windows\guardedalloc\include" /I "..\..\source\blender\blenlib" /I "..\..\source\kernel\gen_messaging" /I "..\..\source\blender\include" /I "..\..\source\blender" /I "..\..\source\blender\makesdna" /I "..\..\source\blender\blenkernel" /I "..\..\source\blender\blenloader" /I "..\..\source\blender\bpython\include" /I "..\..\source\blender\imbuf" /I "..\..\source\blender\render\extern\include" /I "..\..\source\blender\radiosity\extern\include" /I "..\..\source\kernel\gen_system" /I "..\..\source\blender\renderconverter\\" /I "..\..\source\blender\renderui\\" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "WITH_QUICKTIME" /YX /FD /c
 # ADD BASE RSC /l 0x413 /d "NDEBUG"
 # ADD RSC /l 0x413 /d "NDEBUG"
 BSC32=bscmake.exe
@@ -71,8 +71,7 @@ PostBuild_Cmds=ECHO Copying required 3rd party dlls...        XCOPY /Y ..\..\..\lib\win
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\source\blender\misc" /I "..\..\..\lib\windows\guardedalloc\include" /I "..\..\source\blender\blenlib" /I "..\..\source\kernel\gen_messaging" /I "..\..\source\blender\include" /I "..\..\source\blender" /I "..\..\source\blender\makesdna" /I "..\..\source\blender\blenkernel" /I "..\..\source\blender\blenloader" /I "..\..\source\blender\bpython\include" /I "..\..\source\blender\render\extern\include" /I "..\..\source\blender\radiosity\extern\include" /I "..\..\source\kernel\gen_system" /I "..\..\source\blender\renderconverter\\" /I "..\..\source\blender\renderui\\" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "WITH_QUICKTIME" /YX /FD /GZ /c
-# SUBTRACT CPP /Fr
+# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\source\blender\misc" /I "..\..\..\lib\windows\guardedalloc\include" /I "..\..\source\blender\blenlib" /I "..\..\source\kernel\gen_messaging" /I "..\..\source\blender\include" /I "..\..\source\blender" /I "..\..\source\blender\makesdna" /I "..\..\source\blender\blenkernel" /I "..\..\source\blender\blenloader" /I "..\..\source\blender\bpython\include" /I "..\..\source\blender\imbuf" /I "..\..\source\blender\render\extern\include" /I "..\..\source\blender\radiosity\extern\include" /I "..\..\source\kernel\gen_system" /I "..\..\source\blender\renderconverter\\" /I "..\..\source\blender\renderui\\" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "WITH_QUICKTIME" /YX /FD /GZ /c
 # ADD BASE RSC /l 0x413 /d "_DEBUG"
 # ADD RSC /l 0x409 /d "_DEBUG"
 BSC32=bscmake.exe
index 0e77fe2b73dcc9985bd5984fb9d24e7d8e51fd4e..777c56972eaf92878140146cc35c46ac61050ef2 100644 (file)
@@ -521,7 +521,13 @@ void IMB_rectfill(unsigned int *drect, unsigned int *srect, int x, int value);
  *
  * @attention Defined in quicktime_import.c
  */
-void init_quicktime(void);
+void quicktime_init(void);
+
+/**
+ *
+ * @attention Defined in quicktime_import.c
+ */
+void quicktime_exit(void);
 
 #endif //WITH_QUICKTIME
 
index eeaa8c4189e67eaa4be925fc98c086e2e974581c..72a571570cfd0fee5cd5d02bdcace420e6709b25 100644 (file)
 #define QTIME_DEBUG 0
 
 
-void init_quicktime(void)
+void quicktime_init(void)
 {
 #ifdef _WIN32
-        if (InitializeQTML(0) != noErr)
-            G.have_quicktime = FALSE;
-        else
-            G.have_quicktime = TRUE;
+       if (InitializeQTML(0) != noErr)
+               G.have_quicktime = FALSE;
+       else
+               G.have_quicktime = TRUE;
 #endif /* _WIN32 */
 
-        /* Initialize QuickTime */
+       /* Initialize QuickTime */
 #if defined(_WIN32) || defined (__APPLE__)
-        if (EnterMovies() != noErr)
-            G.have_quicktime = FALSE;
-        else
+       if (EnterMovies() != noErr)
+               G.have_quicktime = FALSE;
+       else
 #endif /* _WIN32 || __APPLE__ */
 #ifdef __linux__
-                       /* inititalize quicktime codec registry */
-                       lqt_registry_init();
+       /* inititalize quicktime codec registry */
+               lqt_registry_init();
 #endif
-                       G.have_quicktime = TRUE;
+       G.have_quicktime = TRUE;
 }
 
+
+void quicktime_exit(void)
+{
+#if defined(_WIN32) || defined(__APPLE__)
+#ifdef WITH_QUICKTIME
+       if(G.have_quicktime) {
+               free_qtcodecdataExt();
+               ExitMovies();
+#ifdef _WIN32
+               TerminateQTML();
+#endif /* _WIN32 */
+       }
+#endif /* WITH_QUICKTIME */
+#endif /* _WIN32 || __APPLE__ */
+}
+
+
 int anim_is_quicktime (char *name)
 {
        FSSpec  theFSSpec;
index b79d98cfdb4443bcdf6d462913f6703667fedd07..55ab8b4e40aa9e8292a7a7c997e9cfe38c566c26 100644 (file)
 
 #include "PIL_time.h"
 
-#ifdef WITH_QUICKTIME
-#include "quicktime_export.h"
-#ifdef _WIN32
-#include <QTML.h>
-#include <Movies.h>
-#elif defined (__APPLE__)
-#undef NDEBUG
-#include <QuickTime/Movies.h>
-#endif /* __APPLE__ */
-#endif /* WITH_QUICKTIME */
-
 /***/
 
 void BIF_read_file(char *name)
@@ -556,19 +545,9 @@ void exit_usiblender(void)
        free_txt_data();
 
        sound_exit_audio();
-               
-#if defined(_WIN32) || defined(__APPLE__)
-#ifdef WITH_QUICKTIME
-    if(G.have_quicktime) {
-               free_qtcodecdataExt();
-        ExitMovies();
-#ifdef _WIN32
-        TerminateQTML();
-#endif /* _WIN32 */
-    }
-#endif /* WITH_QUICKTIME */
-#endif /* _WIN32 || __APPLE__ */
 
+       quicktime_exit();
+               
        BPY_end_python();
 
        if (!G.background) {
index 6756d3c993a61e5479bbf3dac8106b18a217510d..79a20741925a17304d44dc75937800e6e02d77ae 100644 (file)
@@ -75,7 +75,7 @@
 
 #include "BDR_drawmesh.h"
 
-//#include "IMB_imbuf.h"
+#include "IMB_imbuf.h" // for quicktime_init
 
 #include "RE_renderconverter.h"
 
@@ -424,7 +424,7 @@ int main(int argc, char **argv)
        
 #ifdef WITH_QUICKTIME
 
-       init_quicktime();
+       quicktime_init();
 
 #endif /* WITH_QUICKTIME */