Commit Graph

1542 Commits

Author SHA1 Message Date
Marc Rousavy
315fcb68a8
fix: Fix FpsGraph not updating 2023-10-14 12:41:53 +02:00
Marc Rousavy
62ca95725d
fix: Fix torch not turning off after it has been enabled (#1997)
fix: Fix torch and low-light boost not turning off again
2023-10-13 18:44:44 +02:00
Marc Rousavy
cd0b413706
feat: New Core/ library (#1975)
Moves everything Camera related into `core/` / `Core/` so that it is better encapsulated from React Native.

Benefits:

1. Code is much better organized. Should be easier for collaborators now, and cleaner codebase for me.
2. Locking is fully atomically as you can now only configure the session through a lock/Mutex which is batch-overridable
    * On iOS, this makes Camera startup time **MUCH** faster, I measured speedups from **1.5 seconds** to only **240 milliseconds** since we only lock/commit once! 🚀 
    * On Android, this fixes a few out-of-sync/concurrency issues like "Capture Request contains unconfigured Input/Output Surface!" since it is now a single lock-operation! 💪 
3. It is easier to integrate VisionCamera outside of React Native (e.g. Native iOS Apps, NativeScript, Flutter, etc)

With this PR, VisionCamera V3 is up to **7x** faster than V2
2023-10-13 18:33:20 +02:00
Marc Rousavy
54871022f4
docs: Use correct index 2023-10-12 10:15:01 +02:00
Marc Rousavy
e8bb5cfec0
docs: Remove some links that just didn't work for some reason 2023-10-12 10:14:48 +02:00
Marc Rousavy
18e69269d4
fix: Catch errors in CaptureSession configuration 2023-10-10 19:18:54 +02:00
Marc Rousavy
727fb39f01
fix: Close previous Outputs to free memory 2023-10-10 19:17:36 +02:00
Marc Rousavy
10a44d5b79
fix: Also close outputs in destroy() 2023-10-10 19:10:42 +02:00
Marc Rousavy
bccd73d704
Revert "fix: Close CameraSession in onDetachedFromWindow() (#1962)"
This reverts commit 02726d47f7.
2023-10-10 19:06:06 +02:00
Vahid Hasani
02726d47f7
fix: Close CameraSession in onDetachedFromWindow() (#1962)
* Close camera session in onDetachedFromWindow

* Remove cache folder

---------

Co-authored-by: Marc Rousavy <me@mrousavy.com>
2023-10-10 19:01:54 +02:00
Marc Rousavy
1e7059ca8f
Revert "fix: Remove Frame Processor when Camera unmounts (#1960)"
This reverts commit d51ac1529b.
2023-10-10 18:58:47 +02:00
Tuan Luong
d51ac1529b
fix: Remove Frame Processor when Camera unmounts (#1960)
* unsetFrameProcessor when camera view is removed

* Use `this.lastFrameProcessor` instead

---------

Co-authored-by: Marc Rousavy <marcrousavy@hotmail.com>
2023-10-10 18:55:08 +02:00
Marc Rousavy
18b30cd073
fix: Always call CaptureSession fully synchronously under Mutex (#1972)
* fix: Always call `CaptureSession` fully synchronously under Mutex

* Update CameraView.kt

* chore: Format
2023-10-10 18:51:46 +02:00
Marc Rousavy
915ef331d3
feat: Extract CodeScannerPipeline & fix stalling (#1971)
* chore: Extract CodeScannerPipeline

* chore: Format

* Update CodeScannerPipeline.kt
2023-10-10 18:51:36 +02:00
Marc Rousavy
a2e5cef37e
chore: Fix docs links 2023-10-10 18:40:15 +02:00
Marc Rousavy
b33174399e
docs: Fix broken links 2023-10-10 18:21:39 +02:00
Marc Rousavy
a498144fd5
chore: Update doc URLs 2023-10-09 11:17:07 +02:00
Marc Rousavy
6e72781500
feat: Use correct photo and video format dimensions on iOS (#1929)
* feat: Use new photo dimensions API

* Update AVCaptureDevice.Format+matchesFilter.swift

* fix: Use Pixels instead of Points for video size

* feat: Set `PhotoOutput`'s maximum photo resolution

* fix: Compare dictionaries instead

* chore: Format code

* fix: Try to use hash.... failing atm

* fix: Use rough comparison again

* fix: Also take video HDR into consideration

* chore: Format

* Use contains

* Update AVCaptureDevice.Format+toDictionary.swift

* docs: Add better docs to Camera props

* Update CameraView+AVCaptureSession.swift

* Update CameraView+AVCaptureSession.swift
2023-10-06 16:11:09 +02:00
Marc Rousavy
a4448c3a7d
fix: Fix focus() on iOS (#1943) 2023-10-06 14:30:12 +02:00
Erwan LE PRADO
9d71990570
feat: Activate Torch Mode on Android (#1932) 2023-10-06 14:28:57 +02:00
Marc Rousavy
4cbe8324d5
chore: Replace ' with " 2023-10-06 13:04:34 +02:00
Marc Rousavy
92c27b06ae Update DEVICES.mdx 2023-10-06 11:53:13 +02:00
Marc Rousavy
36e9e00930
docs: Add **Flash** documentation 2023-10-05 16:40:15 +02:00
Marc Rousavy
3750734578 chore: release 3.3.1 2023-10-05 14:52:47 +02:00
Marc Rousavy
1843f7ac3a
feat: Add "Camera Devices" screen to Example (#1927)
* feat: Add "Camera Devices" screen to Example

* feat: Store device in MMKV
2023-10-05 14:52:03 +02:00
Marc Rousavy
658695dca5
docs: Use smaller title on mobile (#1928) 2023-10-05 14:50:36 +02:00
Nate Krieger
b14958b1b0
docs: Fix closing xml tag for CodeScanner docs (#1918)
* add full list of supported codes to example and add closing xml tag

* Revert exhaustive code list in example

---------

Co-authored-by: Nate Krieger <nate.krieger@traxero.co>
2023-10-05 14:48:30 +02:00
Marc Rousavy
cc0256a0fe chore: Fix lockfiles 2023-10-05 13:38:58 +02:00
Marc Rousavy
e4d9764637 chore: Upgrade lockfiles 2023-10-05 13:35:44 +02:00
Marc Rousavy
fab631d61a fix: Remove string-hash-64 dependency
That's a dependency of react-native-worklets-core.
2023-10-05 12:03:57 +02:00
Marc Rousavy
ffd64feee8 feat: Add enableCodeScanner to Expo Config Plugin 2023-10-05 11:06:38 +02:00
Jakov Glavina
6e249d165a
feat: Add Expo Config Plugin for CodeScanner MLKit Barcode Model downloader (#1916) 2023-10-05 10:58:31 +02:00
Marc Rousavy
59699929f4 fix: Use minSdkVersion of 26 again 2023-10-05 10:56:30 +02:00
Marc Rousavy
c9795ce767
fix: Fix clean build error (#1924)
Fixes https://github.com/mrousavy/react-native-vision-camera/issues/1915
2023-10-05 10:46:33 +02:00
Marc Rousavy
3ed74e6794 chore: release 3.3.0 2023-10-04 13:02:41 +02:00
Marc Rousavy
93019c37e6 docs: Update example 2023-10-04 13:00:23 +02:00
Marc Rousavy
889b37d063 docs: Update links 2023-10-04 12:57:30 +02:00
Marc Rousavy
5efaefee98 docs: Update QR Code references 2023-10-04 12:56:47 +02:00
Marc Rousavy
6640b72a00
feat: Code Scanner API (#1912)
* feat: CodeScanner JS API

* feat: iOS

* Use guard

* Format

* feat: Android base

* fix: Attach Surfaces

* Use isBusy var

* fix: Use separate Queue

* feat: Finish iOS types

* feat: Implement all other code types on Android

* fix: Call JS event

* fix: Pass codetypes on Android

* fix: iOS use Preview coordinate system

* docs: Add comments

* chore: Format code

* Update CameraView+AVCaptureSession.swift

* docs: Add Code Scanner docs

* docs: Update

* feat: Use lazily downloaded model on Android

* Revert changes in CameraPage

* Format

* fix: Fix empty QR codes

* Update README.md
2023-10-04 12:53:52 +02:00
Marc Rousavy
2c08e5ae78 fix: Also clean VisionCamera build cache 2023-10-04 11:11:12 +02:00
Marc Rousavy
4fc8cd2e01 fix: Clean C++ CMake cache (.cxx/) on clean 2023-10-04 11:06:39 +02:00
Marc Rousavy
e9b39924d7 docs: Add "Pixel Formats" documentation page 2023-10-03 14:35:26 +02:00
Marc Rousavy
9a777ba240 fix: Only use supported PixelFormats 2023-10-03 14:05:23 +02:00
Marc Rousavy
224bffd4dc fix: Use dynamic video format 2023-10-03 13:59:19 +02:00
Marc Rousavy
324e269173
fix: Set minSdkVersion to 23 (#1911)
* fix: Set `minSdkVersion` to 21

* sorry I meant 23
2023-10-03 13:52:42 +02:00
Marc Rousavy
8d90dcc476
fix: Make HardwareBuffers compile optionally (opt-out in minSdkVersion <26) (#1910)
* fix: Make HardwareBuffers compile optionally

* chore: Format C++ code

* fix: Fix if
2023-10-03 13:18:41 +02:00
Marc Rousavy
83c0cdb030
fix: Fix CamcorderProfile get crash on Samsung devices (#1907) 2023-10-03 12:04:03 +02:00
Marc Rousavy
1cdc3d1d9c
fix: Fix +load not available in Xcode 15 error (#1908) 2023-10-03 12:03:29 +02:00
Marc Rousavy
24f77fb224
fix: Use simple wide-angle device if no options are passed (#1909) 2023-10-03 12:03:20 +02:00
Mateusz Mędrek
bdd81cf2fb
chore: Improve native Frame Processor Plugin documentation (#1877) 2023-10-03 11:36:55 +02:00