| 
									
										
										
										
											2023-07-21 17:52:30 +02:00
										 |  |  | //
 | 
					
						
							|  |  |  | //  FrameProcessorPluginHostObject.h
 | 
					
						
							|  |  |  | //  VisionCamera
 | 
					
						
							|  |  |  | //
 | 
					
						
							|  |  |  | //  Created by Marc Rousavy on 21.07.23.
 | 
					
						
							|  |  |  | //  Copyright © 2023 mrousavy. All rights reserved.
 | 
					
						
							|  |  |  | //
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #pragma once
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #import "FrameProcessorPlugin.h"
 | 
					
						
							|  |  |  | #import <ReactCommon/CallInvoker.h>
 | 
					
						
							| 
									
										
										
										
											2023-09-01 12:58:32 +02:00
										 |  |  | #import <jsi/jsi.h>
 | 
					
						
							|  |  |  | #import <memory>
 | 
					
						
							| 
									
										
										
										
											2023-07-21 17:52:30 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | using namespace facebook; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-09-01 12:58:32 +02:00
										 |  |  | class FrameProcessorPluginHostObject : public jsi::HostObject { | 
					
						
							| 
									
										
										
										
											2023-07-21 17:52:30 +02:00
										 |  |  | public: | 
					
						
							| 
									
										
										
										
											2023-09-01 19:39:25 +02:00
										 |  |  |   explicit FrameProcessorPluginHostObject(FrameProcessorPlugin* plugin, std::shared_ptr<react::CallInvoker> callInvoker) | 
					
						
							| 
									
										
										
										
											2023-09-01 12:58:32 +02:00
										 |  |  |       : _plugin(plugin), _callInvoker(callInvoker) {} | 
					
						
							|  |  |  |   ~FrameProcessorPluginHostObject() {} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-07-21 17:52:30 +02:00
										 |  |  | public: | 
					
						
							|  |  |  |   std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime& runtime) override; | 
					
						
							|  |  |  |   jsi::Value get(jsi::Runtime& runtime, const jsi::PropNameID& name) override; | 
					
						
							| 
									
										
										
										
											2023-09-01 12:58:32 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-07-21 17:52:30 +02:00
										 |  |  | private: | 
					
						
							|  |  |  |   FrameProcessorPlugin* _plugin; | 
					
						
							|  |  |  |   std::shared_ptr<react::CallInvoker> _callInvoker; | 
					
						
							|  |  |  | }; |