2024-01-12 16:00:36 +01: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 20:18:46 +01:00
|
|
|
#import "../../cpp/MutableRawBuffer.h"
|
2024-01-12 16:00:36 +01:00
|
|
|
#import <jsi/jsi.h>
|
|
|
|
using namespace facebook;
|
|
|
|
#endif
|
|
|
|
|
2024-01-16 20:02:03 +01:00
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
2024-01-12 16:00:36 +01:00
|
|
|
|
2024-01-16 20:02:03 +01:00
|
|
|
@interface SharedArray : NSObject
|
2024-01-12 16:00:36 +01:00
|
|
|
|
2024-01-16 20:02:03 +01:00
|
|
|
- (instancetype)init NS_UNAVAILABLE;
|
2024-01-17 20:18:46 +01:00
|
|
|
- (instancetype)initWithProxy:(VisionCameraProxyHolder*)proxy size:(NSInteger)size;
|
2024-01-12 16:00:36 +01:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
2024-01-17 20:18:46 +01:00
|
|
|
- (instancetype)initWithRuntime:(jsi::Runtime&)runtime arrayBuffer:(std::shared_ptr<jsi::ArrayBuffer>)arrayBuffer;
|
2024-01-12 16:00:36 +01:00
|
|
|
|
2024-01-17 20:18:46 +01:00
|
|
|
- (std::shared_ptr<jsi::ArrayBuffer>)arrayBuffer;
|
2024-01-12 16:00:36 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
@property(nonatomic, readonly, nonnull) uint8_t* data;
|
2024-01-17 18:30:26 +01:00
|
|
|
@property(nonatomic, readonly) NSInteger size;
|
2024-01-12 16:00:36 +01:00
|
|
|
|
|
|
|
@end
|
2024-01-16 20:02:03 +01:00
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_END
|