removed native quicktime init/exit calls from main blender code.

This commit is contained in:
Rob Haarsma
2003-09-18 11:41:50 +00:00
parent 775f006bf1
commit 99efb0cc3c
5 changed files with 42 additions and 41 deletions

View 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

View 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

View File

@@ -59,28 +59,45 @@
#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;

View File

@@ -118,17 +118,6 @@
#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) {

View 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 */