diff --git a/AsyncDisplayKit.xcodeproj/project.pbxproj b/AsyncDisplayKit.xcodeproj/project.pbxproj index 7566729fb7..ecc2761f62 100644 --- a/AsyncDisplayKit.xcodeproj/project.pbxproj +++ b/AsyncDisplayKit.xcodeproj/project.pbxproj @@ -2617,6 +2617,7 @@ "AS_USE_ASSETS_LIBRARY=1", "AS_USE_MAPKIT=1", "AS_USE_PHOTOS=1", + "AS_USE_VIDEO=1", ); GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; diff --git a/Source/ASVideoNode.h b/Source/ASVideoNode.h index 69df055367..429185b4a4 100644 --- a/Source/ASVideoNode.h +++ b/Source/ASVideoNode.h @@ -7,8 +7,11 @@ // Licensed under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0 // +#import #import +#if AS_USE_VIDEO + @class AVAsset, AVPlayer, AVPlayerLayer, AVPlayerItem, AVVideoComposition, AVAudioMix; @protocol ASVideoNodeDelegate; @@ -164,3 +167,5 @@ NS_ASSUME_NONNULL_BEGIN @end NS_ASSUME_NONNULL_END + +#endif diff --git a/Source/ASVideoNode.mm b/Source/ASVideoNode.mm index fe368a12ca..654ce9384e 100644 --- a/Source/ASVideoNode.mm +++ b/Source/ASVideoNode.mm @@ -7,11 +7,14 @@ // Licensed under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0 // +#import + +#if AS_USE_VIDEO + #import #import #import #import -#import #import #import #import @@ -856,3 +859,5 @@ static NSString * const kRate = @"rate"; } @end + +#endif diff --git a/Source/ASVideoPlayerNode.h b/Source/ASVideoPlayerNode.h index 07e613a608..3fbef2fe5a 100644 --- a/Source/ASVideoPlayerNode.h +++ b/Source/ASVideoPlayerNode.h @@ -7,6 +7,10 @@ // Licensed under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0 // +#import + +#if AS_USE_VIDEO + #if TARGET_OS_IOS #import #import @@ -217,3 +221,5 @@ NS_ASSUME_NONNULL_BEGIN @end NS_ASSUME_NONNULL_END #endif // TARGET_OS_IOS + +#endif diff --git a/Source/ASVideoPlayerNode.mm b/Source/ASVideoPlayerNode.mm index e71cdbc4f7..0f217b2289 100644 --- a/Source/ASVideoPlayerNode.mm +++ b/Source/ASVideoPlayerNode.mm @@ -7,12 +7,11 @@ // Licensed under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0 // -#import - -#if TARGET_OS_IOS - #import +#if AS_USE_VIDEO +#if TARGET_OS_IOS + #import #import @@ -1016,3 +1015,5 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext; @end #endif // TARGET_OS_IOS + +#endif diff --git a/Source/AsyncDisplayKit.h b/Source/AsyncDisplayKit.h index 1445e07832..eafc03f861 100644 --- a/Source/AsyncDisplayKit.h +++ b/Source/AsyncDisplayKit.h @@ -21,11 +21,12 @@ #import #import #import +#import #import #import + #import #import -#import #import #import diff --git a/Source/Base/ASAvailability.h b/Source/Base/ASAvailability.h index f420ccfbbf..6cb410859d 100644 --- a/Source/Base/ASAvailability.h +++ b/Source/Base/ASAvailability.h @@ -17,6 +17,11 @@ #define AS_TLS_AVAILABLE 1 #endif +// This needs to stay in sync with Weaver +#ifndef AS_USE_VIDEO + #define AS_USE_VIDEO 0 +#endif + #ifndef AS_USE_PHOTOS #define AS_USE_PHOTOS 0 #endif diff --git a/Texture.podspec b/Texture.podspec index fa34201dbd..a56a8dde04 100644 --- a/Texture.podspec +++ b/Texture.podspec @@ -16,10 +16,6 @@ Pod::Spec.new do |spec| # Subspecs spec.subspec 'Core' do |core| - - # These will be lowered into subspecs in the future. Only here for ASVideoNode. - core.frameworks = ['AVFoundation', 'CoreMedia'] - core.compiler_flags = '-fno-exceptions -Wno-implicit-retain-self' core.public_header_files = [ 'Source/*.h', @@ -59,6 +55,12 @@ Pod::Spec.new do |spec| yoga.dependency 'Texture/Core' end + spec.subspec 'Video' do |video| + video.frameworks = ['AVFoundation', 'CoreMedia'] + video.xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) AS_USE_VIDEO=1' } + video.dependency 'Texture/Core' + end + spec.subspec 'MapKit' do |map| map.frameworks = ['CoreLocation', 'MapKit'] map.xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) AS_USE_MAPKIT=1' } @@ -79,7 +81,7 @@ Pod::Spec.new do |spec| # Include these by default for backwards compatibility. # This will change in 3.0. - spec.default_subspecs = 'PINRemoteImage', 'MapKit', 'AssetsLibrary', 'Photos' + spec.default_subspecs = 'Core', 'PINRemoteImage', 'Video', 'MapKit', 'AssetsLibrary', 'Photos' spec.social_media_url = 'https://twitter.com/TextureiOS' spec.library = 'c++' diff --git a/examples/ASDKgram/Podfile b/examples/ASDKgram/Podfile index 4aebd04935..8611fa11f2 100644 --- a/examples/ASDKgram/Podfile +++ b/examples/ASDKgram/Podfile @@ -4,5 +4,6 @@ target 'Sample' do pod 'Texture/IGListKit', :path => '../..' pod 'Texture/PINRemoteImage', :path => '../..' pod 'Texture/Yoga', :path => '../..' - pod 'Weaver' + pod 'Texture/Video', :path => '../..' + pod 'Weaver', :git => 'git@github.com:TextureGroup/Weaver.git', :branch => 'master' end