react-native-vision-camera/ios/Frame Processor/VisionCameraScheduler.h
Marc Rousavy 0f7ee51333
feat: Add console logging support for Frame Processors (#297)
* Try to log to console via runOnJS

* Call `console.log`

* Create custom `VisionCameraScheduler`

* Fix scheduler call

* Call with this

* Fix console setting

* Move J---- to `java-bindings`

* c++ style

* Android: 1/2 Create custom Scheduler

* Android: 2/2 Use custom Scheduler

* Don't use `runOnJS`, use `__callAsync` directly
2021-07-30 10:27:45 +02:00

27 lines
563 B
Objective-C

//
// VisionCameraScheduler.h
// VisionCamera
//
// Created by Marc Rousavy on 23.07.21.
// Copyright © 2021 mrousavy. All rights reserved.
//
#pragma once
#import <RNReanimated/Scheduler.h>
#import <React-callinvoker/ReactCommon/CallInvoker.h>
namespace vision {
using namespace facebook;
class VisionCameraScheduler : public reanimated::Scheduler {
public:
VisionCameraScheduler(std::shared_ptr<react::CallInvoker> jsInvoker);
virtual ~VisionCameraScheduler();
void scheduleOnUI(std::function<void()> job) override;
};
} // namespace vision