Commit Graph

81 Commits

Author SHA1 Message Date
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
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
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
62e786ad04
docs: Add Kotlin & Swift FP plugins examples (#1902)
* chore(docs): add Kotlin FP example

* chore(docs): add Swift FP plugin
2023-10-03 11:33:48 +02:00
Marc Rousavy
d465c37bea fix: Remove dng PixelFormat 2023-10-03 11:27:46 +02:00
Marc Rousavy
68776f683b chore: Type examplePlugin 2023-09-30 13:35:04 +02:00
Marc Rousavy
b92960a837 chore: Use max zoom of 10 in example 2023-09-30 13:23:17 +02:00
Marc Rousavy
be3d802267 chore: Remove unused ImageWriter 2023-09-30 13:01:56 +02:00
Marc Rousavy
af2ef57951 chore: release 3.2.2 2023-09-30 11:23:05 +02:00
Marc Rousavy
edd73619c3 fix: Fix useCameraDevices ignoring position 2023-09-30 11:20:11 +02:00
Marc Rousavy
844759e5b1 Update Podfile.lock 2023-09-30 11:17:27 +02:00
Marc Rousavy
56f3dcf1c8 chore: release 3.2.1 2023-09-30 10:52:05 +02:00
Marc Rousavy
2430058cae fix: Fix redeclaration build error on Android 2023-09-30 10:51:32 +02:00
Marc Rousavy
34f4038e05 chore: release 3.2.0 2023-09-29 21:59:26 +02:00
Marc Rousavy
b397315360 chore: Include README.md in npm package 2023-09-29 21:59:02 +02:00
Marc Rousavy
f78f05a32c chore: Add README to npm package 2023-09-29 21:56:34 +02:00
Marc Rousavy
85564d6d02
fix: Remove unused Error codes (#1887)
* fix: Remove unused Errors

* Errors.kt -> CameraError.kt

* fix: remove .system
2023-09-29 21:54:35 +02:00
Marc Rousavy
cf1952d8f7
feat: Use AHardwareBuffer* for frame.toArrayBuffer() (#1888)
* feat: Route images through `ImageWriter` into OpenGL pipeline

* fix: Use RGB format

* fix: Every device supports YUV, RGB and NATIVE

* Update VideoPipeline.kt

* log format

* Plug ImageReader between OpenGL pipeline

* Call Frame Processor

* Format

* Remove logs

* feat: Use `HardwareBuffer` for `toArrayBuffer()`

* Format
2023-09-29 21:54:04 +02:00
Marc Rousavy
954b44810b
feat: Route images through ImageWriter into OpenGL pipeline (#1874)
* feat: Route images through `ImageWriter` into OpenGL pipeline

* fix: Use RGB format

* fix: Every device supports YUV, RGB and NATIVE

* Update VideoPipeline.kt

* log format

* Plug ImageReader between OpenGL pipeline

* Call Frame Processor

* Format

* Remove logs
2023-09-29 21:52:19 +02:00
Marc Rousavy
a1fbba8d66 chore: Fix formatting 2023-09-29 19:42:28 +02:00
Touch Marine
fb812a6618
fix: Incorrect zoom on Android < 11 (#1878)
* fix: Incorrect zoom on Android < 11

Fixes #1865

* Clamp zoom on Android

Some unclamped zoom values crash. For example, zoom={0.5} crashes
(tested on Android 9).

* Extract zoom into an extension (Android)

* Update package/android/src/main/java/com/mrousavy/camera/extensions/CaptureRequest+setZoom.kt

---------

Co-authored-by: Marc Rousavy <marcrousavy@hotmail.com>
2023-09-29 19:41:37 +02:00
Marc Rousavy
016dfa725d Update Podfile.lock 2023-09-29 15:31:35 +02:00
Marc Rousavy
9d02f5141d
fix: Use compressed buffer format as default format as well (#1884)
* fix: Use compressed buffer format as default format as well

* chore: Format Swift
2023-09-29 15:27:17 +02:00
Marc Rousavy
902dc634a4
feat: Add customizable Video Bit Rate (videoBitRate) (#1882)
* feat: Add `videoBitRate` option to `RecordVideoOptions`

* feat: Implement `videoBitRate` on iOS

* feat: Implement `videoBitRate` on Android

* chore: Format

* docs: Separate recording and photo docs

* docs: Fix links

* docs: Add docs about bitrate and quality

* docs: Add blob

* fix: Don't use inline style for CI

* fix: Correctly log default bitRate

* fix: Fix typo

* fix: Calculate default bit-rate on Android depending on resolution

* Update RecordingSession.kt
2023-09-29 15:27:09 +02:00
Marc Rousavy
fb6ebd9ee1 fix: Allow nil preferredDevice
Fixes #1870
2023-09-27 12:51:38 +02:00
Marc Rousavy
14721d314f
chore: Remove semicolons (#1846)
* chore: Disable `semi` in Prettier

* chore: Format w/o semi

* Remove more `;`

* Lint example

* More ;
2023-09-26 11:39:17 +02:00
Marc Rousavy
f7428f26a4
fix: Allow getCameraDevice to return undefined when no Devices are available (e.g. iOS Simulator) (#1848)
fix: Allow `getCameraDevice` to return `undefined` when no Devices are available
2023-09-26 11:24:24 +02:00
Marc Rousavy
bdc3fd0341 chore: release 3.1.0 2023-09-25 13:05:43 +02:00
Marc Rousavy
979656d379 chore: Update install links 2023-09-25 13:04:22 +02:00
Marc Rousavy
706341fbdb
feat: Add Templates API for choosing Camera Formats (#1844)
* docs: New V3 docs for new API

* fix: Prefer Wide-Angle unless explicitly opted-out

* docs: Update DEVICES

* Finish Devices docs

* Switch links

* Revert "Switch links"

This reverts commit 06f196ae0e67787cbd5768e125be6d0a3cb5bbc9.

* docs: New LIFECYCLE

* docs: New CAPTURING docs

* Update Worklets links

* docs: Update TROUBLESHOOTING and ZOOMING

* fix: Update `getAvailableCameraDevices()` usages

* docs: Update FORMATS

* Update Errors.kt

* docs: Fix broken links

* docs: Update references to old hooks

* docs: Create Frame Processor Tips

* docs: Auto-dark mode

* fix: Fix FPS filter

* feat: Add `'max'` flag to format filter

* fix: Use loop

* fix: Fix bug in `getCameraFormat`

* fix: Find best aspect ratio as well

* fix: Switch between formats on FPS change

* Update FRAME_PROCESSOR_PLUGIN_LIST.mdx

* Add FPS graph explanation

* feat: Add `Templates` API for choosing Camera Formats
2023-09-25 13:00:25 +02:00
Marc Rousavy
2d66d5893c
docs: New V3 docs for new API (#1842)
* docs: New V3 docs for new API

* fix: Prefer Wide-Angle unless explicitly opted-out

* docs: Update DEVICES

* Finish Devices docs

* Switch links

* Revert "Switch links"

This reverts commit 06f196ae0e67787cbd5768e125be6d0a3cb5bbc9.

* docs: New LIFECYCLE

* docs: New CAPTURING docs

* Update Worklets links

* docs: Update TROUBLESHOOTING and ZOOMING

* fix: Update `getAvailableCameraDevices()` usages

* docs: Update FORMATS

* Update Errors.kt

* docs: Fix broken links

* docs: Update references to old hooks

* docs: Create Frame Processor Tips

* docs: Auto-dark mode

* fix: Fix FPS filter

* feat: Add `'max'` flag to format filter

* fix: Use loop

* fix: Fix bug in `getCameraFormat`

* fix: Find best aspect ratio as well

* fix: Switch between formats on FPS change

* Update FRAME_PROCESSOR_PLUGIN_LIST.mdx

* Add FPS graph explanation

* feat: Support HDR filter

* docs: Add HDR docs

* docs: Add Video Stabilization

* docs: Update Skia docs

* Skia links

* Add Skia labels

* Update SKIA_FRAME_PROCESSORS.mdx

* docs: Add Performance

* Update some wording

* Update headers / and zoom

* Add examples for devices

* fix highlights

* fix: Expose `Frame`

* docs: Update FP docs

* Update links

* Update FRAME_PROCESSOR_CREATE_PLUGIN_IOS.mdx
2023-09-25 12:57:03 +02:00
Marc Rousavy
2d96381b3e
feat: New array-based useCameraFormats API (#1841)
* feat: New array-based `useCameraFormats` API

* Use triple-camera in Example app

* fix: Remove invalid export

* fix: Use constant-time lookup Filter map and only run sort once
2023-09-23 11:24:15 +02:00
Marc Rousavy
3169444697
feat: Implement resizeMode prop for iOS (#1838)
* feat: Implement `resizeMode` prop for iOS

- `"cover"`: Keep aspect ratio, but fill entire parent view (centered).
- `"contain"`: Keep aspect ratio, but make sure the entire content is visible even if it introduces additional blank areas (centered).

* chore: Update prop docs

* Update CameraProps.ts

* Lint & Format
2023-09-23 10:14:27 +02:00