CameraManager.h 832 B

12345678910111213141516171819202122232425262728293031323334
  1. //
  2. // CameraManager.h
  3. // PanoramicCameraSDK
  4. //
  5. // Created by 王昭威 on 2023/1/14.
  6. //
  7. #import <Foundation/Foundation.h>
  8. #import <AVFoundation/AVFoundation.h>
  9. NS_ASSUME_NONNULL_BEGIN
  10. @class AVCaptureDevice;
  11. @interface CameraManager : NSObject
  12. @property (nonatomic, assign, nullable, readonly) AVCaptureDevice* back;
  13. @property (nonatomic, readonly, nullable) AVCaptureDevice* front;
  14. @property (nonatomic, assign, readonly) CGFloat backAspect;
  15. @property (nonatomic, assign, readonly) CGFloat frontAspect;
  16. + (instancetype)shared;
  17. - (void)focusOn:(CGPoint)point;
  18. - (void)focusOn:(CGPoint)point device: (AVCaptureDevice*)device;
  19. - (void)setResolutionFor:(AVCaptureDevicePosition)position with: (NSInteger)desiredWidth;
  20. - (AVCaptureDevice *)cameraWithPosition:(AVCaptureDevicePosition)position;
  21. @end
  22. NS_ASSUME_NONNULL_END