mac-avcapture: Add additional capture presets
This adds additional capture presets, including 3840x2160 and 1920x1080, in addition to the preset "High."
This commit is contained in:
parent
c7ca8abdd3
commit
b1efb005ab
@ -1,3 +1,4 @@
|
||||
#import <AvailabilityMacros.h>
|
||||
#import <AVFoundation/AVFoundation.h>
|
||||
#import <CoreFoundation/CoreFoundation.h>
|
||||
#import <CoreMedia/CoreMedia.h>
|
||||
@ -1230,8 +1231,13 @@ static void *av_capture_create(obs_data_t *settings, obs_source_t *source)
|
||||
static NSArray *presets(void)
|
||||
{
|
||||
return @[
|
||||
//AVCaptureSessionPresetiFrame1280x720,
|
||||
//AVCaptureSessionPresetiFrame960x540,
|
||||
//AVCaptureSessionPresetiFrame1280x720,
|
||||
//AVCaptureSessionPresetiFrame960x540,
|
||||
#if defined(MAC_OS_X_VERSION_10_15) && \
|
||||
MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_15
|
||||
AVCaptureSessionPreset3840x2160,
|
||||
AVCaptureSessionPreset1920x1080,
|
||||
#endif
|
||||
AVCaptureSessionPreset1280x720, AVCaptureSessionPreset960x540,
|
||||
AVCaptureSessionPreset640x480, AVCaptureSessionPreset352x288,
|
||||
AVCaptureSessionPreset320x240, AVCaptureSessionPresetHigh,
|
||||
@ -1252,6 +1258,11 @@ static NSString *preset_names(NSString *preset)
|
||||
AVCaptureSessionPreset640x480: @"640x480",
|
||||
AVCaptureSessionPreset960x540: @"960x540",
|
||||
AVCaptureSessionPreset1280x720: @"1280x720",
|
||||
#if defined(MAC_OS_X_VERSION_10_15) && \
|
||||
MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_15
|
||||
AVCaptureSessionPreset1920x1080: @"1920x1080",
|
||||
AVCaptureSessionPreset3840x2160: @"3840x2160",
|
||||
#endif
|
||||
AVCaptureSessionPresetHigh: @"High",
|
||||
};
|
||||
NSString *name = preset_names[preset];
|
||||
|
Loading…
x
Reference in New Issue
Block a user