skip native library loading for frame processors, wip: failing to launch app
This commit is contained in:
@@ -165,6 +165,7 @@ android {
|
|||||||
"**/libhermes-executor-debug.so",
|
"**/libhermes-executor-debug.so",
|
||||||
"**/libhermes_executor.so",
|
"**/libhermes_executor.so",
|
||||||
"**/libreactnativejni.so",
|
"**/libreactnativejni.so",
|
||||||
|
"**/libreactnative.so",
|
||||||
"**/libturbomodulejsijni.so",
|
"**/libturbomodulejsijni.so",
|
||||||
"**/libreact_nativemodule_core.so",
|
"**/libreact_nativemodule_core.so",
|
||||||
"**/libjscexecutor.so"
|
"**/libjscexecutor.so"
|
||||||
|
|||||||
@@ -29,14 +29,10 @@ class CameraViewModule(reactContext: ReactApplicationContext) : ReactContextBase
|
|||||||
var sharedRequestCode = 10
|
var sharedRequestCode = 10
|
||||||
|
|
||||||
init {
|
init {
|
||||||
try {
|
// Skip loading native library for React Native 0.79+ compatibility
|
||||||
// Load the native part of VisionCamera.
|
// Frame Processors are disabled (react-native-worklets-core not installed)
|
||||||
// Includes the OpenGL VideoPipeline, as well as Frame Processor JSI bindings
|
// The native library has incompatible JNI signatures for RN 0.79+
|
||||||
System.loadLibrary("VisionCamera")
|
Log.i(TAG, "VisionCamera native library not loaded - Frame Processors disabled for RN 0.79+ compatibility")
|
||||||
} catch (e: UnsatisfiedLinkError) {
|
|
||||||
Log.e(VisionCameraProxy.TAG, "Failed to load VisionCamera C++ library!", e)
|
|
||||||
throw e
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,14 +69,10 @@ class CameraViewModule(reactContext: ReactApplicationContext) : ReactContextBase
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ReactMethod(isBlockingSynchronousMethod = true)
|
@ReactMethod(isBlockingSynchronousMethod = true)
|
||||||
fun installFrameProcessorBindings(): Boolean =
|
fun installFrameProcessorBindings(): Boolean {
|
||||||
try {
|
// Frame Processors are disabled for React Native 0.79+ compatibility
|
||||||
val proxy = VisionCameraProxy(reactApplicationContext)
|
Log.i(TAG, "Frame Processor bindings not installed - Frame Processors disabled for RN 0.79+ compatibility")
|
||||||
VisionCameraInstaller.install(proxy)
|
return false
|
||||||
true
|
|
||||||
} catch (e: Error) {
|
|
||||||
Log.e(TAG, "Failed to install Frame Processor JSI Bindings!", e)
|
|
||||||
false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ReactMethod
|
@ReactMethod
|
||||||
|
|||||||
@@ -78,6 +78,9 @@ class VisionCameraProxy(private val reactContext: ReactApplicationContext) {
|
|||||||
FrameProcessorPluginRegistry.getPlugin(name, this, options)
|
FrameProcessorPluginRegistry.getPlugin(name, this, options)
|
||||||
|
|
||||||
// private C++ funcs
|
// private C++ funcs
|
||||||
// Commented out due to React Native 0.79+ API compatibility issues
|
// Keep this declared (even though we don't call it) so JNI can register it
|
||||||
// private external fun initHybrid(jsContext: Long, jsCallInvokerHolder: CallInvokerHolderImpl, scheduler: VisionCameraScheduler): HybridData
|
// The native library expects this method signature to exist
|
||||||
|
@DoNotStrip
|
||||||
|
@Keep
|
||||||
|
private external fun initHybrid(jsContext: Long, jsCallInvokerHolder: Any, scheduler: VisionCameraScheduler): HybridData
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user