Skip to content

Commit cd83d22

Browse files
committed
incorporate OF PR openframeworks#8184, cleanup make and other stuff
1 parent 8e41f9d commit cd83d22

File tree

88 files changed

+59
-8156
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+59
-8156
lines changed

libs/openFrameworks/app/ofAppRunner.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,6 @@ void ofSetupOpenGL(const shared_ptr<ofWindow> & windowPtr, int w, int h, ofWindo
5050
#include "ofGstUtils.h"
5151
#endif
5252

53-
// adding this for vc2010 compile: error C3861: 'closeQuicktime': identifier not found
54-
#if defined(OF_VIDEO_CAPTURE_QUICKTIME) || defined(OF_VIDEO_PLAYER_QUICKTIME)
55-
#include "ofQtUtils.h"
56-
#endif
57-
5853
#if defined(TARGET_WIN32)
5954
#include <mmsystem.h>
6055
#endif

libs/openFrameworks/utils/ofConstants.h

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ enum ofTargetPlatform{
126126
#define GLEW_NO_GLU
127127
#define TARGET_GLFW_WINDOW
128128
#define OF_CAIRO
129-
#include "GL/glew.h"
130-
#include "GL/wglew.h"
129+
#include <GL/glew.h>
130+
#include <GL/wglew.h>
131131
#define OF_RTAUDIO
132132
#define __WINDOWS_DS__
133133
#define __WINDOWS_WASAPI__
@@ -303,16 +303,20 @@ typedef TESSindex ofIndexType;
303303
// check if any soundplayer api is defined from the compiler
304304

305305
#if !defined(TARGET_NO_SOUND)
306-
#if !defined(OF_SOUND_PLAYER_FMOD) && !defined(OF_SOUND_PLAYER_OPENAL) && !defined(OF_SOUND_PLAYER_EMSCRIPTEN) && !defined(OF_SOUND_PLAYER_MEDIA_FOUNDATION)
307-
#ifdef TARGET_OF_IOS
308-
#define OF_SOUND_PLAYER_IPHONE
309-
#elif defined(TARGET_LINUX) || defined(TARGET_MINGW)
310-
#define OF_SOUND_PLAYER_OPENAL
311-
#elif defined(TARGET_EMSCRIPTEN)
312-
#define OF_SOUND_PLAYER_EMSCRIPTEN
313-
#elif !defined(TARGET_ANDROID) && !defined(TARGET_OF_MAC)
314-
// #define OF_SOUND_PLAYER_FMOD
315-
#endif
306+
#if defined(USE_FMOD)
307+
#define OF_SOUND_PLAYER_FMOD
308+
#else
309+
#if defined(TARGET_OF_IOS) || defined(TARGET_OSX)
310+
#define OF_SOUND_PLAYER_AV_ENGINE
311+
// #elif defined(TARGET_OF_IOS)
312+
// #define OF_SOUND_PLAYER_IPHONE
313+
#elif defined(TARGET_LINUX) || defined(TARGET_MINGW)
314+
#define OF_SOUND_PLAYER_OPENAL
315+
#elif defined(TARGET_EMSCRIPTEN)
316+
#define OF_SOUND_PLAYER_EMSCRIPTEN
317+
#elif defined(TARGET_WIN32)
318+
#define OF_SOUND_PLAYER_MEDIA_FOUNDATION
319+
#endif
316320
#endif
317321
#endif
318322

libs/openFrameworks/video/ofDirectShowGrabber.h

Lines changed: 12 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,11 @@
66
#include "ofVideoBaseTypes.h"
77
#include "ofPixels.h" // MARK: ofPixels pixels
88

9-
// comment out this following line, if you'd like to use the
10-
// quicktime capture interface on windows
11-
// if not, we default to videoInput library for
12-
// direct show capture...
13-
14-
#define OF_SWITCH_TO_DSHOW_FOR_WIN_VIDCAP
15-
16-
#ifdef OF_SWITCH_TO_DSHOW_FOR_WIN_VIDCAP
9+
// #define OF_SWITCH_TO_DSHOW_FOR_WIN_VIDCAP
10+
// #ifdef OF_SWITCH_TO_DSHOW_FOR_WIN_VIDCAP
1711
#define OF_VIDEO_CAPTURE_DIRECTSHOW
18-
#else
19-
#define OF_VIDEO_CAPTURE_QUICKTIME
20-
#endif
21-
22-
23-
#ifdef OF_VIDEO_CAPTURE_DIRECTSHOW
2412
#include <videoInput.h>
25-
#endif
26-
13+
// #endif
2714

2815
class ofDirectShowGrabber : public ofBaseVideoGrabber{
2916

@@ -39,16 +26,16 @@ class ofDirectShowGrabber : public ofBaseVideoGrabber{
3926
bool isInitialized() const;
4027

4128
bool setPixelFormat(ofPixelFormat pixelFormat);
42-
ofPixelFormat getPixelFormat() const;
29+
ofPixelFormat getPixelFormat() const;
4330

4431
ofPixels & getPixels();
4532
const ofPixels & getPixels() const;
46-
33+
4734
void close();
4835
void clearMemory();
4936

5037
void videoSettings();
51-
38+
5239
float getWidth() const;
5340
float getHeight() const;
5441

@@ -57,24 +44,23 @@ class ofDirectShowGrabber : public ofBaseVideoGrabber{
5744
void setDesiredFrameRate(int framerate);
5845

5946

60-
47+
6148

6249
protected:
63-
50+
6451
bool bChooseDevice;
6552
int deviceID;
6653
bool bVerbose;
6754
bool bGrabberInited;
6855
ofPixels pixels;
6956
int attemptFramerate;
70-
bool bIsFrameNew;
71-
72-
int width, height;
57+
bool bIsFrameNew;
58+
59+
int width, height;
7360
//--------------------------------- directshow
7461
#ifdef OF_VIDEO_CAPTURE_DIRECTSHOW
7562
int device;
7663
videoInput VI;
7764
bool bDoWeNeedToResize;
78-
#endif
65+
#endif
7966
};
80-

libs/openFrameworks/video/ofDirectShowPlayer.h

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
//DirectShowVideo and ofDirectShowPlayer written by Theodore Watson, Jan 2014
2-
//See the cpp file for the DirectShow implementation
3-
//To allow for QuickTime video playback install the K-Lite Mega Codec Pack 10.2
2+
//See the cpp file for the DirectShow implementation
43

5-
#pragma once
4+
#pragma once
65
#include "ofVideoBaseTypes.h"
76

87
template<typename T>
98
class ofPixels_;
109

1110
typedef ofPixels_<unsigned char> ofPixels;
1211

13-
class DirectShowVideo;
12+
class DirectShowVideo;
1413

1514
class ofDirectShowPlayer : public ofBaseVideoPlayer{
1615
public:
@@ -24,41 +23,41 @@ class ofDirectShowPlayer : public ofBaseVideoPlayer{
2423
void update();
2524

2625
void close();
27-
26+
2827
void play();
29-
void stop();
30-
28+
void stop();
29+
3130
bool isFrameNew() const;
3231

3332
const ofPixels & getPixels() const;
3433
ofPixels & getPixels();
35-
34+
3635
float getWidth() const;
3736
float getHeight() const;
38-
37+
3938
bool isPaused() const;
4039
bool isLoaded() const;
4140
bool isPlaying() const;
42-
41+
4342
bool setPixelFormat(ofPixelFormat pixelFormat);
4443
ofPixelFormat getPixelFormat() const;
4544

4645
float getPosition() const;
4746
float getSpeed() const;
4847
float getDuration() const;
4948
bool getIsMovieDone() const;
50-
49+
5150
void setPaused(bool bPause);
5251
void setPosition(float pct);
5352
void setVolume(float volume); // 0..1
5453
void setLoopState(ofLoopType state);
5554
void setSpeed(float speed);
5655
void setFrame(int frame); // frame 0 = first frame...
57-
56+
5857
int getCurrentFrame() const;
5958
int getTotalNumFrames() const;
6059
ofLoopType getLoopState() const;
61-
60+
6261
void firstFrame();
6362
void nextFrame();
6463
void previousFrame();

libs/openFrameworks/video/ofVideoGrabber.cpp

Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7,39 +7,27 @@
77

88
// ------------------------------------------------ capture
99
// check if any video capture system is already defined from the compiler
10-
#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)
10+
#if !defined(OF_VIDEO_CAPTURE_GSTREAMER) && \
11+
!defined(OF_VIDEO_CAPTURE_DIRECTSHOW) && \
12+
!defined(OF_VIDEO_CAPTURE_ANDROID) && \
13+
!defined(OF_VIDEO_CAPTURE_IOS)
14+
1115
#ifdef TARGET_LINUX
1216
#define OF_VIDEO_CAPTURE_GSTREAMER
13-
1417
#elif defined(TARGET_OSX)
1518
#define OF_VIDEO_CAPTURE_AVF
16-
1719
#elif defined (TARGET_WIN32)
18-
// comment out this following line, if you'd like to use the
19-
// quicktime capture interface on windows
20-
// if not, we default to videoInput library for
21-
// direct show capture...
22-
23-
#define OF_SWITCH_TO_DSHOW_FOR_WIN_VIDCAP
24-
25-
#ifdef OF_SWITCH_TO_DSHOW_FOR_WIN_VIDCAP
26-
#define OF_VIDEO_CAPTURE_DIRECTSHOW
27-
#else
28-
#define OF_VIDEO_CAPTURE_QUICKTIME
29-
#endif
20+
// #define OF_SWITCH_TO_DSHOW_FOR_WIN_VIDCAP
21+
// #ifdef OF_SWITCH_TO_DSHOW_FOR_WIN_VIDCAP
22+
#define OF_VIDEO_CAPTURE_DIRECTSHOW
23+
// #endif
3024

3125
#elif defined(TARGET_ANDROID)
32-
3326
#define OF_VIDEO_CAPTURE_ANDROID
34-
3527
#elif defined(TARGET_EMSCRIPTEN)
36-
3728
#define OF_VIDEO_CAPTURE_EMSCRIPTEN
38-
3929
#elif defined(TARGET_OF_IOS)
40-
4130
#define OF_VIDEO_CAPTURE_IOS
42-
4331
#endif
4432
#endif
4533

@@ -54,16 +42,6 @@
5442
#define OF_VID_GRABBER_TYPE ofxiOSVideoGrabber
5543
#endif
5644

57-
// #ifdef OF_VIDEO_CAPTURE_QUICKTIME
58-
// #include "ofQuickTimeGrabber.h"
59-
// #define OF_VID_GRABBER_TYPE ofQuickTimeGrabber
60-
// #endif
61-
62-
// #ifdef OF_VIDEO_CAPTURE_QTKIT
63-
// #include "ofQTKitGrabber.h"
64-
// #define OF_VID_GRABBER_TYPE ofQTKitGrabber
65-
// #endif
66-
6745
#ifdef OF_VIDEO_CAPTURE_AVF
6846
#include "ofAVFoundationGrabber.h"
6947
#define OF_VID_GRABBER_TYPE ofAVFoundationGrabber

libs/openFrameworks/video/ofVideoPlayer.cpp

Lines changed: 10 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -6,64 +6,29 @@
66

77
//------------------------------------------------ video player
88
// check if any video player system is already defined from the compiler
9-
#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)
10-
#ifdef TARGET_LINUX
11-
#define OF_VIDEO_PLAYER_GSTREAMER
12-
#elif defined(TARGET_ANDROID)
13-
#define OF_VIDEO_PLAYER_ANDROID
14-
#elif defined(TARGET_OF_IOS)
15-
#define OF_VIDEO_PLAYER_IOS
16-
#elif defined(TARGET_WIN32)
17-
#ifdef _MSC_VER //use MF Foundation player for VS as mingw doesn't have needed symbols
18-
#define OF_VIDEO_PLAYER_MEDIA_FOUNDATION
19-
#else
20-
#define OF_VIDEO_PLAYER_DIRECTSHOW
21-
#endif
22-
#elif defined(TARGET_OSX)
23-
//for 10.8 and 10.9 users we use AVFoundation, for 10.7 we use QTKit, for 10.6 users we use QuickTime
24-
#ifndef MAC_OS_X_VERSION_10_7
25-
#define OF_VIDEO_PLAYER_QUICKTIME
26-
#elif !defined(MAC_OS_X_VERSION_10_8)
27-
#define OF_VIDEO_PLAYER_QTKIT
28-
#else
29-
#define OF_VIDEO_PLAYER_AVFOUNDATION
30-
#endif
31-
#elif defined(TARGET_EMSCRIPTEN)
32-
#define OF_VIDEO_PLAYER_EMSCRIPTEN
33-
#else
34-
#define OF_VIDEO_PLAYER_QUICKTIME
35-
#endif
36-
#endif
37-
9+
#if !defined(OF_VIDEO_PLAYER_GSTREAMER) && \
10+
!defined(OF_VIDEO_PLAYER_IOS) && \
11+
!defined(OF_VIDEO_PLAYER_DIRECTSHOW) && \
12+
!defined(OF_VIDEO_PLAYER_MEDIA_FOUNDATION) && \
13+
!defined(OF_VIDEO_PLAYER_AVFOUNDATION) && \
14+
!defined(OF_VIDEO_PLAYER_EMSCRIPTEN)
3815

39-
//------------------------------------------------ video player
40-
// check if any video player system is already defined from the compiler
41-
#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)
4216
#ifdef TARGET_LINUX
4317
#define OF_VIDEO_PLAYER_GSTREAMER
4418
#elif defined(TARGET_ANDROID)
4519
#define OF_VIDEO_PLAYER_ANDROID
4620
#elif defined(TARGET_OF_IOS)
4721
#define OF_VIDEO_PLAYER_IOS
4822
#elif defined(TARGET_WIN32)
49-
#ifdef _MSC_VER //use MF Foundation player for VS as mingw doesn't have needed symbols
23+
#ifdef _MSC_VER //use MF Foundation player for VS as mingw doesn't have needed symbols
5024
#define OF_VIDEO_PLAYER_MEDIA_FOUNDATION
51-
#else
52-
#define OF_VIDEO_PLAYER_DIRECTSHOW
53-
#endif
54-
#elif defined(TARGET_OSX)
55-
//for 10.8 and 10.9 users we use AVFoundation, for 10.7 we use QTKit, for 10.6 users we use QuickTime
56-
#ifndef MAC_OS_X_VERSION_10_7
57-
#define OF_VIDEO_PLAYER_QUICKTIME
58-
#elif !defined(MAC_OS_X_VERSION_10_8)
59-
#define OF_VIDEO_PLAYER_QTKIT
6025
#else
61-
#define OF_VIDEO_PLAYER_AVFOUNDATION
26+
#define OF_VIDEO_PLAYER_DIRECTSHOW
6227
#endif
28+
#elif defined(TARGET_OSX)
29+
#define OF_VIDEO_PLAYER_AVFOUNDATION
6330
#elif defined(TARGET_EMSCRIPTEN)
6431
#define OF_VIDEO_PLAYER_EMSCRIPTEN
65-
#else
66-
#define OF_VIDEO_PLAYER_QUICKTIME
6732
#endif
6833
#endif
6934

@@ -73,16 +38,6 @@
7338
#define OF_VID_PLAYER_TYPE ofGstVideoPlayer
7439
#endif
7540

76-
//#ifdef OF_VIDEO_PLAYER_QUICKTIME
77-
// #include "ofQuickTimePlayer.h"
78-
// #define OF_VID_PLAYER_TYPE ofQuickTimePlayer
79-
//#endif
80-
//
81-
//#ifdef OF_VIDEO_PLAYER_QTKIT
82-
// #include "ofQTKitPlayer.h"
83-
// #define OF_VID_PLAYER_TYPE ofQTKitPlayer
84-
//#endif
85-
8641
#ifdef OF_VIDEO_PLAYER_AVFOUNDATION
8742
#include "ofAVFoundationPlayer.h"
8843
#define OF_VID_PLAYER_TYPE ofAVFoundationPlayer

libs/openFrameworksCompiled/lib/android/.gitkeep

Whitespace-only changes.

libs/openFrameworksCompiled/lib/ios/.gitkeep

Whitespace-only changes.

libs/openFrameworksCompiled/lib/linux/.gitkeep

Whitespace-only changes.

libs/openFrameworksCompiled/lib/linux64/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)