be5ec69b02
* Fix building iOS without Reanimated * Conditionally compile Frame Processors (gradle) * Conditionally use externalNativeBuild * Remove Reanimated import * fix: Conditionally load REA/VisionCamera libraries * fix: Add disable FP to docs * fix: Fix dummy placeholder for Scheduler.mm * fix: Fix dummy `Scheduler` declaration * fix: Only init `CameraView` C++ side if frame processors are enabled * fix: Install JSI Bindings on Frame Processor Manager ctor * fix: Wrong conditional * whoops
32 lines
683 B
Objective-C
32 lines
683 B
Objective-C
//
|
|
// FrameHostObject.h
|
|
// VisionCamera
|
|
//
|
|
// Created by Marc Rousavy on 22.03.21.
|
|
// Copyright © 2021 mrousavy. All rights reserved.
|
|
//
|
|
|
|
#pragma once
|
|
|
|
#import <jsi/jsi.h>
|
|
#import <CoreMedia/CMSampleBuffer.h>
|
|
#import "Frame.h"
|
|
|
|
using namespace facebook;
|
|
|
|
class JSI_EXPORT FrameHostObject: public jsi::HostObject {
|
|
public:
|
|
explicit FrameHostObject(Frame* frame): frame(frame) {}
|
|
|
|
public:
|
|
jsi::Value get(jsi::Runtime&, const jsi::PropNameID& name) override;
|
|
std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime& rt) override;
|
|
void close();
|
|
|
|
public:
|
|
Frame* frame;
|
|
|
|
private:
|
|
void assertIsFrameStrong(jsi::Runtime& runtime, const std::string& accessedPropName);
|
|
};
|