2014 snapchat source code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
2.2 KiB

  1. //
  2. // SCManagedCapturerLensAPI.h
  3. // SCCamera
  4. //
  5. // Created by Michel Loenngren on 4/11/18.
  6. //
  7. #import "SCManagedCapturerListener.h"
  8. #import "SCManagedVideoARDataSource.h"
  9. #import <SCCameraFoundation/SCManagedCaptureDevicePosition.h>
  10. #import <SCLenses/SCLens.h>
  11. #import <Foundation/Foundation.h>
  12. @protocol SCManagedAudioDataSourceListener
  13. , SCManagedVideoARDataSource;
  14. @class LSAComponentManager;
  15. /**
  16. Encapsulation of LensesProcessingCore for use in SCCamera.
  17. */
  18. @protocol SCManagedCapturerLensAPI <SCManagedCapturerListener>
  19. @property (nonatomic, strong, readonly) LSAComponentManager *componentManager;
  20. @property (nonatomic, strong) NSString *activeLensId;
  21. @property (nonatomic, readonly) BOOL isLensApplied;
  22. @property (nonatomic, strong, readonly)
  23. id<SCManagedAudioDataSourceListener, SCManagedVideoDataSourceListener> capturerListener;
  24. typedef void (^SCManagedCapturerLensAPIPointOfInterestCompletion)(SCLensCategory *category, NSInteger categoriesCount);
  25. - (void)setAspectRatio:(BOOL)isLiveStreaming;
  26. - (SCLens *)appliedLens;
  27. - (void)setFieldOfView:(float)fieldOfView;
  28. - (void)setAsFieldOfViewListenerForDevice:(SCManagedCaptureDevice *)captureDevice;
  29. - (void)setAsFieldOfViewListenerForARDataSource:(id<SCManagedVideoARDataSource>)arDataSource NS_AVAILABLE_IOS(11_0);
  30. - (void)removeFieldOfViewListener;
  31. - (void)setModifySource:(BOOL)modifySource;
  32. - (void)setLensesActive:(BOOL)lensesActive
  33. videoOrientation:(AVCaptureVideoOrientation)videoOrientation
  34. filterFactory:(SCLookseryFilterFactory *)filterFactory;
  35. - (void)detectLensCategoryOnNextFrame:(CGPoint)point
  36. videoOrientation:(AVCaptureVideoOrientation)videoOrientation
  37. lenses:(NSArray<SCLens *> *)lenses
  38. completion:(SCManagedCapturerLensAPIPointOfInterestCompletion)completion;
  39. - (void)setShouldMuteAllSounds:(BOOL)shouldMuteAllSounds;
  40. - (UIImage *)processImage:(UIImage *)image
  41. maxPixelSize:(NSInteger)maxPixelSize
  42. devicePosition:(SCManagedCaptureDevicePosition)position
  43. fieldOfView:(float)fieldOfView;
  44. - (void)setShouldProcessARFrames:(BOOL)shouldProcessARFrames;
  45. - (NSInteger)maxPixelSize;
  46. @end