From b99120b660330746d339cf3458ddf690da6c2b17 Mon Sep 17 00:00:00 2001 From: Khaled Alshehri <39571180+i5xx@users.noreply.github.com> Date: Wed, 8 Aug 2018 02:17:00 +0300 Subject: [PATCH] Add files via upload --- .../SCManagedCapturerARImageCaptureProvider.h | 23 +++++++ Lens/SCManagedCapturerGLViewManagerAPI.h | 27 ++++++++ .../SCManagedCapturerLSAComponentTrackerAPI.h | 19 ++++++ Lens/SCManagedCapturerLensAPI.h | 67 +++++++++++++++++++ Lens/SCManagedCapturerLensAPIProvider.h | 20 ++++++ 5 files changed, 156 insertions(+) create mode 100644 Lens/SCManagedCapturerARImageCaptureProvider.h create mode 100644 Lens/SCManagedCapturerGLViewManagerAPI.h create mode 100644 Lens/SCManagedCapturerLSAComponentTrackerAPI.h create mode 100644 Lens/SCManagedCapturerLensAPI.h create mode 100644 Lens/SCManagedCapturerLensAPIProvider.h diff --git a/Lens/SCManagedCapturerARImageCaptureProvider.h b/Lens/SCManagedCapturerARImageCaptureProvider.h new file mode 100644 index 0000000..12e5839 --- /dev/null +++ b/Lens/SCManagedCapturerARImageCaptureProvider.h @@ -0,0 +1,23 @@ +// +// SCManagedCapturerARImageCaptureProvider.h +// SCCamera +// +// Created by Michel Loenngren on 4/11/18. +// + +#import + +@class SCManagedStillImageCapturer; +@protocol SCManagedCapturerLensAPI +, SCPerforming; + +/** + Bridging protocol providing the ARImageCapturer subclass of SCManagedStillImageCapturer + to capture core. + */ +@protocol SCManagedCapturerARImageCaptureProvider + +- (SCManagedStillImageCapturer *)arImageCapturerWith:(id)performer + lensProcessingCore:(id)lensProcessingCore; + +@end diff --git a/Lens/SCManagedCapturerGLViewManagerAPI.h b/Lens/SCManagedCapturerGLViewManagerAPI.h new file mode 100644 index 0000000..46c7894 --- /dev/null +++ b/Lens/SCManagedCapturerGLViewManagerAPI.h @@ -0,0 +1,27 @@ +// +// SCManagedCapturerGLViewManagerAPI.h +// SCCamera +// +// Created by Michel Loenngren on 4/11/18. +// + +#import + +#import + +@class SCCaptureResource; + +/** + Bridging protocol for providing a glViewManager to capture core. + */ +@protocol SCManagedCapturerGLViewManagerAPI + +@property (nonatomic, readonly, strong) LSAGLView *view; + +- (void)configureWithCaptureResource:(SCCaptureResource *)captureResource; + +- (void)setLensesActive:(BOOL)active; + +- (void)prepareViewIfNecessary; + +@end diff --git a/Lens/SCManagedCapturerLSAComponentTrackerAPI.h b/Lens/SCManagedCapturerLSAComponentTrackerAPI.h new file mode 100644 index 0000000..7191fed --- /dev/null +++ b/Lens/SCManagedCapturerLSAComponentTrackerAPI.h @@ -0,0 +1,19 @@ +// +// SCManagedCapturerLSAComponentTrackerAPI.h +// SCCamera +// +// Created by Michel Loenngren on 4/11/18. +// + +#import + +@class SCCaptureResource; + +/** + SCCamera protocol providing LSA tracking logic. + */ +@protocol SCManagedCapturerLSAComponentTrackerAPI + +- (void)configureWithCaptureResource:(SCCaptureResource *)captureResource; + +@end diff --git a/Lens/SCManagedCapturerLensAPI.h b/Lens/SCManagedCapturerLensAPI.h new file mode 100644 index 0000000..22ad5a9 --- /dev/null +++ b/Lens/SCManagedCapturerLensAPI.h @@ -0,0 +1,67 @@ +// +// SCManagedCapturerLensAPI.h +// SCCamera +// +// Created by Michel Loenngren on 4/11/18. +// + +#import "SCManagedCapturerListener.h" +#import "SCManagedVideoARDataSource.h" + +#import +#import + +#import + +@protocol SCManagedAudioDataSourceListener +, SCManagedVideoARDataSource; +@class LSAComponentManager; + +/** + Encapsulation of LensesProcessingCore for use in SCCamera. + */ +@protocol SCManagedCapturerLensAPI + +@property (nonatomic, strong, readonly) LSAComponentManager *componentManager; +@property (nonatomic, strong) NSString *activeLensId; +@property (nonatomic, readonly) BOOL isLensApplied; +@property (nonatomic, strong, readonly) + id capturerListener; + +typedef void (^SCManagedCapturerLensAPIPointOfInterestCompletion)(SCLensCategory *category, NSInteger categoriesCount); + +- (void)setAspectRatio:(BOOL)isLiveStreaming; + +- (SCLens *)appliedLens; + +- (void)setFieldOfView:(float)fieldOfView; + +- (void)setAsFieldOfViewListenerForDevice:(SCManagedCaptureDevice *)captureDevice; + +- (void)setAsFieldOfViewListenerForARDataSource:(id)arDataSource NS_AVAILABLE_IOS(11_0); + +- (void)removeFieldOfViewListener; + +- (void)setModifySource:(BOOL)modifySource; + +- (void)setLensesActive:(BOOL)lensesActive + videoOrientation:(AVCaptureVideoOrientation)videoOrientation + filterFactory:(SCLookseryFilterFactory *)filterFactory; + +- (void)detectLensCategoryOnNextFrame:(CGPoint)point + videoOrientation:(AVCaptureVideoOrientation)videoOrientation + lenses:(NSArray *)lenses + completion:(SCManagedCapturerLensAPIPointOfInterestCompletion)completion; + +- (void)setShouldMuteAllSounds:(BOOL)shouldMuteAllSounds; + +- (UIImage *)processImage:(UIImage *)image + maxPixelSize:(NSInteger)maxPixelSize + devicePosition:(SCManagedCaptureDevicePosition)position + fieldOfView:(float)fieldOfView; + +- (void)setShouldProcessARFrames:(BOOL)shouldProcessARFrames; + +- (NSInteger)maxPixelSize; + +@end diff --git a/Lens/SCManagedCapturerLensAPIProvider.h b/Lens/SCManagedCapturerLensAPIProvider.h new file mode 100644 index 0000000..d98c5d5 --- /dev/null +++ b/Lens/SCManagedCapturerLensAPIProvider.h @@ -0,0 +1,20 @@ +// +// SCManagedCapturerLensAPIProvider.h +// SCCamera +// +// Created by Michel Loenngren on 4/12/18. +// + +#import + +@protocol SCManagedCapturerLensAPI; +@class SCCaptureResource; + +/** + Provider for creating new instances of SCManagedCapturerLensAPI within SCCamera. + */ +@protocol SCManagedCapturerLensAPIProvider + +- (id)lensAPIForCaptureResource:(SCCaptureResource *)captureResouce; + +@end