Commit Graph

1443 Commits

Author SHA1 Message Date
Adolfo E. García
8f986a45ea fix: Set correct namespace in build.gradle (#2104)
* fix: set correct namespace in build.gradle

* chore: refactor Android project for compatibility with multiple Gradle versions

---------

Co-authored-by: Marc Rousavy <me@mrousavy.com>
2023-10-31 15:13:12 +01:00
Marc Rousavy
cc65ec26a9 fix: Fix Video codec, bitRate and flash being ignored on iOS (#2113)
* fix: Fix VIdeo `codec`, `bitRate` and `flash` being ignored on iOS

* Update RecordVideoOptions.swift
2023-10-31 15:09:27 +01:00
Christian Falch
4c9a707866 fix: Use Worklets 0.2.4 to fix FP crash (#2102)
Also changed the namespace in the build gradle to
not be com.mrousavy.camera.example - this would
crash when using dex in release mode on android.
Changed to `com.mrousavy.camera`.
2023-10-31 15:09:05 +01:00
Marc Rousavy
fe6221e4e0 docs: Add Worklets babel plugin to docs 2023-10-31 15:04:52 +01:00
Marc Rousavy
f4617a3918 fix: Set isRunning to true 2023-10-25 13:38:12 +02:00
Marc Rousavy
ca6af86630 chore: release 3.6.4 2023-10-25 12:58:19 +02:00
Marc Rousavy
bcf201a9a3 fix: Ensure format is properly checked for equality (#2083)
* fix: Properly check for equality in `CameraDeviceFormat`

* Update CameraSession.kt

* fix: Fix `autoFocusSystem` parsing

* Format
2023-10-25 12:56:32 +02:00
Marc Rousavy
d675b6a9da fix: Fix CodeScanner not being called (#2082) 2023-10-25 12:41:54 +02:00
Marc Rousavy
3b7f020566 feat: Basic Flash for Android (#2081)
Implements a semi-working version of flash photo capture for Android.

This isn't properly implemented because a proper implementation requires a fully custom precapture sequence that enables the torch, then waits for AE/AF to adjust, lock AE/AF, then capture with a single torch burst, and then turn the torch off again. This is quite complex, that's why the feature request #1890 is marked at $3,000.

For now, this is a simple flash burst which _sometimes works_, _sometimes not_ - highly depends on the device.

If anyone wants true working flash capture, sponsor in #1890.
2023-10-25 12:41:40 +02:00
Marc Rousavy
3b9edfb774 chore: release 3.6.3 2023-10-24 15:49:06 +02:00
Marc Rousavy
40268c4a05 fix: Fix getting triple devices with useCameraDevice (#2074) 2023-10-24 15:48:39 +02:00
Marc Rousavy
8d65d1d53c fix: Fix physical devices detection on Android (#2073)
* fix: Fix physical devices detection on Android

* Update useCameraDevices.ts
2023-10-24 15:42:44 +02:00
Marc Rousavy
e1f8e1bd2a docs: Add "Templates" to Format docs 2023-10-24 14:50:29 +02:00
Marc Rousavy
f90dace142 chore: release 3.6.2 2023-10-24 14:28:24 +02:00
Marc Rousavy
8a5dfd6ac6 fix: Fix physicalDevices DeviceType computation on Android (#2072)
* fix: Fix device type calculation on Android

* fix: Type safety for deviceTypes

* fix: Update docs
2023-10-24 14:27:47 +02:00
Marc Rousavy
5b1e5f3c9d fix: Skip if no Preview Output is attached 2023-10-24 13:58:57 +02:00
Marc Rousavy
f91adb13be fix: Use same error message 2023-10-24 13:44:03 +02:00
Marc Rousavy
fcefc7f9d9 chore: release 3.6.1 2023-10-24 13:39:56 +02:00
Marc Rousavy
62be941dbb fix: Fix missing self for delegate 2023-10-24 13:39:25 +02:00
Marc Rousavy
86b3b9e1d7 chore: release 3.6.0 2023-10-24 12:00:57 +02:00
Marc Rousavy
0bc3ee12bf Send onInitialized event only if device changed 2023-10-24 11:59:22 +02:00
Marc Rousavy
de0d6cda5d feat: Implement atomically single-lock core/ library on Android (#2049)
* feat: Create base for `CameraConfiguration` diff

* Fix

* Write three configure methods

* Build?

* MOre

* Update CameraView+RecordVideo.kt

* Fix errors

* Update CameraDeviceDetails.kt

* Update CameraSession.kt

* Auto-resize Preview View

* More

* Make it work? idk

* Format

* Call `configure` under mutex, and change isActive

* fix: Make Outputs comparable

* fix: Make CodeScanner comparable

* Format

* fix: Update outputs after reconfiguring

* Update CameraPage.tsx

* fix: Close CaptureSession before
2023-10-24 11:19:03 +02:00
Marc Rousavy
23d173f6fc chore: release 3.5.1 2023-10-19 18:37:06 +02:00
Marc Rousavy
5d9d153e54 fix: Fix Xcode 15 build error (var instead of let) (#2048)
* fix: Fix Xcode 15 build error (`var` instead of `let`)

* chore: Restructure code a bit for that logic

* Update CameraDevicesManager.swift
2023-10-19 17:43:20 +02:00
Marc Rousavy
00718ea0ee fix: Set sensorOrientation to landscapeRight 2023-10-19 17:02:07 +02:00
Marc Rousavy
993b9f5a37 chore: release 3.5.0 2023-10-19 13:38:19 +02:00
Marc Rousavy
217461ff5d feat: Make Frame Processors work on API <29 (#2041) 2023-10-19 11:47:30 +02:00
Marc Rousavy
da25aa1c1f fix: Add getFrameProcessorPlugin for backwards compatibility (#2040) 2023-10-19 11:35:02 +02:00
Marc Rousavy
3929c0ac46 fix: Initialize Plugins in a static block of ReactPackage (#2039)
* fix: Initialize Plugins in a `static` block of ReactPackage

* fix: Also register FP Plugins in Example
2023-10-19 11:34:09 +02:00
Marc Rousavy
07027d8010 fix: Rename getFrameProcessorPlugin to initFrameProcessorPlugin (#2038)
* fix: Rename `getFrameProcessorPlugin` to `initFrameProcessorPlugin`

* fix: Make nullable, add comments

* Format

* Update FrameProcessorPlugin.java

* Update FrameProcessorPlugin.h

* fix: Fix dead links

* Call super constructor

* Update ExampleFrameProcessorPlugin.java

* fix: Init calls
2023-10-19 11:19:47 +02:00
Mateusz Mędrek
a291642c53 feat: Reintroduce Macros for Frame Processor Plugin registration (#2027)
in VisionCamera v1 & v2 there were two ObjC macros that were helping
in creation/registration of Frame Processors, but these were removed with
v3

This PR reintroduces such macros, which will not only make FP development
easier, but also it will also fix issues people had with registration of
Swift Frame Processors (+load vs +initialize issues)

Docs were also updated to reflect that the macros should be used to
correctly initialize and register ObjC/Swift Frame Processors
2023-10-19 10:35:14 +02:00
Marc Rousavy
2666ac53a6 fix: Fix build on Xcode 14 (#2033)
* fix: Fix build on Xcode 14

* Format

* Make CI run on `macOS-latest`

* Nested if
2023-10-18 18:25:30 +02:00
Marc Rousavy
9573ae19cb fix: Remove unneeded kotlin-android-extensions dependency (#2034) 2023-10-18 18:22:34 +02:00
Marc Rousavy
89dfd351e0 fix: Fix torch not working on iOS (#2031)
* fix: Fix `torch` not working on iOS

* Format

* fix: Use `withSessionLock` and `withDeviceLock`

* Update CameraSession.swift

* Update RecordingSession.swift
2023-10-18 18:04:58 +02:00
Marc Rousavy
6956fded2d chore: release 3.4.1 2023-10-18 17:48:04 +02:00
Marc Rousavy
764897dcf1 Update .gitattributes 2023-10-18 13:13:40 +02:00
Marc Rousavy
e845dc8397 Update .gitattributes 2023-10-18 11:30:01 +02:00
Marc Rousavy
b4960d1e5f Update .gitattributes 2023-10-17 15:04:06 +02:00
Marc Rousavy
674d96706a fix: Fix Code Type not supported error (#2022) 2023-10-17 11:55:11 +02:00
Marc Rousavy
4e1a1fd68b fix: Rename parsers/ to types/ (#2021)
chore: Rename `parsers/` to `types/`
2023-10-17 11:49:04 +02:00
Marc Rousavy
3b1d8353a5 chore: Add .gitattributes 2023-10-16 18:07:04 +02:00
Marc Rousavy
2af965d1ad fix: Log in FrameProcessorPluginRegistry (#2012)
* fix: Log when adding Frame Processor Plugin

* fix: Also log on Android

* Add logs in get as well

* fix: Fix string concat on Android
2023-10-16 17:51:18 +02:00
Marc Rousavy
ce9a505776 chore: release 3.4.0 2023-10-16 17:15:12 +02:00
Marc Rousavy
5e20f9c8fa chore: Rename CodeScanner to CodeScannerOptions in native (#2010)
* chore: Rename `CodeScanner` to `CodeScannerOptions` on native

* chore: Rename `CodeScanner` on iOS

* fix: Unwrap `options`

* Format
2023-10-16 16:56:39 +02:00
Marc Rousavy
e8ae11e30b fix: Fix CodeScanner stalling on Android (#2009) 2023-10-16 16:28:51 +02:00
Marc Rousavy
8884a1c3e4 docs: Update phrasing 2023-10-16 13:40:52 +02:00
Marc Rousavy
208d737e9d docs: Update meta tags 2023-10-16 13:37:09 +02:00
Marc Rousavy
53475dc1f3 docs: Use wrong index again 2023-10-16 13:24:08 +02:00
Marc Rousavy
e8df7148fa fix: Run CodeScanner on default queue, fix stalling (#2002)
* fix: Run CodeScanner on default queue, fix stalling

* fix: Use `MAX_IMAGES` of 3
2023-10-14 13:30:21 +02:00
Marc Rousavy
ea98112a21 fix: Fix basic Orientation on iOS (#2000)
* fix: Fix basic Orientation on iOS

* ci: Use macOS 13 runner for latest Xcode 15

* chore: Remove Xcode 15 checks

* Format
2023-10-14 13:17:14 +02:00