2024-01-12 08:00:36 -07:00
|
|
|
//
|
|
|
|
// SharedArray.h
|
|
|
|
// VisionCamera
|
|
|
|
//
|
|
|
|
// Created by Marc Rousavy on 12.01.24.
|
|
|
|
// Copyright © 2024 mrousavy. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#import "VisionCameraProxy.h"
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
2024-01-17 12:18:46 -07:00
|
|
|
#import "../../cpp/MutableRawBuffer.h"
|
2024-01-12 08:00:36 -07:00
|
|
|
#import <jsi/jsi.h>
|
|
|
|
using namespace facebook;
|
|
|
|
#endif
|
|
|
|
|
2024-01-16 12:02:03 -07:00
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
2024-01-12 08:00:36 -07:00
|
|
|
|
2024-01-16 12:02:03 -07:00
|
|
|
@interface SharedArray : NSObject
|
2024-01-12 08:00:36 -07:00
|
|
|
|
2024-01-16 12:02:03 -07:00
|
|
|
- (instancetype)init NS_UNAVAILABLE;
|
2024-01-17 12:18:46 -07:00
|
|
|
- (instancetype)initWithProxy:(VisionCameraProxyHolder*)proxy size:(NSInteger)size;
|
2024-01-12 08:00:36 -07:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
2024-01-17 12:18:46 -07:00
|
|
|
- (instancetype)initWithRuntime:(jsi::Runtime&)runtime arrayBuffer:(std::shared_ptr<jsi::ArrayBuffer>)arrayBuffer;
|
2024-01-12 08:00:36 -07:00
|
|
|
|
2024-01-17 12:18:46 -07:00
|
|
|
- (std::shared_ptr<jsi::ArrayBuffer>)arrayBuffer;
|
2024-01-12 08:00:36 -07:00
|
|
|
#endif
|
|
|
|
|
|
|
|
@property(nonatomic, readonly, nonnull) uint8_t* data;
|
2024-01-17 10:30:26 -07:00
|
|
|
@property(nonatomic, readonly) NSInteger size;
|
2024-01-12 08:00:36 -07:00
|
|
|
|
|
|
|
@end
|
2024-01-16 12:02:03 -07:00
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_END
|