2021-06-09 02:57:05 -06:00
|
|
|
//
|
|
|
|
// Frame.h
|
|
|
|
// VisionCamera
|
|
|
|
//
|
|
|
|
// Created by Marc Rousavy on 15.03.21.
|
|
|
|
// Copyright © 2021 mrousavy. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#import <CoreMedia/CMSampleBuffer.h>
|
2023-09-01 04:58:32 -06:00
|
|
|
#import <Foundation/Foundation.h>
|
2021-06-09 02:57:05 -06:00
|
|
|
#import <UIKit/UIImage.h>
|
|
|
|
|
2024-01-16 12:02:03 -07:00
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
2021-06-09 02:57:05 -06:00
|
|
|
|
2024-01-16 12:02:03 -07:00
|
|
|
@interface Frame : NSObject
|
2021-06-09 02:57:05 -06:00
|
|
|
|
2024-01-16 12:02:03 -07:00
|
|
|
- (instancetype)initWithBuffer:(CMSampleBufferRef)buffer orientation:(UIImageOrientation)orientation;
|
2024-01-12 08:00:36 -07:00
|
|
|
- (instancetype)init NS_UNAVAILABLE;
|
|
|
|
|
2024-01-16 12:02:03 -07:00
|
|
|
@property(nonatomic, readonly) CMSampleBufferRef buffer;
|
2023-09-01 04:58:32 -06:00
|
|
|
@property(nonatomic, readonly) UIImageOrientation orientation;
|
2021-06-09 02:57:05 -06:00
|
|
|
|
2024-01-16 12:02:03 -07:00
|
|
|
@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;
|
2023-12-29 06:09:56 -07:00
|
|
|
|
2021-06-09 02:57:05 -06:00
|
|
|
@end
|
2024-01-16 12:02:03 -07:00
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_END
|