Skip to content

Commit 3a7427e

Browse files
committed
fix formatting
1 parent d4189d9 commit 3a7427e

3 files changed

Lines changed: 20 additions & 17 deletions

File tree

src/platform/macos/display.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ static void clear_pixel_buffer(CVPixelBufferRef pixel_buffer) {
8080
static int make_dummy_img(img_t *img, int width, int height, OSType pixel_format, std::string_view backend_name) {
8181
CVPixelBufferRef pixel_buffer = nullptr;
8282
NSDictionary *attrs = @{
83-
(NSString *) kCVPixelBufferIOSurfacePropertiesKey: @{},
83+
(NSString *) kCVPixelBufferIOSurfacePropertiesKey: @ {},
8484
};
8585

8686
auto status = CVPixelBufferCreate(

src/platform/macos/sc_capture.h

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,26 @@
1010
#import <ScreenCaptureKit/ScreenCaptureKit.h>
1111

1212
API_AVAILABLE(macos(12.3))
13-
@interface SCCapture : NSObject <SCStreamDelegate, SCStreamOutput>
13+
@interface SCCapture: NSObject <SCStreamDelegate, SCStreamOutput>
1414

1515
#define kMaxDisplays 32
1616

1717
typedef bool (^VideoFrameCallbackBlock)(CMSampleBufferRef);
1818

19-
@property(nonatomic, assign) CGDirectDisplayID displayID;
20-
@property(nonatomic, assign) int frameRate;
21-
@property(nonatomic, assign) OSType pixelFormat;
22-
@property(nonatomic, assign) int frameWidth;
23-
@property(nonatomic, assign) int frameHeight;
19+
@property (nonatomic, assign) CGDirectDisplayID displayID;
20+
@property (nonatomic, assign) int frameRate;
21+
@property (nonatomic, assign) OSType pixelFormat;
22+
@property (nonatomic, assign) int frameWidth;
23+
@property (nonatomic, assign) int frameHeight;
2424

25-
@property(nonatomic, strong) SCStream *stream;
26-
@property(nonatomic, strong) SCShareableContent *shareableContent;
27-
@property(nonatomic, strong) dispatch_queue_t videoQueue;
25+
@property (nonatomic, strong) SCStream *stream;
26+
@property (nonatomic, strong) SCShareableContent *shareableContent;
27+
@property (nonatomic, strong) dispatch_queue_t videoQueue;
2828

29-
@property(nonatomic, copy) VideoFrameCallbackBlock videoCallback;
30-
@property(nonatomic, strong) dispatch_semaphore_t captureSignal;
31-
@property(nonatomic, assign) BOOL stopping;
32-
@property(nonatomic, assign) CMSampleBufferRef lastValidSampleBuffer;
29+
@property (nonatomic, copy) VideoFrameCallbackBlock videoCallback;
30+
@property (nonatomic, strong) dispatch_semaphore_t captureSignal;
31+
@property (nonatomic, assign) BOOL stopping;
32+
@property (nonatomic, assign) CMSampleBufferRef lastValidSampleBuffer;
3333

3434
+ (BOOL)isAvailable;
3535
+ (NSArray<NSDictionary *> *)displayNames;

src/platform/macos/sc_capture.m

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ - (instancetype)initWithDisplay:(CGDirectDisplayID)displayID
6363
}
6464

6565
dispatch_queue_attr_t qos = dispatch_queue_attr_make_with_qos_class(
66-
DISPATCH_QUEUE_SERIAL, QOS_CLASS_USER_INITIATED, DISPATCH_QUEUE_PRIORITY_HIGH);
66+
DISPATCH_QUEUE_SERIAL,
67+
QOS_CLASS_USER_INITIATED,
68+
DISPATCH_QUEUE_PRIORITY_HIGH
69+
);
6770
self.videoQueue = dispatch_queue_create("dev.lizardbyte.sunshine.sckVideoQueue", qos);
6871

6972
dispatch_semaphore_t initSemaphore = dispatch_semaphore_create(0);
@@ -251,8 +254,8 @@ - (void)stream:(SCStream *)stream didStopWithError:(NSError *)error {
251254
#pragma mark - SCStreamOutput
252255

253256
- (void)stream:(SCStream *)stream
254-
didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
255-
ofType:(SCStreamOutputType)type {
257+
didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
258+
ofType:(SCStreamOutputType)type {
256259
if (type != SCStreamOutputTypeScreen) {
257260
return;
258261
}

0 commit comments

Comments
 (0)