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.

71 lines
1.9 KiB

  1. //
  2. // SCManagedCaptureDevice+SCManagedCapturer.h
  3. // Snapchat
  4. //
  5. // Created by Liu Liu on 5/9/15.
  6. // Copyright (c) 2015 Snapchat, Inc. All rights reserved.
  7. //
  8. #import "SCManagedCaptureDevice.h"
  9. #import <AVFoundation/AVFoundation.h>
  10. @interface SCManagedCaptureDevice (SCManagedCapturer)
  11. @property (nonatomic, strong, readonly) AVCaptureDevice *device;
  12. @property (nonatomic, strong, readonly) AVCaptureDeviceInput *deviceInput;
  13. @property (nonatomic, copy, readonly) NSError *error;
  14. @property (nonatomic, assign, readonly) BOOL isConnected;
  15. @property (nonatomic, strong, readonly) AVCaptureDeviceFormat *activeFormat;
  16. // Setup and hook up with device
  17. - (BOOL)setDeviceAsInput:(AVCaptureSession *)session;
  18. - (void)removeDeviceAsInput:(AVCaptureSession *)session;
  19. - (void)resetDeviceAsInput;
  20. // Configurations
  21. @property (nonatomic, assign) BOOL flashActive;
  22. @property (nonatomic, assign) BOOL torchActive;
  23. @property (nonatomic, assign) float zoomFactor;
  24. @property (nonatomic, assign, readonly) BOOL liveVideoStreamingActive;
  25. @property (nonatomic, assign, readonly) BOOL isNightModeActive;
  26. @property (nonatomic, assign, readonly) BOOL isFlashSupported;
  27. @property (nonatomic, assign, readonly) BOOL isTorchSupported;
  28. - (void)setNightModeActive:(BOOL)nightModeActive session:(AVCaptureSession *)session;
  29. - (void)setLiveVideoStreaming:(BOOL)liveVideoStreaming session:(AVCaptureSession *)session;
  30. - (void)setCaptureDepthData:(BOOL)captureDepthData session:(AVCaptureSession *)session;
  31. - (void)setExposurePointOfInterest:(CGPoint)pointOfInterest fromUser:(BOOL)fromUser;
  32. - (void)setAutofocusPointOfInterest:(CGPoint)pointOfInterest;
  33. - (void)continuousAutofocus;
  34. - (void)setRecording:(BOOL)recording;
  35. - (void)updateActiveFormatWithSession:(AVCaptureSession *)session;
  36. // Utilities
  37. - (CGPoint)convertViewCoordinates:(CGPoint)viewCoordinates
  38. viewSize:(CGSize)viewSize
  39. videoGravity:(NSString *)videoGravity;
  40. @end