react-native-vision-camera/package/ios/Frame Processor/Frame.h
Marc Rousavy 895f3ec889
feat: Make Frame thread-safe and improve error messages (#2327)
* fix: Fix multi-Thread access on Java

* fix: Thread-lock access on iOS as well

* whoops add missing header impl

* Update Podfile.lock

* fix: Don't use `CFGetRetainCount`

* fix: Lock access on iOS as well

* C++ format

* More detailed error

* chore: Move getters into `Frame`

* Format c++

* Use enum `orientation` again

* format

* fix: Synchronize `isValid` on Java

* Also log pixelformat

* feat: Use Java enums in C++

* Format C++
2023-12-29 14:09:56 +01:00

33 lines
716 B
Objective-C

//
// Frame.h
// VisionCamera
//
// Created by Marc Rousavy on 15.03.21.
// Copyright © 2021 mrousavy. All rights reserved.
//
#pragma once
#import <CoreMedia/CMSampleBuffer.h>
#import <Foundation/Foundation.h>
#import <UIKit/UIImage.h>
@interface Frame : NSObject
- (instancetype _Nonnull)initWithBuffer:(CMSampleBufferRef _Nonnull)buffer orientation:(UIImageOrientation)orientation;
@property(nonatomic, readonly) CMSampleBufferRef _Nonnull 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;
@end