Commit Graph

350 Commits

Author SHA1 Message Date
Marc Rousavy
ae75e22fc0
fix: Fix crash in toArrayBuffer() by properly acquiring a reference on AHardwareBuffer* (#2490)
* fix: Fix crash in `toArrayBuffer()` by properly acquiring a reference on `AHardwareBuffer*`

* Format

* Update Podfile.lock
2024-01-31 20:32:02 +01:00
Marc Rousavy
f896831d4a
fix: Properly check HardwareBuffer usage flags before setting them (#2488)
* fix: Properly check `HardwareBuffer` usage flags before setting them

* fix: Use GPU flag if pixel format is NATIVE

* Update VideoPipeline.kt

* Add some logs

* fix: Properly convert ImageFormat to HardwareBufferFormat

* Update Podfile.lock

* fix: Add a safe `getHardwareBufferFormat` method

* Format
2024-01-31 20:31:56 +01:00
dependabot[bot]
fb96d000bc
feat: Bump org.jetbrains.kotlinx:kotlinx-coroutines-android from 1.5.2 to 1.7.3 (#2467)
Might be a breaking change as there have been some in that dependency.

chore(deps): bump org.jetbrains.kotlinx:kotlinx-coroutines-android

Bumps [org.jetbrains.kotlinx:kotlinx-coroutines-android](https://github.com/Kotlin/kotlinx.coroutines) from 1.5.2 to 1.7.3.
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.5.2...1.7.3)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-android
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-31 17:32:01 +01:00
dependabot[bot]
26579cd931
chore(deps-dev): bump @babel/runtime from 7.23.6 to 7.23.9 in /package/example (#2485)
chore(deps-dev): bump @babel/runtime in /package/example

Bumps [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) from 7.23.6 to 7.23.9.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.9/packages/babel-runtime)

---
updated-dependencies:
- dependency-name: "@babel/runtime"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-31 17:30:31 +01:00
dependabot[bot]
ba2aa89781
chore(deps): bump react-native-safe-area-context from 4.8.0 to 4.8.2 in /package/example (#2484)
chore(deps): bump react-native-safe-area-context in /package/example

Bumps [react-native-safe-area-context](https://github.com/th3rdwave/react-native-safe-area-context) from 4.8.0 to 4.8.2.
- [Release notes](https://github.com/th3rdwave/react-native-safe-area-context/releases)
- [Commits](https://github.com/th3rdwave/react-native-safe-area-context/commits/v4.8.2)

---
updated-dependencies:
- dependency-name: react-native-safe-area-context
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-31 17:30:06 +01:00
dependabot[bot]
793ba4860d
chore(deps-dev): bump @types/react from 18.2.43 to 18.2.48 in /package/example (#2483)
chore(deps-dev): bump @types/react in /package/example

Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.2.43 to 18.2.48.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

---
updated-dependencies:
- dependency-name: "@types/react"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-31 17:29:57 +01:00
dependabot[bot]
ac69bfda44
chore(deps-dev): bump prettier from 3.1.1 to 3.2.4 in /package/example (#2482)
Bumps [prettier](https://github.com/prettier/prettier) from 3.1.1 to 3.2.4.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.1.1...3.2.4)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-31 17:29:50 +01:00
dependabot[bot]
75bd937473
chore(deps-dev): bump @expo/config-plugins from 7.2.5 to 7.8.4 in /package (#2477)
chore(deps-dev): bump @expo/config-plugins in /package

Bumps [@expo/config-plugins](https://github.com/expo/expo/tree/HEAD/packages/@expo/config-plugins) from 7.2.5 to 7.8.4.
- [Changelog](https://github.com/expo/expo/blob/main/packages/@expo/config-plugins/CHANGELOG.md)
- [Commits](https://github.com/expo/expo/commits/HEAD/packages/@expo/config-plugins)

---
updated-dependencies:
- dependency-name: "@expo/config-plugins"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-31 17:29:28 +01:00
dependabot[bot]
d8e0577698
chore(deps-dev): bump prettier from 3.1.1 to 3.2.4 in /package (#2475)
Bumps [prettier](https://github.com/prettier/prettier) from 3.1.1 to 3.2.4.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.1.1...3.2.4)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-31 17:29:06 +01:00
dependabot[bot]
d5d7471f80
chore(deps-dev): bump @react-native/typescript-config from 0.73.1 to 0.74.0 in /package (#2473)
chore(deps-dev): bump @react-native/typescript-config in /package

Bumps [@react-native/typescript-config](https://github.com/facebook/react-native/tree/HEAD/packages/typescript-config) from 0.73.1 to 0.74.0.
- [Release notes](https://github.com/facebook/react-native/releases)
- [Changelog](https://github.com/facebook/react-native/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react-native/commits/HEAD/packages/typescript-config)

---
updated-dependencies:
- dependency-name: "@react-native/typescript-config"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-31 17:28:52 +01:00
dependabot[bot]
a346a011b2
chore(deps-dev): bump @types/react from 18.2.43 to 18.2.48 in /package (#2470)
Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.2.43 to 18.2.48.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

---
updated-dependencies:
- dependency-name: "@types/react"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-31 17:28:25 +01:00
Marc Rousavy
060d3f6831
chore: Use npm for demos 2024-01-31 17:17:58 +01:00
Marc Rousavy
af314dacf3
chore: Update react-native-worklets-core
Fixes the JNI Thread not attached error in `runAsync`
2024-01-30 17:58:48 +01:00
Marc Rousavy
5f75b9e8dc
fix: Fix HostObject destructors to make sure a JNI Environment is set up (#2462)
* fix: Fix HostObject destructors to make sure a JNI Environment is set up

* Use `reset` instead of `= nullptr`

* Format

* Format
2024-01-30 16:51:09 +01:00
Marc Rousavy
9e1297531e
fix: Use ThreadScope::WithClassLoader to also load custom JNI Types (#2461)
* fix: Fix `ThreadScope` in `runAsync`

* fix: Use `&`

* Update JVisionCameraScheduler.cpp
2024-01-30 16:37:00 +01:00
Marc Rousavy
33e2adcec6
fix: Fix Unable to retrieve jni environment. Is the thread attached? errors by using jni::ThreadScope (#2457)
fix: Add `jni::ThreadScope` to `JVisionCameraScheduler`
2024-01-30 15:39:33 +01:00
Marc Rousavy
9089014ed8
feat: Add FPS Counter to Android (enableFpsGraph) (#2460)
* feat: Add FPS Counter to Android (`enableFpsGraph`)

* feat: Add FPS View

* Update FpsCounterView.kt

* Implement actual graph

* fix layout

* Update FpsGraphView.kt

* Update CameraPage.tsx
2024-01-30 15:28:18 +01:00
Marc Rousavy
8c5b60355f
perf: Use existing cameraQueue instead of yet another Thread (#2459)
* perf: Use existing `cameraQueue` instead of yet another Thread

* fix: Use `coroutineScope` to avoid wrong use of isActive

* fix: Do the same for `CameraSession`

* Lint
2024-01-30 14:26:55 +01:00
Marc Rousavy
af14f912fb
chore: Move onFrame into Callback on Android (#2458)
* Separate to onFrame

* Restructure FP

* Move lib loading into `CameraViewModule`
2024-01-30 14:17:32 +01:00
Amir Hossein Shekari
02bc8a979c
fix: Fix NullPointerException in initFrameProcessorPlugin if plugin is not found (#2454)
* fix: fix the null exception

* Add `Nullable` and `NonNull` annotations

---------

Co-authored-by: Marc Rousavy <me@mrousavy.com>
2024-01-30 10:52:42 +01:00
Marc Rousavy
d9a301100f
fix: Fix priority being ignored in some Format filters (#2456)
* fix: Expose auto-focus system for Android

* Add `autoFocusSystem` to filter

* Update CameraDeviceDetails.kt

* Update getCameraFormat.ts

* fix: Fix `priority` being ignored in some Format filters

* Update getCameraFormat.ts
2024-01-30 10:52:34 +01:00
Marc Rousavy
b5eb01bac8
fix: Expose auto-focus system for Android (#2455)
* fix: Expose auto-focus system for Android

* Add `autoFocusSystem` to filter

* Update CameraDeviceDetails.kt

* Update getCameraFormat.ts
2024-01-30 10:49:28 +01:00
Marc Rousavy
bdbcf05d14
fix: Fix NullPointerException in VideoPipeline.removeRecordingSessionOutputSurface (#2453) 2024-01-29 18:59:12 +01:00
Marc Rousavy
6d3a3c3c2f
chore: Move perf before fix 2024-01-29 13:47:12 +01:00
Marc Rousavy
d64fc08e16
fix: Fix pixelFormat being native when FP is set (#2450) 2024-01-29 13:39:16 +01:00
Marc Rousavy
587f2b164b
fix: Enable processNestedWorklets to fix runAsync in example (#2449) 2024-01-29 13:39:09 +01:00
Marc Rousavy
c911d25727
fix: Fix SharedArray JSI constructor allocating a new array instead of wrapping (#2444) 2024-01-26 12:05:00 +01:00
Marc Rousavy
8d59f7c3d0
chore: Remove unused file AVCaptureConnection+setInterfaceOrientation.swift 2024-01-26 10:20:55 +01:00
Marc Rousavy
11eb1f68e4
feat: Use yuv by default if no pixelFormat is set (#2441) 2024-01-26 10:07:16 +01:00
Daniel Prado
7e2889cf84
fix: Fix maxImages have been acquired error in Frame Processor (#2430)
* fix: maxImages when frameprocessor error

* fix: Use `try`/`finally` for safety

---------

Co-authored-by: Marc Rousavy <me@mrousavy.com>
2024-01-25 18:17:48 +01:00
Marc Rousavy
bc6f954bf1
fix: Fix Android C++ SharedArray logs 2024-01-25 16:34:45 +01:00
Marc Rousavy
b1fa06514f
fix: Catch insufficient-storage errors (#2422)
* fix: Catch `insufficient-storage` errors

* feat: Implement `insufficient-storage` error for Android

* fix: Catch insufficient storage error also on takePhoto android
2024-01-24 11:48:38 +01:00
Marc Rousavy
7894779094
chore: Remove _log from eslint 2024-01-19 14:33:45 +01:00
Marc Rousavy
b5d039b470
chore: Update Podfile.lock 2024-01-19 12:36:15 +01:00
Marc Rousavy
a739ca18e0
fix: Prevent phone from going to sleep if Camera is active (#2421) 2024-01-19 12:35:33 +01:00
Marc Rousavy
97684af851
fix: Refresh Permissions on AppState change (#2420) 2024-01-19 12:17:04 +01:00
Marc Rousavy
f400487a8d
fix: Remove unneeded synchronized keyword 2024-01-18 20:02:48 +01:00
Marc Rousavy
bae1f52d4a
chore: Cleanup Android codebase (#2415) 2024-01-18 18:55:49 +01:00
Marc Rousavy
50437b6568
chore: release 3.8.2 2024-01-18 10:49:39 +01:00
Marc Rousavy
992934e00e
feat: SharedArray:wrapData:withSize init for iOS (#2410)
* feat: `ArrayBuffer:wrapData:withSize` init for iOS

* Format

* fix build error

* Update ExampleFrameProcessorPlugin.m

* docs: Add class docs for SharedArray
2024-01-18 10:41:26 +01:00
Marc Rousavy
e21a1c2110
fix: Throw not-compatible-with-outputs error when adding both CodeScannerPipeline and VideoPipeline (#2411)
* fix: Throw `not-compatible-with-outputs` error when adding CodeScanner and Video

* Format
2024-01-18 10:40:15 +01:00
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
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
a42c799d89
Update FrameProcessorPlugin.h 2024-01-12 16:13:56 +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
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
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
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
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
0d3ecd1131
fix: Fix min/max exposure range on Android (#2304) 2023-12-21 12:25:46 +01:00
Marc Rousavy
591cf30a06
perf: Make getCameraPermission and getMicrophonePermission synchronous (#2302) 2023-12-19 14:22:04 +01:00
Marc Rousavy
975b9f1959
chore: release 3.6.17 2023-12-14 10:55:11 +01:00
Marc Rousavy
bd5c9675b7
fix: Check torch only if needed (#2215) 2023-12-14 10:54:19 +01:00
Marc Rousavy
977bf56c6d
feat: Concurrent/Cancellable configure (#2282)
* feat: Cancellable `configure`

* Android

* Update Podfile.lock

* Configure outside of lock

* Update lockfiles

* Use `bundle` for CI

* Update script

* Update Podfile.lock

* fix: Set config at end

* Lint
2023-12-13 16:38:02 +01:00
Marc Rousavy
5a81fabedd
chore: release 3.6.16 2023-12-12 16:44:47 +01:00
Marc Rousavy
7d6c058806
Update Podfile.lock 2023-12-12 16:44:28 +01:00
Marc Rousavy
9a187c6d19
feat: Add width and height to VideoFile output (#2281)
* feat: Add `width` and `height` to `VideoFile` output

* Format
2023-12-12 16:43:57 +01:00
Marc Rousavy
98f08800f2
chore: release 3.6.15 2023-12-12 12:09:52 +01:00
Marc Rousavy
263065048c
fix: Fix Only the original thread that created a view hierarchy can touch it's views error (#2278)
* fix: Fix `Only the original thread that created a view hierarchy can touch its views` error

* fix: Also call `SurfaceHolder` method on UI Thread
2023-12-12 12:00:29 +01:00
Marc Rousavy
6107a245c4
fix: Only copy over C++ headers 2023-12-12 11:23:49 +01:00
Rodrigo Gomes
248a08b18c
feat: Support for C++ Frame Processor Plugins by publishing VisionCamera as a prefab (#2251)
* update docs

* add prefabs support
2023-12-12 11:21:21 +01:00
Marc Rousavy
df32d2c5e9
fix: Only close image once 2023-12-12 11:19:42 +01:00
Rodrigo Gomes
9600a38398
fix: Fix out-of-memory crash in QR code scanner by closing Image (#2267)
cover onCompleted listener for codescanner
2023-12-12 11:18:55 +01:00
Marc Rousavy
52f78a119b
feat: Add format filter for iso (#2234) 2023-12-12 11:16:08 +01:00
Przemysław Arlet
99491846a9
fix: Fix RN 0.73 error "'hasConstants' overrides nothing" at CameraDevicesManager.kt (#2264)
Co-authored-by: Przemysław Arlet <przemyslaw.arlet@lamel.pl>
2023-12-12 11:15:46 +01:00
Romick2005
a612eb9d38
fix: Fix NoSuchElementException in getRecommendedBitRate (#2266)
* Remove unused hasConstants method.  Do no thrown error on minBy call when filterd videoProfiles contains zero items.

* Remove not related to the fix changes.
2023-12-12 11:15:10 +01:00
Marc Rousavy
4ee52d6211
feat: Add onStarted and onStopped events (#2273)
* feat: Add `onStarted` and `onStopped` events

* Implement `onStart` for Android

* Update CameraSession.kt

* Update CameraSessionDelegate.swift
2023-12-09 19:09:55 +01:00
Marc Rousavy
9ef4a9a210
chore: release 3.6.14 2023-12-07 18:10:27 +01:00
Marc Rousavy
2ce3b4a0ef
fix: Fix RN 0.73 compatibility (#2260) 2023-12-07 18:09:15 +01:00
Marc Rousavy
d47d12edcf
chore: release 3.6.13 2023-12-04 11:48:00 +01:00