Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorDamien Plisson <damien.plisson@yahoo.fr>2009-12-03 15:16:00 +0300
committerDamien Plisson <damien.plisson@yahoo.fr>2009-12-03 15:16:00 +0300
commit3b1c6d6065ea784e6986bff58a842afd0915dc7a (patch)
treedd0716174c9a7147bb513586739fc95bb7787106 /intern
parent1fd581ad77e2958e4ea7a6faf0afd823d26f042c (diff)
Quicktime Carbon: Fix memory leak when build with cocoa
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/CMakeLists.txt4
-rw-r--r--intern/ghost/SConscript6
-rw-r--r--intern/ghost/intern/GHOST_SystemCocoa.mm22
3 files changed, 31 insertions, 1 deletions
diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt
index 92d0abce2b8..77afcc929aa 100644
--- a/intern/ghost/CMakeLists.txt
+++ b/intern/ghost/CMakeLists.txt
@@ -45,6 +45,10 @@ IF(APPLE)
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerX11.cpp")
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemX11.cpp")
LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowX11.cpp")
+
+ IF(WITH_QUICKTIME)
+ ADD_DEFINITIONS(-DWITH_QUICKTIME)
+ ENDIF(WITH_QUICKTIME)
ELSE(APPLE)
IF(WIN32)
SET(INC ${INC} ${WINTAB_INC})
diff --git a/intern/ghost/SConscript b/intern/ghost/SConscript
index 90a86ae01a9..2a06a9d3c9e 100644
--- a/intern/ghost/SConscript
+++ b/intern/ghost/SConscript
@@ -12,6 +12,7 @@ if window_system == 'darwin':
pf = ['GHOST_DisplayManager', 'GHOST_System', 'GHOST_Window', 'GHOST_DropTarget']
+defs=['_USE_MATH_DEFINES']
if window_system in ('linux2', 'openbsd3', 'sunos5', 'freebsd6', 'irix6'):
for f in pf:
@@ -29,6 +30,10 @@ elif window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross', 'win64
pass
elif window_system == 'darwin':
if env['WITH_GHOST_COCOA']:
+ if env['WITH_BF_QUICKTIME']:
+ defs.append('WITH_QUICKTIME')
+ if env['USE_QTKIT']:
+ defs.append('USE_QTKIT')
for f in pf:
try:
sources.remove('intern' + os.sep + f + 'Win32.cpp')
@@ -49,7 +54,6 @@ else:
print "Unknown window system specified."
Exit()
-defs=['_USE_MATH_DEFINES']
if env['BF_GHOST_DEBUG']:
defs.append('BF_GHOST_DEBUG')
diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm
index f7036f21642..37befdf7f85 100644
--- a/intern/ghost/intern/GHOST_SystemCocoa.mm
+++ b/intern/ghost/intern/GHOST_SystemCocoa.mm
@@ -389,6 +389,28 @@ extern "C" int GHOST_HACK_getFirstFile(char buf[FIRSTFILEBUFLG]) {
}
}
+#if defined(WITH_QUICKTIME) && !defined(USE_QTKIT)
+//Need to place this quicktime function in an ObjC file
+//It is used to avoid memory leak when raising the quicktime "compression settings" standard dialog
+extern "C" {
+ struct bContext;
+ struct wmOperator;
+ extern int fromcocoa_request_qtcodec_settings(bContext *C, wmOperator *op);
+
+
+int cocoa_request_qtcodec_settings(bContext *C, wmOperator *op)
+{
+ int result;
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
+ result = fromcocoa_request_qtcodec_settings(C, op);
+
+ [pool drain];
+ return result;
+}
+};
+#endif
+
#pragma mark Cocoa objects