* Rename `JImageProxyHostObject` -> `FrameHostObject` * `FrameProcessorPlugin` -> `JFrameProcessorPlugin` 1/2 * `FrameProcessorPlugin` -> `JFrameProcessorPlugin` 2/2 * Make `const` * Make `getName()` instance based * Update JFrameProcessorPlugin.h * Update JImageProxy.h * `T` * T * Remove default ctor * Use `TSelf` again * Return `local_ref<CameraView*>` instead of `CameraView*` * Make `findCameraViewById` return a raw pointer again... * Extract `setFrameProcessor` and `unsetFrameProcessor` * Use `global_ref` * Use `static_cast` for `FrameHostObject` * Update FrameProcessorRuntimeManager.cpp * Fix reference lint error * linelength * Fix `unsetFrameProcessor` call
34 lines
714 B
C++
34 lines
714 B
C++
//
|
|
// Created by Marc Rousavy on 29.09.21
|
|
//
|
|
|
|
#pragma once
|
|
|
|
#include <jni.h>
|
|
#include <fbjni/fbjni.h>
|
|
#include <string>
|
|
|
|
#include "JImageProxy.h"
|
|
|
|
namespace vision {
|
|
|
|
using namespace facebook;
|
|
using namespace jni;
|
|
|
|
struct JFrameProcessorPlugin : public JavaClass<JFrameProcessorPlugin> {
|
|
static constexpr auto kJavaDescriptor = "Lcom/mrousavy/camera/frameprocessor/FrameProcessorPlugin;";
|
|
|
|
public:
|
|
/**
|
|
* Call the plugin.
|
|
*/
|
|
local_ref<jobject> callback(alias_ref<JImageProxy::javaobject> image,
|
|
alias_ref<JArrayClass<jobject>> params) const;
|
|
/**
|
|
* Get the user-defined name of the Frame Processor Plugin
|
|
*/
|
|
std::string getName() const;
|
|
};
|
|
|
|
} // namespace vision
|