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:
		| @@ -11,11 +11,11 @@ | ||||
| #import <Foundation/Foundation.h> | ||||
|  | ||||
| @implementation Frame { | ||||
|   CMSampleBufferRef _Nonnull buffer; | ||||
|   UIImageOrientation orientation; | ||||
|   CMSampleBufferRef _Nonnull _buffer; | ||||
|   UIImageOrientation _orientation; | ||||
| } | ||||
|  | ||||
| - (instancetype)initWithBuffer:(CMSampleBufferRef _Nonnull)buffer orientation:(UIImageOrientation)orientation { | ||||
| - (instancetype)initWithBuffer:(CMSampleBufferRef)buffer orientation:(UIImageOrientation)orientation { | ||||
|   self = [super init]; | ||||
|   if (self) { | ||||
|     _buffer = buffer; | ||||
| @@ -29,8 +29,13 @@ | ||||
|   CFRelease(_buffer); | ||||
| } | ||||
|  | ||||
| @synthesize buffer = _buffer; | ||||
| @synthesize orientation = _orientation; | ||||
| - (CMSampleBufferRef)buffer { | ||||
|   return _buffer; | ||||
| } | ||||
|  | ||||
| - (UIImageOrientation)orientation { | ||||
|   return _orientation; | ||||
| } | ||||
|  | ||||
| - (NSString*)pixelFormat { | ||||
|   CMFormatDescriptionRef format = CMSampleBufferGetFormatDescription(_buffer); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user