fix: Use property accessors on Frame (#2400)
* fix: Use property accessors on `Frame` * Format * Use `_Nonnull` * fix: Assume nonnull * Use `NS_ASSUME_NONNULL_BEGIN` more * Format C++
This commit is contained in:
@@ -12,23 +12,25 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIImage.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface Frame : NSObject
|
||||
|
||||
- (instancetype _Nonnull)initWithBuffer:(CMSampleBufferRef _Nonnull)buffer orientation:(UIImageOrientation)orientation;
|
||||
|
||||
- (instancetype)initWithBuffer:(CMSampleBufferRef)buffer orientation:(UIImageOrientation)orientation;
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
|
||||
@property(nonatomic, readonly) CMSampleBufferRef _Nonnull buffer;
|
||||
@property(nonatomic, readonly) CMSampleBufferRef buffer;
|
||||
@property(nonatomic, readonly) UIImageOrientation orientation;
|
||||
|
||||
// Getters
|
||||
- (NSString* _Nonnull)pixelFormat;
|
||||
- (BOOL)isMirrored;
|
||||
- (BOOL)isValid;
|
||||
- (size_t)width;
|
||||
- (size_t)height;
|
||||
- (double)timestamp;
|
||||
- (size_t)bytesPerRow;
|
||||
- (size_t)planesCount;
|
||||
@property(nonatomic, readonly) NSString* pixelFormat;
|
||||
@property(nonatomic, readonly) BOOL isMirrored;
|
||||
@property(nonatomic, readonly) BOOL isValid;
|
||||
@property(nonatomic, readonly) size_t width;
|
||||
@property(nonatomic, readonly) size_t height;
|
||||
@property(nonatomic, readonly) double timestamp;
|
||||
@property(nonatomic, readonly) size_t bytesPerRow;
|
||||
@property(nonatomic, readonly) size_t planesCount;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
Reference in New Issue
Block a user