Marc Rousavy
ba576054c3
chore: release 3.8.1
2024-01-17 20:20:54 +01:00
Marc Rousavy
ba1d7eec9c
feat: Use JSI's ArrayBuffer
instead of TypedArray
( #2408 )
...
* feat: Use JSI's `ArrayBuffer` instead of `TypedArray`
* fix: Fix move memory
* feat: Implement iOS
* Format
* Update JSIJNIConversion.cpp
* fix: Fix Android `toArrayBuffer` and other
* Catch FP call errors
* Update return type
* Use `CPU_READ_OFTEN` flag as well
* CPU flag
* Run destructors under `jni::ThreadScope`
* Update FrameProcessorPluginHostObject.cpp
* fix: Fix `toArrayBuffer()` crash
* Update Frame.ts
2024-01-17 20:18:46 +01:00
Marc Rousavy
2f21609e39
feat: Add SharedArray.getSize()
( #2406 )
...
* feat: Add `SharedArray.getSize()`
* Rename `count` to `size` on iOS
* `->` instead of `.`
2024-01-17 18:30:26 +01:00
Marc Rousavy
03ee0a2099
feat: Expose FrameProcessorPlugin
TS type
2024-01-17 11:58:32 +01:00
Marc Rousavy
773f278df8
fix: Use property accessors on Frame
( #2400 )
...
* fix: Use property accessors on `Frame`
* Format
* Use `_Nonnull`
* fix: Assume nonnull
* Use `NS_ASSUME_NONNULL_BEGIN` more
* Format C++
2024-01-16 20:02:03 +01:00
Marc Rousavy
9c66a09582
chore: Update swiftlint to latest ( #2398 )
2024-01-16 18:01:41 +01:00
Marc Rousavy
bdad4e1acb
fix: Release MediaActionSound
after playing ( #2390 )
...
* fix: Release `MediaActionSound` after playing
* Make it a bit more expressive
2024-01-16 18:01:28 +01:00
Marc Rousavy
e825e21e1d
fix: Make Frame
properties readonly in Types ( #2397 )
2024-01-16 18:00:13 +01:00
Marc Rousavy
64207ac1bf
chore: C++ format
2024-01-16 17:53:55 +01:00
Marc Rousavy
60f8a8c989
fix: Fix C++ build-error when trying to use JSITypedArray.h
( #2396 )
...
* fix: Fix C++ build-error when trying to use `JSITypedArray.h`
* Update SharedArray.h
2024-01-16 17:13:35 +01:00
Marc Rousavy
783f49e88e
chore: release 3.8.0
2024-01-15 20:18:49 +01:00
Marc Rousavy
58ef21ebfd
feat: Add minFocusDistance
prop to CameraDevice
( #2392 )
...
* docs: Link `videoHdr`
* Update PERFORMANCE.mdx
* docs: Add isActive to perf
* docs: Update errors
* feat: Add `minFocusDistance` prop
* Format
* Update Podfile.lock
* fix: To Double
* fix: Import AVFoundation
* fix: Move from format -> device
* fix: Use centi-meters (cm) instead of meters
* Fix deadloop
* fix: Avoid -1 values
2024-01-15 19:30:20 +01:00
Marc Rousavy
17ae5fae76
fix: Fix CamcorderProfile
out of range error ( #2389 )
...
* fix: Fix `CamcorderProfile` out of range error
* fix: Also take `cameraId` into account
2024-01-15 10:30:13 +01:00
Marc Rousavy
ec2f8c258d
docs: Fix typo
2024-01-15 10:10:30 +01:00
Marc Rousavy
ae7f5e2434
docs: Update SharedArray*
type
2024-01-13 20:17:48 +01:00
Marc Rousavy
a4686022e2
fix: Avoid "CameraNotReady" errors when updating props in background ( #2382 )
2024-01-13 20:02:18 +01:00
Marc Rousavy
9ecc09cfe4
docs: Add platform: iOS
annotation to regionOfInterest
prop
2024-01-13 19:35:30 +01:00
Marc Rousavy
d747933892
fix: Fix SharedArray name
2024-01-12 19:25:13 +01:00
Marc Rousavy
fe614a4c21
fix: Fix JNI TypedArray error
2024-01-12 19:24:46 +01:00
Marc Rousavy
a4a7ed73d4
Merge branch 'main' of https://github.com/mrousavy/react-native-vision-camera
2024-01-12 16:14:03 +01:00
Marc Rousavy
a42c799d89
Update FrameProcessorPlugin.h
2024-01-12 16:13:56 +01:00
Marc Rousavy
84598c24f0
docs: Update FrameProcessorPlugin
's init method callsites ( #2385 )
...
* fix: Remove `FrameProcessorPlugin` init method
It was unused.
* fix: Update usage
* Revert "fix: Update usage"
This reverts commit 523f0606808afee998922241f01adf7fb40b0c7b.
* Revert "fix: Remove `FrameProcessorPlugin` init method"
This reverts commit 9025476a842c553d233de9c14f56d422270e98ef.
* Update FRAME_PROCESSOR_CREATE_PLUGIN_IOS.mdx
2024-01-12 16:11:43 +01:00
Marc Rousavy
b9a69a20e5
docs: Recommend @latest
CLI version
2024-01-12 16:11:20 +01:00
Marc Rousavy
29fe98cc44
feat: Add zero-copy SharedArray
type to Frame Processor Plugins ( #2383 )
...
* feat: Create `TypedArray` class for Frame Processor Plugins
* Type
* feat: Pass `VisionCameraProxy` along (BREAKING)
* feat: Finish implementation
* Log a bit
* feat: Successfully convert JSI <> JNI buffers
* Wrap buffer
* fix: Fix using wrong Runtime
* feat: Add docs
* add zero copy example
* Format C++
* Create iOS base
* feat: Finish iOS implementation
* chore: Format
* fix: Use `NSData` instead of `NSMutableData`
* Format
* fix: Fix build when Frame Processors are disabled
* chore: Rename `TypedArray` to `SharedArray`
* fix: Fix Swift typings for Array
* Remove a few default inits
* fix: Fix Android build
* fix: Use `NSInteger`
* Update SharedArray.mm
* fix: Expose bytes directly on iOS (NSData was immutable)
2024-01-12 16:00:36 +01:00
Marc Rousavy
56cecaa814
chore: release 3.7.1
2024-01-11 19:08:37 +01:00
Marc Rousavy
34c5b11927
feat: Re-throw error on JS side instead of just logging on native side ( #2366 )
...
* feat: Re-throw error on JS side instead of just logging on native side
* fix: Fix proxy
* fix: Fix app crash by only logging error
* fix: Use `global.ErrorUtils` (from reanimated)
2024-01-11 17:23:38 +01:00
Marc Rousavy
eb14aa1402
docs: Update BUG_REPORT
2024-01-11 16:41:15 +01:00
Marc Rousavy
322b6fcbd6
fix: Fix Preview stretching on Android ( #2377 )
...
* fix: Fix Preview stretching on Android
* fix: Simplify Preview size computation
* fix: Catch `stopRepeating` error
* fix: Fix preview size calculation
* Format code
* Update CameraSession.kt
* Enable CodeScanner in example app
* fix: Also update size on surface change
* Format
* fix: Flip sizes
* Revert that stuff again
* Update PreviewView.kt
* fix: Swap width and height in SurfaceHolder::setFixedSize
2024-01-11 16:33:40 +01:00
Marc Rousavy
2b10622559
fix: Fix Camera not stopping when isActive
is set to false
( #2361 )
2024-01-10 16:00:28 +01:00
Marc Rousavy
dc8df80085
docs: Add ShadowLens section to docs
2024-01-09 18:29:22 +01:00
Marc Rousavy
e93411592a
docs: Update README.md
2024-01-09 18:11:28 +01:00
Marc Rousavy
a8b85a3053
fix: Also call onInitialized
when isActive=false
...
related to https://github.com/mrousavy/react-native-vision-camera/issues/2364#issuecomment-1883201425
2024-01-09 17:58:57 +01:00
Marc Rousavy
0ffaa7fc29
docs: Add tap to focus example
2024-01-09 17:28:05 +01:00
Marc Rousavy
de9da64400
chore: release 3.7.0
2024-01-08 13:27:50 +01:00
Marc Rousavy
5c99728561
feat: Add new enableCodeScanner
prop to build.gradle
to make sure CodeScanner
always works ( #2355 )
...
* feat: Always download model instead of relying on Google Play Services
* feat: Use `VisionCamera_enableCodeScanner` flag instead of unsafely replacing
* Update CODE_SCANNING.mdx
2024-01-08 13:14:47 +01:00
Erwan LE PRADO
a8c16e31d6
feat: Make enableCodeScanner
expo config-plugin install the native dependency ( #2348 )
...
* feat: with gradle implementation
* chore: remove unused vars
* chore: eslint
* chore: eslint
2024-01-08 12:54:01 +01:00
Marc Rousavy
2d84b7f40e
docs: Create pinch-to-zoom example for docs
2024-01-08 12:51:31 +01:00
Marc Rousavy
cc60ad296a
fix: Validate input props (fps
, hdr
, torch
, ...) instead of silently crashing ( #2354 )
...
* fix: Fix Blackscreen by deterministically destroying session if `isActive=false`
* Re-open Camera if session died
* Simplify Camera
* Disconnect is optional, block when resetting state
* fix: Log in `configure { ... }`
* fix: Make concurrent configure safe
* fix: Don't resize preview
* fix: Use current `CameraConfiguration`
* Don't start if no outputs are available
* Only mount with preview outputs
* Update CameraSession.kt
* Update PreviewView.kt
* Better logging
* Update CameraSession.kt
* Extract
* fix: Rebuild entire session if `isActive` changed
* isActive safe
* Start session at 1
* Create ActiveCameraDevice.kt
* interrupts
* chore: Freeze `frame` in `useFrameProcessor`
* Revert "chore: Freeze `frame` in `useFrameProcessor`"
This reverts commit dff93d506e29a791d8dea8842b880ab5c892211e.
* chore: Better logging
* fix: Move HDR to `video`/`photo` config
* fix: Fix hdr usage
* fix: Ignore any updates after destroying Camera
* fix: Fix video HDR
* chore: Format code
* fix: Check Camera permission
* Remove unneeded error
* Update CameraSession.kt
* Update CameraPage.tsx
* Delete OutputConfiguration.toDebugString.kt
* Update CameraSession.kt
* fix: Perform sanity checks to make sure props are valid
* format
2024-01-08 12:13:05 +01:00
Marc Rousavy
0d21bc3a57
fix: Fix blackscreen issues and lifecycle when closing Camera ( #2339 )
...
* fix: Fix Blackscreen by deterministically destroying session if `isActive=false`
* Re-open Camera if session died
* Simplify Camera
* Disconnect is optional, block when resetting state
* fix: Log in `configure { ... }`
* fix: Make concurrent configure safe
* fix: Don't resize preview
* fix: Use current `CameraConfiguration`
* Don't start if no outputs are available
* Only mount with preview outputs
* Update CameraSession.kt
* Update PreviewView.kt
* Better logging
* Update CameraSession.kt
* Extract
* fix: Rebuild entire session if `isActive` changed
* isActive safe
* Start session at 1
* Create ActiveCameraDevice.kt
* interrupts
* chore: Freeze `frame` in `useFrameProcessor`
* Revert "chore: Freeze `frame` in `useFrameProcessor`"
This reverts commit dff93d506e29a791d8dea8842b880ab5c892211e.
* chore: Better logging
* fix: Move HDR to `video`/`photo` config
* fix: Fix hdr usage
* fix: Ignore any updates after destroying Camera
* fix: Fix video HDR
* chore: Format code
* fix: Check Camera permission
* Remove unneeded error
* Update CameraSession.kt
* Update CameraPage.tsx
* Delete OutputConfiguration.toDebugString.kt
* Update CameraSession.kt
2024-01-08 11:41:57 +01:00
Marc Rousavy
2cd22ad236
fix: Fix "maxImages (3) has already been acquired" error ( #2352 )
2024-01-05 15:51:39 +01:00
Marc Rousavy
833ffb8478
fix: Fix "The given value for videoStabilizationMode could not be parsed" error ( #2353 )
2024-01-05 15:51:34 +01:00
Marc Rousavy
ef4e9fabf9
fix: Unwrap boxed JNI types directly ( #2337 )
...
* fix: Unwrap boxed JNI types directly
* Update JSIJNIConversion.cpp
2024-01-02 14:13:47 +01:00
Marc Rousavy
3dc75112ae
fix: Fix crash when trying to console.log(frame)
( #2335 )
...
* feat: Override `toJSON` to support `console.log(frame)`
* Update FrameHostObject.mm
* Also use on Android
* Update FrameHostObject.mm
2024-01-02 13:54:07 +01:00
Marc Rousavy
5486be7506
Update Podfile.lock
2024-01-02 12:59:37 +01:00
Kuba Adamczyk
30c4f9e7b5
fix: Fix iOS native enableZoomGesture
zoom logic ( #2329 )
...
fix a bug related to built-in zoom feature on iOS
2024-01-02 11:57:22 +01:00
Marc Rousavy
895f3ec889
feat: Make Frame
thread-safe and improve error messages ( #2327 )
...
* fix: Fix multi-Thread access on Java
* fix: Thread-lock access on iOS as well
* whoops add missing header impl
* Update Podfile.lock
* fix: Don't use `CFGetRetainCount`
* fix: Lock access on iOS as well
* C++ format
* More detailed error
* chore: Move getters into `Frame`
* Format c++
* Use enum `orientation` again
* format
* fix: Synchronize `isValid` on Java
* Also log pixelformat
* feat: Use Java enums in C++
* Format C++
2023-12-29 14:09:56 +01:00
Marc Rousavy
e4393cd83a
chore: Import type
only from CodeScanner
2023-12-28 11:56:40 +01:00
David Gruseck
7905f2c057
fix: Fix for inset of SENSOR_INFO_ACTIVE_ARRAY_SIZE for Android < 11 ( #2306 )
...
fix for inset of SENSOR_INFO_ACTIVE_ARRAY_SIZE
Co-authored-by: David Gruseck <david.gruseck@actinate.com>
2023-12-22 10:59:23 +01:00
Marc Rousavy
7241342fd8
docs: Add plugin by mgcrea/vision-camera-barcode-scanner
2023-12-22 10:42:34 +01:00
Marc Rousavy
0d3ecd1131
fix: Fix min/max exposure range on Android ( #2304 )
2023-12-21 12:25:46 +01:00