OBSAVCapturePresetInfo.h 1.2 KB

123456789101112131415161718192021222324
  1. //
  2. // OBSAVCapturePresetInfo.h
  3. // mac-avcapture
  4. //
  5. // Created by Patrick Heyer on 2023-03-07.
  6. //
  7. @import Foundation;
  8. @import AVFoundation;
  9. /// Stores format and framerate of a [AVCaptureSessionPreset](https://developer.apple.com/documentation/avfoundation/avcapturesessionpreset?language=objc).
  10. ///
  11. /// Changing the [activeFormat](https://developer.apple.com/documentation/avfoundation/avcapturedevice/1389221-activeformat?language=objc) of a device takes precedence over the configuration contained in a [AVCaptureSessionPreset](https://developer.apple.com/documentation/avfoundation/avcapturesessionpreset?language=objc). To restore a preset's configuration after changing to a different format, the values of a configured preset are stored in this object and restored when the source is switched back to a preset-based configuration.
  12. @interface OBSAVCapturePresetInfo : NSObject
  13. /// [activeFormat](https://developer.apple.com/documentation/avfoundation/avcapturedevice/1389221-activeformat?language=objc) used by the preset
  14. @property (nonatomic) AVCaptureDeviceFormat *activeFormat;
  15. /// Minimum framerate supported by the preset
  16. @property (nonatomic) CMTime minFrameRate;
  17. /// Maximum framerate supported by the preset
  18. @property (nonatomic) CMTime maxFrameRate;
  19. @end