mrousavy / react-native-vision-camera

📸 A powerful, high-performance React Native Camera library.
https://react-native-vision-camera.com
MIT License
6.64k stars 983 forks source link

feat: Completely refactor the `FrameProcessorPlugins.ts` file into multiple files #2830

Closed mrousavy closed 2 weeks ago

mrousavy commented 2 weeks ago

What

  1. Refactors FrameProcessorPlugins.ts into multiple files in frame-processors/ (e.g. runAsync.ts, runAtTargetFps.ts, ...)
  2. Deprecates VisionCameraProxy.initFrameProcessorPlugin in favor of initFrameProcessorPlugin directly. The VisionCameraProxy.* APIs will continue to work for a while, but VisionCameraProxy will be removed in favour of a C++ TurboModule in a future release.

[!WARNING] VisionCameraProxy will be replaced by a C++ TurboModule in a future release. If you use any APIs on VisionCameraProxy, please migrate them over to their counterparts:

  • VisionCameraProxy.initFrameProcessorPlugin(...) -> initFrameProcessorPlugin(...)
  • VisionCameraProxy.workletContext -> should not be used at all (internal)
  • VisionCameraProxy.setFrameProcessor -> should not be used at all (internal)
  • VisionCameraProxy.removeFrameProcessor -> should not be used at all (internal)

Changes

Tested on

Related issues

vercel[bot] commented 2 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-native-vision-camera ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 1, 2024 5:11pm