Skip to content

Commit

Permalink
Fixed build on old OS X
Browse files Browse the repository at this point in the history
  • Loading branch information
grishka committed Mar 12, 2019
1 parent d812530 commit b6ac291
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 17 deletions.
31 changes: 18 additions & 13 deletions libtgvoip.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,6 @@
'<(tgvoip_src_loc)/os/darwin/AudioUnitIO.h',
'<(tgvoip_src_loc)/os/darwin/DarwinSpecific.mm',
'<(tgvoip_src_loc)/os/darwin/DarwinSpecific.h',
'<(tgvoip_src_loc)/os/darwin/TGVVideoRenderer.mm',
'<(tgvoip_src_loc)/os/darwin/TGVVideoRenderer.h',
'<(tgvoip_src_loc)/os/darwin/TGVVideoSource.mm',
'<(tgvoip_src_loc)/os/darwin/TGVVideoSource.h',
'<(tgvoip_src_loc)/os/darwin/VideoToolboxEncoderSource.mm',
'<(tgvoip_src_loc)/os/darwin/VideoToolboxEncoderSource.h',
'<(tgvoip_src_loc)/os/darwin/SampleBufferDisplayLayerRenderer.mm',
'<(tgvoip_src_loc)/os/darwin/SampleBufferDisplayLayerRenderer.h',

# Linux
'<(tgvoip_src_loc)/os/linux/AudioInputALSA.cpp',
Expand Down Expand Up @@ -780,6 +772,9 @@
'/usr/local/macold/include/c++/v1',
'<(DEPTH)/../../../Libraries/macold/openssl/include',
],
'defines': [
'TARGET_OSX32',
],
}, {
'xcode_settings': {
'MACOSX_DEPLOYMENT_TARGET': '10.8',
Expand All @@ -788,13 +783,23 @@
'include_dirs': [
'<(DEPTH)/../../../Libraries/openssl/include',
],
'direct_dependent_settings': {
'linkflags': [
'-framework VideoToolbox',
],
},
'sources': [
'<(tgvoip_src_loc)/os/darwin/TGVVideoRenderer.mm',
'<(tgvoip_src_loc)/os/darwin/TGVVideoRenderer.h',
'<(tgvoip_src_loc)/os/darwin/TGVVideoSource.mm',
'<(tgvoip_src_loc)/os/darwin/TGVVideoSource.h',
'<(tgvoip_src_loc)/os/darwin/VideoToolboxEncoderSource.mm',
'<(tgvoip_src_loc)/os/darwin/VideoToolboxEncoderSource.h',
'<(tgvoip_src_loc)/os/darwin/SampleBufferDisplayLayerRenderer.mm',
'<(tgvoip_src_loc)/os/darwin/SampleBufferDisplayLayerRenderer.h',
],
}]
],
'direct_dependent_settings': {
'linkflags': [
'-framework VideoToolbox',
],
},
},
],
[
Expand Down
4 changes: 2 additions & 2 deletions video/VideoRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#ifdef __ANDROID__
#include "../os/android/VideoRendererAndroid.h"
#elif defined(__APPLE__)
#elif defined(__APPLE__) && !defined(TARGET_OSX32)
#include "../os/darwin/SampleBufferDisplayLayerRenderer.h"
#endif

Expand All @@ -22,7 +22,7 @@ std::vector<uint32_t> tgvoip::video::VideoRenderer::GetAvailableDecoders(){
int tgvoip::video::VideoRenderer::GetMaximumResolution(){
#ifdef __ANDROID__
return VideoRendererAndroid::maxResolution;
#elif defined(__APPLE__)
#elif defined(__APPLE__) && !defined(TARGET_OSX32)
return SampleBufferDisplayLayerRenderer::GetMaximumResolution();
#endif
return 0;
Expand Down
4 changes: 2 additions & 2 deletions video/VideoSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#ifdef __ANDROID__
#include "../os/android/VideoSourceAndroid.h"
#elif defined(__APPLE__)
#elif defined(__APPLE__) && !defined(TARGET_OSX32)
#include "../os/darwin/VideoToolboxEncoderSource.h"
#endif

Expand Down Expand Up @@ -37,7 +37,7 @@ std::string VideoSource::GetErrorDescription(){
std::vector<uint32_t> VideoSource::GetAvailableEncoders(){
#ifdef __ANDROID__
return VideoSourceAndroid::availableEncoders;
#elif defined(__APPLE__)
#elif defined(__APPLE__) && !defined(TARGET_OSX32)
return VideoToolboxEncoderSource::GetAvailableEncoders();
#endif
return std::vector<uint32_t>();
Expand Down

0 comments on commit b6ac291

Please sign in to comment.