Skip to content
Open
11 changes: 0 additions & 11 deletions libs/openFrameworks/app/ofAppRunner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ using std::shared_ptr;
#include "ofGstUtils.h"
#endif

// adding this for vc2010 compile: error C3861: 'closeQuicktime': identifier not found
#if defined(OF_VIDEO_CAPTURE_QUICKTIME) || defined(OF_VIDEO_PLAYER_QUICKTIME)
#include "ofQtUtils.h"
#endif

#if defined (TARGET_WIN32)
#include <mmsystem.h>
#endif
Expand Down Expand Up @@ -248,12 +243,6 @@ void ofExitCallback(){
//------------------------
#endif

// try to close quicktime, for non-linux systems:
#if defined(OF_VIDEO_CAPTURE_QUICKTIME) || defined(OF_VIDEO_PLAYER_QUICKTIME)
closeQuicktime();
#endif


//------------------------
// try to close freeImage:
ofCloseFreeImage();
Expand Down
52 changes: 20 additions & 32 deletions libs/openFrameworks/utils/ofConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,8 @@ enum ofTargetPlatform{
#define TARGET_GLFW_WINDOW
#define OF_CAIRO
#define OF_RTAUDIO
#ifndef __MACOSX_CORE__
#define __MACOSX_CORE__ // rtAudio
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Safe to remove even though it mentions rtAudio?

#endif
#ifndef OF_NO_FMOD
#define OF_NO_FMOD
#endif


#include "GL/glew.h"
#include "OpenGL/OpenGL.h"

Expand Down Expand Up @@ -324,39 +320,31 @@ typedef TESSindex ofIndexType;


#if (defined(_M_ARM64) || defined(_M_ARM64EC)) && defined(TARGET_WIN32)
#undef USE_FMOD // No FMOD lib for ARM64 yet
#ifndef OF_NO_FMOD
#define OF_NO_FMOD
#endif
// #undef USE_FMOD // No FMOD lib for ARM64 yet
#include <arm64_neon.h> // intrinsics SIMD on https://learn.microsoft.com/en-us/cpp/intrinsics/arm64-intrinsics?view=msvc-170
#endif

//------------------------------------------------ soundplayer
//MAC_OS and IOS uncomment to enable AVEnginePlayer
#ifdef OF_NO_FMOD
#undef USE_FMOD
#if defined(TARGET_OF_IOS) || defined(TARGET_OSX)
#define OF_SOUND_PLAYER_AV_ENGINE
#elif defined(TARGET_WIN32)
#define OF_SOUND_PLAYER_MEDIA_FOUNDATION
#endif
#endif


// check if any soundplayer api is defined from the compiler

//------------------------------------------------ soundplayer
#if !defined(TARGET_NO_SOUND)
#if !defined(OF_SOUND_PLAYER_QUICKTIME) && !defined(OF_SOUND_PLAYER_FMOD) && !defined(OF_SOUND_PLAYER_OPENAL) && !defined(OF_SOUND_PLAYER_EMSCRIPTEN) && !defined(OF_SOUND_PLAYER_AV_ENGINE) && !defined(OF_SOUND_PLAYER_MEDIA_FOUNDATION)
#ifdef TARGET_OF_IOS
#define OF_SOUND_PLAYER_IPHONE
#elif defined(TARGET_LINUX) || defined(TARGET_MINGW)
#define OF_SOUND_PLAYER_OPENAL
#elif defined(TARGET_EMSCRIPTEN)
#define OF_SOUND_PLAYER_EMSCRIPTEN
#elif !defined(TARGET_ANDROID) && (!defined(USE_FMOD) || USE_FMOD)
#define OF_SOUND_PLAYER_FMOD
#endif
#endif

#if defined(USE_FMOD)
#define OF_SOUND_PLAYER_FMOD
#else
#if defined(TARGET_OF_IOS) || defined(TARGET_OSX)
#define OF_SOUND_PLAYER_AV_ENGINE
// #elif defined(TARGET_OF_IOS)
// #define OF_SOUND_PLAYER_IPHONE
#elif defined(TARGET_LINUX) || defined(TARGET_MINGW)
#define OF_SOUND_PLAYER_OPENAL
#elif defined(TARGET_EMSCRIPTEN)
#define OF_SOUND_PLAYER_EMSCRIPTEN
#elif defined(TARGET_WIN32)
#define OF_SOUND_PLAYER_MEDIA_FOUNDATION
#endif
#endif
#endif

//------------------------------------------------ thread local storage
Expand Down
6 changes: 0 additions & 6 deletions libs/openFrameworks/video/ofDirectShowGrabber.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,11 @@
#include "ofVideoBaseTypes.h"
#include "ofPixels.h" // MARK: ofPixels pixels

// comment out this following line, if you'd like to use the
// quicktime capture interface on windows
// if not, we default to videoInput library for
// direct show capture...

#define OF_SWITCH_TO_DSHOW_FOR_WIN_VIDCAP

#ifdef OF_SWITCH_TO_DSHOW_FOR_WIN_VIDCAP
#define OF_VIDEO_CAPTURE_DIRECTSHOW
#else
#define OF_VIDEO_CAPTURE_QUICKTIME
#endif


Expand Down
1 change: 0 additions & 1 deletion libs/openFrameworks/video/ofDirectShowPlayer.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//DirectShowVideo and ofDirectShowPlayer written by Theodore Watson, Jan 2014
//See the cpp file for the DirectShow implementation
//To allow for QuickTime video playback install the K-Lite Mega Codec Pack 10.2

#pragma once
#include "ofVideoBaseTypes.h"
Expand Down
32 changes: 5 additions & 27 deletions libs/openFrameworks/video/ofVideoGrabber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,44 +7,32 @@

// ------------------------------------------------ capture
// check if any video capture system is already defined from the compiler
#if !defined(OF_VIDEO_CAPTURE_GSTREAMER) && !defined(OF_VIDEO_CAPTURE_QUICKTIME) && !defined(OF_VIDEO_CAPTURE_DIRECTSHOW) && !defined(OF_VIDEO_CAPTURE_ANDROID) && !defined(OF_VIDEO_CAPTURE_IOS)
#if !defined(OF_VIDEO_CAPTURE_GSTREAMER) && \
!defined(OF_VIDEO_CAPTURE_DIRECTSHOW) && \
!defined(OF_VIDEO_CAPTURE_ANDROID) && \
!defined(OF_VIDEO_CAPTURE_IOS)
#ifdef TARGET_LINUX
#define OF_VIDEO_CAPTURE_GSTREAMER

#elif defined(TARGET_OSX)
#define OF_VIDEO_CAPTURE_AVF

#elif defined (TARGET_WIN32)
// comment out this following line, if you'd like to use the
// quicktime capture interface on windows
// if not, we default to videoInput library for
// direct show capture...

#define OF_SWITCH_TO_DSHOW_FOR_WIN_VIDCAP

#ifdef OF_SWITCH_TO_DSHOW_FOR_WIN_VIDCAP
#define OF_VIDEO_CAPTURE_DIRECTSHOW
#else
#define OF_VIDEO_CAPTURE_QUICKTIME
#endif
#define OF_VIDEO_CAPTURE_DIRECTSHOW

#elif defined(TARGET_ANDROID)

#define OF_VIDEO_CAPTURE_ANDROID

#elif defined(TARGET_EMSCRIPTEN)

#define OF_VIDEO_CAPTURE_EMSCRIPTEN

#elif defined(TARGET_OF_IOS)

#define OF_VIDEO_CAPTURE_IOS

#endif
#endif



#ifdef TARGET_OF_OSX
#include <ApplicationServices/ApplicationServices.h>
#endif
Expand All @@ -54,16 +42,6 @@
#define OF_VID_GRABBER_TYPE ofxiOSVideoGrabber
#endif

// #ifdef OF_VIDEO_CAPTURE_QUICKTIME
// #include "ofQuickTimeGrabber.h"
// #define OF_VID_GRABBER_TYPE ofQuickTimeGrabber
// #endif

// #ifdef OF_VIDEO_CAPTURE_QTKIT
// #include "ofQTKitGrabber.h"
// #define OF_VID_GRABBER_TYPE ofQTKitGrabber
// #endif

#ifdef OF_VIDEO_CAPTURE_AVF
#include "ofAVFoundationGrabber.h"
#define OF_VID_GRABBER_TYPE ofAVFoundationGrabber
Expand Down
35 changes: 10 additions & 25 deletions libs/openFrameworks/video/ofVideoPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,51 +6,36 @@

//------------------------------------------------ video player
// check if any video player system is already defined from the compiler
#if !defined(OF_VIDEO_PLAYER_GSTREAMER) && !defined(OF_VIDEO_PLAYER_IOS) && !defined(OF_VIDEO_PLAYER_DIRECTSHOW) && !defined(OF_VIDEO_PLAYER_MEDIA_FOUNDATION) && !defined(OF_VIDEO_PLAYER_QUICKTIME) && !defined(OF_VIDEO_PLAYER_AVFOUNDATION) && !defined(OF_VIDEO_PLAYER_EMSCRIPTEN)
#if !defined(OF_VIDEO_PLAYER_GSTREAMER) && \
!defined(OF_VIDEO_PLAYER_IOS) && \
!defined(OF_VIDEO_PLAYER_DIRECTSHOW) && \
!defined(OF_VIDEO_PLAYER_MEDIA_FOUNDATION) && \
!defined(OF_VIDEO_PLAYER_AVFOUNDATION) && \
!defined(OF_VIDEO_PLAYER_EMSCRIPTEN)
#ifdef TARGET_LINUX
#define OF_VIDEO_PLAYER_GSTREAMER
#elif defined(TARGET_ANDROID)
#define OF_VIDEO_PLAYER_ANDROID
#elif defined(TARGET_OF_IOS)
#define OF_VIDEO_PLAYER_IOS
#elif defined(TARGET_WIN32)
#ifdef _MSC_VER //use MF Foundation player for VS as mingw doesn't have needed symbols
#ifdef _MSC_VER //use MF Foundation player for VS as mingw doesn't have needed symbols
#define OF_VIDEO_PLAYER_MEDIA_FOUNDATION
#else
#define OF_VIDEO_PLAYER_DIRECTSHOW
#endif
#elif defined(TARGET_OSX)
//for 10.8 and 10.9 users we use AVFoundation, for 10.7 we use QTKit, for 10.6 users we use QuickTime
#ifndef MAC_OS_X_VERSION_10_7
#define OF_VIDEO_PLAYER_QUICKTIME
#elif !defined(MAC_OS_X_VERSION_10_8)
#define OF_VIDEO_PLAYER_QTKIT
#else
#define OF_VIDEO_PLAYER_AVFOUNDATION
#define OF_VIDEO_PLAYER_DIRECTSHOW
#endif
#elif defined(TARGET_OSX)
#define OF_VIDEO_PLAYER_AVFOUNDATION
#elif defined(TARGET_EMSCRIPTEN)
#define OF_VIDEO_PLAYER_EMSCRIPTEN
#else
#define OF_VIDEO_PLAYER_QUICKTIME
#endif
#endif


#ifdef OF_VIDEO_PLAYER_GSTREAMER
#include "ofGstVideoPlayer.h"
#define OF_VID_PLAYER_TYPE ofGstVideoPlayer
#endif

//#ifdef OF_VIDEO_PLAYER_QUICKTIME
// #include "ofQuickTimePlayer.h"
// #define OF_VID_PLAYER_TYPE ofQuickTimePlayer
//#endif
//
//#ifdef OF_VIDEO_PLAYER_QTKIT
// #include "ofQTKitPlayer.h"
// #define OF_VID_PLAYER_TYPE ofQTKitPlayer
//#endif

#ifdef OF_VIDEO_PLAYER_AVFOUNDATION
#include "ofAVFoundationPlayer.h"
#define OF_VID_PLAYER_TYPE ofAVFoundationPlayer
Expand Down
8 changes: 5 additions & 3 deletions libs/openFrameworksCompiled/project/macos/CoreOF.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,12 @@ OF_CORE_LIBS = $(MISC_FLAGS)
OF_CORE_HEADERS = $(HEADER_OF) $(HEADER_FREEIMAGE) $(HEADER_UTF8) $(HEADER_JSON) $(HEADER_GLM) $(HEADER_TESS2) $(HEADER_CAIRO) $(HEADER_RTAUDIO) $(HEADER_GLFW) $(HEADER_FREETYPE) $(HEADER_FREETYPE2) $(HEADER_CURL) $(HEADER_URIPARSER) $(HEADER_PUGIXML) $(HEADER_GLEW) $(HEADER_CURL) $(HEADER_OPENSSL) $(HEADER_BROTLI)

OF_CORE_FRAMEWORKS = -framework Accelerate -framework AGL -framework AppKit -framework ApplicationServices -framework AudioToolbox -framework AVFoundation -framework Cocoa -framework CoreAudio -framework CoreFoundation -framework CoreMedia -framework CoreServices -framework CoreVideo -framework IOKit -framework OpenGL -framework QuartzCore -framework Security
//-framework AudioToolbox -framework Accelerate -framework AVFoundation -framework CoreAudio -framework CoreGraphics -framework CoreLocation -framework CoreMotion -framework CoreMedia -framework CoreVideo -framework Foundation -framework GameController -framework GLKit -framework MapKit -framework OpenAL -framework OpenGLES -framework UIKit -framework Security -framework QuartzCore -framework CoreHaptics
//


//FMOD can be enabled in OF Core by uncommenting this block
//USE_FMOD=1
//USER_PREPROCESSOR_DEFINITIONS=USE_FMOD=1 $(inherited)
//OF_CORE_HEADERS = $(OF_PATH)/libs/fmod/include $(inherited)
//OF_CORE_LIBS=$(OF_PATH)/libs/fmod/lib/macos/libfmod.dylib $(inherited)

ALWAYS_SEARCH_USER_PATHS = NO
DISABLE_MANUAL_TARGET_ORDER_BUILD_WARNING = YES
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,11 +268,10 @@ PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/openFrameworks/app/ofAppEGLWindow.cp

# third party

# ifeq ($(USE_FMOD),0)
ifeq ($(USE_FMOD),0)
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/fmod/%
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/openFrameworks/sound/ofFmodSoundPlayer.cpp
PLATFORM_CFLAGS += -DUSE_FMOD=0
# endif
endif

##########################################################################################
# PLATFORM HEADER SEARCH PATHS
Expand Down Expand Up @@ -428,10 +427,10 @@ afterplatform: $(TARGET_NAME)
@echo TARGET=$(TARGET)
@mv $(TARGET) bin/$(BIN_NAME).app/Contents/MacOS

# ifneq ($(USE_FMOD),0)
# @mkdir -p bin/$(BIN_NAME).app/Contents/Frameworks
# @cp $(OF_LIBS_PATH)/*/lib/$(PLATFORM_LIB_SUBPATH)/*.$(SHARED_LIB_EXTENSION) bin/$(BIN_NAME).app/Contents/Frameworks/;
# endif
ifneq ($(USE_FMOD),0)
@mkdir -p bin/$(BIN_NAME).app/Contents/Frameworks
@cp $(OF_LIBS_PATH)/*/lib/$(PLATFORM_LIB_SUBPATH)/*.$(SHARED_LIB_EXTENSION) bin/$(BIN_NAME).app/Contents/Frameworks/;
endif


@echo
Expand Down
69 changes: 38 additions & 31 deletions libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,49 +6,56 @@ CLANG_C_LANGUAGE_STANDARD = c17
MACOSX_DEPLOYMENT_TARGET = 10.15


HEADER_OF = "$(OF_PATH)/libs/openFrameworks/**"
HEADER_FREETYPE = "$(OF_PATH)/libs/freetype/include"
HEADER_FREETYPE2 = "$(OF_PATH)/libs/freetype/include/freetype2"
//HEADER_FMOD = "$(OF_PATH)/libs/fmod/include"
HEADER_GLEW = "$(OF_PATH)/libs/glew/include"
HEADER_FREEIMAGE = "$(OF_PATH)/libs/FreeImage/include"
HEADER_TESS2 = "$(OF_PATH)/libs/tess2/include"
HEADER_CAIRO = "$(OF_PATH)/libs/cairo/include"
HEADER_RTAUDIO = "$(OF_PATH)/libs/rtAudio/include"
HEADER_GLFW = "$(OF_PATH)/libs/glfw/include"
HEADER_UTF8 = "$(OF_PATH)/libs/utf8/include"
HEADER_JSON = "$(OF_PATH)/libs/json/include"
HEADER_GLM = "$(OF_PATH)/libs/glm/include"
HEADER_BROTLI = "$(OF_PATH)/libs/brotli/include"
HEADER_CURL = "$(OF_PATH)/libs/curl/include"
HEADER_SSL = "$(OF_PATH)/libs/openssl/include"
HEADER_URIPARSER = "$(OF_PATH)/libs/uriparser/include"
HEADER_PUGIXML = "$(OF_PATH)/libs/pugixml/include"
HEADER_OF = $(OF_PATH)/libs/openFrameworks/**
HEADER_FREETYPE = $(OF_PATH)/libs/freetype/include
HEADER_FREETYPE2 = $(OF_PATH)/libs/freetype/include/freetype2
//HEADER_FMOD = $(OF_PATH)/libs/fmod/include
HEADER_GLEW = $(OF_PATH)/libs/glew/include
HEADER_FREEIMAGE = $(OF_PATH)/libs/FreeImage/include
HEADER_TESS2 = $(OF_PATH)/libs/tess2/include
HEADER_CAIRO = $(OF_PATH)/libs/cairo/include
HEADER_RTAUDIO = $(OF_PATH)/libs/rtAudio/include
HEADER_GLFW = $(OF_PATH)/libs/glfw/include
HEADER_UTF8 = $(OF_PATH)/libs/utf8/include
HEADER_JSON = $(OF_PATH)/libs/json/include
HEADER_GLM = $(OF_PATH)/libs/glm/include
HEADER_BROTLI = $(OF_PATH)/libs/brotli/include
HEADER_CURL = $(OF_PATH)/libs/curl/include
HEADER_SSL = $(OF_PATH)/libs/openssl/include
HEADER_URIPARSER = $(OF_PATH)/libs/uriparser/include
HEADER_PUGIXML = $(OF_PATH)/libs/pugixml/include

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious about the quote removal - is there any downside to removing?

//------- Libraries
LIB_OF_RELEASE = "$(OF_PATH)/libs/openFrameworksCompiled/lib/osx/openFrameworks.a"
LIB_OF_DEBUG = "$(OF_PATH)/libs/openFrameworksCompiled/lib/osx/openFrameworksDebug.a"

//LIB_FMOD = "$(OF_PATH)/libs/fmod/lib/macos/libfmod.dylib"

//LIB_GLFW = "$(OF_PATH)/libs/glfw/lib/osx/glfw3.a"
//LIB_FREEIMAGE = "$(OF_PATH)/libs/FreeImage/lib/osx/freeimage.a"
//LIB_FREETYPE = "$(OF_PATH)/libs/freetype/lib/osx/freetype.a"
//LIB_GLEW = "$(OF_PATH)/libs/glew/lib/osx/glew.a"
//LIB_RTAUDIO = "$(OF_PATH)/libs/rtAudio/lib/osx/rtaudio.a"
//LIB_TESS = "$(OF_PATH)/libs/tess2/lib/osx/tess2.a"
//LIB_CAIRO1 = "$(OF_PATH)/libs/cairo/lib/osx/cairo-script-interpreter.a"
//LIB_CAIRO2 = "$(OF_PATH)/libs/cairo/lib/osx/cairo.a"
//LIB_CAIRO3 = "$(OF_PATH)/libs/cairo/lib/osx/pixman-1.a"
//LIB_FMOD = $(OF_PATH)/libs/fmod/lib/macos/libfmod.dylib

//LIB_GLFW = $(OF_PATH)/libs/glfw/lib/osx/glfw3.a
//LIB_FREEIMAGE = $(OF_PATH)/libs/FreeImage/lib/osx/freeimage.a
//LIB_FREETYPE = $(OF_PATH)/libs/freetype/lib/osx/freetype.a
//LIB_GLEW = $(OF_PATH)/libs/glew/lib/osx/glew.a
//LIB_RTAUDIO = $(OF_PATH)/libs/rtAudio/lib/osx/rtaudio.a
//LIB_TESS = $(OF_PATH)/libs/tess2/lib/osx/tess2.a
//LIB_CAIRO1 = $(OF_PATH)/libs/cairo/lib/osx/cairo-script-interpreter.a
//LIB_CAIRO2 = $(OF_PATH)/libs/cairo/lib/osx/cairo.a
//LIB_CAIRO3 = $(OF_PATH)/libs/cairo/lib/osx/pixman-1.a
//LIB_CURL = "-lcurl"
//LIB_URIPARSER = "$(OF_PATH)/libs/uriparser/lib/osx/uriparser.a"
//LIB_PUGIXML = "$(OF_PATH)/libs/pugixml/lib/osx/pugixml.a"
//LIB_URIPARSER = $(OF_PATH)/libs/uriparser/lib/osx/uriparser.a
//LIB_PUGIXML = $(OF_PATH)/libs/pugixml/lib/osx/pugixml.a




OF_CORE_HEADERS = $(HEADER_OF) $(HEADER_FREETYPE) $(HEADER_FREETYPE2) $(HEADER_GLEW) $(HEADER_FREEIMAGE) $(HEADER_TESS2) $(HEADER_CAIRO) $(HEADER_RTAUDIO) $(HEADER_GLFW) $(HEADER_UTF8) $(HEADER_JSON) $(HEADER_GLM) $(HEADER_CURL) ${HEADER_SSL} $(HEADER_URIPARSER) $(HEADER_PUGIXML) ${HEADER_BROTLI}

OF_CORE_FRAMEWORKS = -framework Accelerate -framework AppKit -framework ApplicationServices -framework AudioToolbox -framework AVFoundation -framework Cocoa -framework CoreAudio -framework CoreFoundation -framework CoreMedia -framework CoreServices -framework CoreVideo -framework Foundation -framework IOKit -framework OpenGL -framework QuartzCore -framework Security -framework SystemConfiguration -framework Metal

// FMOD can be enabled in OF Core by uncommenting this block
//USE_FMOD=1
//USER_PREPROCESSOR_DEFINITIONS=USE_FMOD=1 $(inherited)
//OF_CORE_HEADERS = $(OF_PATH)/libs/fmod/include $(inherited)
//OF_CORE_LIBS=$(OF_PATH)/libs/fmod/lib/macos/libfmod.dylib $(inherited)


ALWAYS_SEARCH_USER_PATHS = NO
Expand Down
Loading
Loading