feat(macos/capture): support for capture display other than main display (#2449)

This commit is contained in:
TimmyOVO
2024-04-23 02:16:26 +08:00
committed by GitHub
parent 067efc7912
commit 9288775351
10 changed files with 93 additions and 37 deletions

View File

@@ -5,6 +5,7 @@
#pragma once
#import <AVFoundation/AVFoundation.h>
#import <AppKit/AppKit.h>
struct CaptureSession {
AVCaptureVideoDataOutput *output;
@@ -29,6 +30,7 @@ typedef bool (^FrameCallbackBlock)(CMSampleBufferRef);
@property (nonatomic, assign) NSMapTable<AVCaptureConnection *, dispatch_semaphore_t> *captureSignals;
+ (NSArray<NSDictionary *> *)displayNames;
+ (NSString *)getDisplayName:(CGDirectDisplayID)displayID;
- (id)initWithDisplay:(CGDirectDisplayID)displayID frameRate:(int)frameRate;