Permalink
Browse files

From Stephan Huber, OSX and iOS Video support via a QTKit plugin from…

… OSX 10.7 and before, and an AVFoundation plugin for iOS and OSX10.8 and later.
  • Loading branch information...
1 parent 4d08f34 commit a93e7f4c7bddd10363d322e4a3de140b83bd12e2 @osg-training-guest osg-training-guest committed Oct 2, 2012
View
@@ -593,6 +593,9 @@ IF(NOT ANDROID)
FIND_PACKAGE(QuickTime)
FIND_PACKAGE(QTKit)
FIND_PACKAGE(CoreVideo)
+ FIND_PACKAGE(CoreMedia)
+ FIND_PACKAGE(QuartzCore)
+ FIND_PACKAGE(AVFoundation)
ENDIF()
ENDIF()
@@ -0,0 +1,41 @@
+# Locate Apple AVFoundation (next-generation QTKit)
+# This module defines
+# AV_FOUNDATION_LIBRARY
+# AV_FOUNDATION_FOUND, if false, do not try to link to gdal
+# AV_FOUNDATION_INCLUDE_DIR, where to find the headers
+#
+# $AV_FOUNDATION_DIR is an environment variable that would
+# correspond to the ./configure --prefix=$AV_FOUNDATION_DIR
+#
+# Created by Stephan Maximilian Huber
+
+# QTKit on OS X looks different than QTKit for Windows,
+# so I am going to case the two.
+
+IF(APPLE)
+ FIND_PATH(AV_FOUNDATION_INCLUDE_DIR AVFoundation/AVFoundation.h)
+ FIND_LIBRARY(AV_FOUNDATION_LIBRARY AVFoundation)
+ENDIF()
+
+SET(AV_FOUNDATION_FOUND "NO")
+IF(AV_FOUNDATION_LIBRARY AND AV_FOUNDATION_INCLUDE_DIR)
+ SET(AV_FOUNDATION_FOUND "YES")
+ENDIF()
+
+IF(OSG_BUILD_PLATFORM_IPHONE OR OSG_BUILD_PLATFORM_IPHONE_SIMULATOR)
+ # TODO, AVFoundation exists ON iOS, too
+ SET(AV_FOUNDATION_FOUND "NO")
+ENDIF()
+
+IF(APPLE)
+ # AVFoundation exists since 10.7, but only 10.8 has all features necessary for OSG
+ # so check the SDK-setting
+
+ IF(${OSG_OSX_SDK_NAME} STREQUAL "macosx10.8")
+ # nothing special here ;-)
+ ELSE()
+ MESSAGE("AVFoundation disabled for SDK < 10.8")
+ SET(AV_FOUNDATION_FOUND "NO")
+ ENDIF()
+ENDIF()
+
@@ -0,0 +1,23 @@
+# Locate Apple CoreMedia
+# This module defines
+# COREMEDIA_LIBRARY
+# COREMEDIA_FOUND, if false, do not try to link to gdal
+# COREMEDIA_INCLUDE_DIR, where to find the headers
+#
+# $COREMEDIA_DIR is an environment variable that would
+# correspond to the ./configure --prefix=$COREMEDIA_DIR
+#
+# Created by Stephan Maximilian Huber.
+
+
+IF(APPLE)
+ FIND_PATH(COREMEDIA_INCLUDE_DIR CoreMedia/CoreMedia.h)
+ FIND_LIBRARY(COREMEDIA_LIBRARY CoreMedia)
+ENDIF()
+
+
+SET(COREMEDIA_FOUND "NO")
+IF(COREMEDIA_LIBRARY AND COREMEDIA_INCLUDE_DIR)
+ SET(COREMEDIA_FOUND "YES")
+ENDIF()
+
@@ -0,0 +1,23 @@
+# Locate Apple QuartzCore
+# This module defines
+# QUARTZCORE_LIBRARY
+# QUARTZCORE_FOUND, if false, do not try to link to QUARTZCORE
+# QUARTZCORE_INCLUDE_DIR, where to find the headers
+#
+# $QUARTZCORE_DIR is an environment variable that would
+# correspond to the ./configure --prefix=$QUARTZCORE_DIR
+#
+# Created by Stephan Maximilian Huber.
+
+
+IF(APPLE)
+ FIND_PATH(QUARTZCORE_INCLUDE_DIR QuartzCore/QuartzCore.h)
+ FIND_LIBRARY(QUARTZCORE_LIBRARY QuartzCore)
+ENDIF()
+
+
+SET(QUARTZCORE_FOUND "NO")
+IF(QUARTZCORE_LIBRARY AND QUARTZCORE_INCLUDE_DIR)
+ SET(QUARTZCORE_FOUND "YES")
+ENDIF()
+
View
@@ -68,6 +68,7 @@ IF(DYNAMIC_OPENSCENEGRAPH)
ADD_SUBDIRECTORY(osggraphicscost)
ADD_SUBDIRECTORY(osgmanipulator)
ADD_SUBDIRECTORY(osgmovie)
+ ADD_SUBDIRECTORY(osgmultiplemovies)
ADD_SUBDIRECTORY(osgmultiplerendertargets)
ADD_SUBDIRECTORY(osgmultitexture)
ADD_SUBDIRECTORY(osgmultitexturecontrol)
@@ -0,0 +1,19 @@
+# INCLUDE_DIRECTORIES( ${OPENAL_INCLUDE_DIR} )
+# SET(TARGET_EXTERNAL_LIBRARIES ${OPENAL_LIBRARY} alut)
+
+IF (SDL_FOUND)
+ SET(TARGET_EXTERNAL_LIBRARIES ${SDL_LIBRARY} )
+ INCLUDE_DIRECTORIES(${SDL_INCLUDE_DIR} )
+ ADD_DEFINITIONS(-DUSE_SDL)
+ IF (MINGW)
+ SET(TARGET_EXTERNAL_LIBRARIES ${TARGET_EXTERNAL_LIBRARIES} winmm dinput ddraw dxguid)
+ ENDIF()
+ENDIF(SDL_FOUND)
+
+SET(TARGET_SRC osgmultiplemovies.cpp )
+SET(TARGET_ADDED_LIBRARIES osgGA )
+
+
+
+#### end var setup ###
+SETUP_EXAMPLE(osgmultiplemovies)
Oops, something went wrong.

0 comments on commit a93e7f4

Please sign in to comment.