Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ✨ V3 ✨ #1466

Merged
merged 115 commits into from
Sep 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
28a43f7
chore: Drop support for RN < 71 to simplify buildscript
mrousavy Feb 8, 2023
11d1e71
chore: Upgrade to RN 71 (#1465)
mrousavy Feb 9, 2023
a0590dc
feat: Replace Reanimated with RN Worklets (#1468)
mrousavy Feb 13, 2023
30b5615
feat: Sync Frame Processors (plus `runAsync` and `runAtTargetFps`) (#…
mrousavy Feb 15, 2023
f0ea181
fix: Fix CI for V3 (#1475)
mrousavy Feb 15, 2023
6825c1f
fix: Print correct error in build.gradle
mrousavy Feb 15, 2023
222ded4
fix: Prevent possible crash in log error handler
mrousavy Feb 15, 2023
770357f
chore: Bump to 3.0.0-rc.0
mrousavy Feb 15, 2023
2909085
chore: release 3.0.0-rc.1
mrousavy Feb 15, 2023
0635d4a
fix: Add missing `<regex>` header
mrousavy Feb 15, 2023
1f7a2e0
fix: Fix `global.FrameProcessorPlugins` TS error
mrousavy Feb 15, 2023
12f850c
feat: Draw onto `Frame` as if it was a Skia Canvas (#1479)
mrousavy Feb 21, 2023
1ddea17
chore: release 3.0.0-rc.2
mrousavy Feb 21, 2023
0c3cd66
fix: Improve C++ safety by attaching Cache Invalidator to `jsi::Runti…
mrousavy Feb 21, 2023
cf19ff2
fix: Fix Android namespace
mrousavy Feb 21, 2023
ad5d64b
fix: ignore duplicate `.so` libraries in package
mrousavy Feb 22, 2023
f227a3e
fix: Catch `device == null` error
mrousavy Feb 23, 2023
61f19df
fix: Remove RN Skia dependency on Android for now
mrousavy Feb 23, 2023
622d383
feat: Make Frame Processor Plugins object-oriented on iOS as well (#1…
mrousavy Feb 27, 2023
f791c6b
feat: Better Native Module Error Detection (#1515)
mrousavy Mar 13, 2023
0d83a13
feat: New `CameraDevice` + `CameraFormat` detection using CameraX (#1…
mrousavy Mar 13, 2023
a1af891
fix: Use `global.expo.modules` for JSI expo modules
mrousavy Mar 15, 2023
6deb686
fix: Remove temp-patch for REA plugin
mrousavy Mar 21, 2023
e1973b9
chore: Use Reanimated 3 from npm
mrousavy Mar 21, 2023
af4e366
fix: Fix `runAtTargetFps` for multiple invocations per FP
mrousavy Mar 21, 2023
533c32a
docs: fix wrong comment
mrousavy Mar 29, 2023
38749fb
fix: Fix missing Camera error
mrousavy Apr 21, 2023
bb7ab30
fix: Set min iOS version to 12.4
mrousavy Apr 24, 2023
bf52e8d
chore: Upgrade React Native for Xcode fix
mrousavy Apr 24, 2023
0327983
chore: Upgrade RN Skia
mrousavy May 2, 2023
f03dde7
fix: Fix Skia build (#1582)
mrousavy May 3, 2023
820db3c
android: add build support with RNSkia
hannojg May 4, 2023
4ad4804
chore: Upgrade Skia to new Ganesh Rendering Pipeline and RN to 0.72 (…
mrousavy Jul 3, 2023
82eaf95
chore: Extract to `convertMTLTextureToSkImage`
mrousavy Jul 3, 2023
d964f40
Merge branch 'v3' of https://github.com/mrousavy/react-native-vision-…
mrousavy Jul 3, 2023
0111f2e
fix: Simplify Podfile
mrousavy Jul 3, 2023
7ae15af
feat: Add RN 0.72 support (`namespace` in build.gradle)
mrousavy Jul 3, 2023
cde8b76
chore: Remove react-native-slider
mrousavy Jul 3, 2023
66c6481
fix: Downgrade Gradle to 7.5.1
mrousavy Jul 3, 2023
0139324
fix: Use correct Gradle version
mrousavy Jul 3, 2023
5fb594c
fix: Fix Worklets imports
mrousavy Jul 3, 2023
375e894
feat: Complete iOS Codebase rewrite (#1647)
mrousavy Jul 20, 2023
44ed42d
feat: Expose unified `VisionCameraProxy` object, make `FrameProcessor…
mrousavy Jul 21, 2023
86dd703
feat: Rewrite Android C++ part (`VisionCameraProxy` + `JFrame`) (#1661)
mrousavy Jul 21, 2023
78a64ab
chore: Bump version
mrousavy Jul 31, 2023
deeb8db
fix: Fix namespace
mrousavy Jul 31, 2023
c2096a4
fix: Fix FP Plugin init call
mrousavy Jul 31, 2023
7c721cc
fix: Remove iOS 13 guard
mrousavy Jul 31, 2023
127656b
fix: pragma once
mrousavy Jul 31, 2023
bc9c157
fix: Move implementation for FrameProcessorPlugin to `.m`
mrousavy Jul 31, 2023
0949dab
chore: release 3.0.0-rc.4
mrousavy Jul 31, 2023
1e57e5b
ci: Add CI tests to build Android without Skia or FP
mrousavy Jul 31, 2023
1197df7
fix: Fix `make_shared` not working on `FrameHostObject`
mrousavy Jul 31, 2023
d62a2cd
chore: Upgrade root dependencies (#1663)
mrousavy Jul 31, 2023
61fd4e0
Merge branch 'main' into v3
mrousavy Jul 31, 2023
37a3548
feat: Full Android rewrite (CameraX -> Camera2) (#1674)
mrousavy Aug 21, 2023
54240b0
chore: Update lockfiles
mrousavy Aug 21, 2023
390f48d
fix: Add `GrMTLHandle` import
mrousavy Aug 21, 2023
1f12192
fix: Don't error if session closes
mrousavy Aug 21, 2023
1d12cd9
Optimize imports
mrousavy Aug 21, 2023
07ba0e1
fix: Improve `build.gradle`
mrousavy Aug 21, 2023
e1b0408
fix: Clean up codebase
mrousavy Aug 21, 2023
4d77bc3
Try to select HDR profile
mrousavy Aug 21, 2023
94d9b69
fix: Remove unused constructor
mrousavy Aug 21, 2023
0a51980
fix: Use default HDR if not applicable
mrousavy Aug 21, 2023
a46839a
feat: Add `enableShutterSound` prop to `takePhoto()` 🔊 (#1702)
mrousavy Aug 21, 2023
617c560
fix: Remove unused imports
mrousavy Aug 23, 2023
862e05b
feat: Allow build without Skia or Frame Processors (#1710)
mrousavy Aug 23, 2023
521d7c8
feat: Use `ByteBuffer` for much faster `toArrayBuffer()` :zap:
mrousavy Aug 23, 2023
3a0d7b3
fix: Fix `JByteBuffer`
mrousavy Aug 23, 2023
86468e3
fix: Use direct `ByteBuffer`
mrousavy Aug 23, 2023
efe6556
feat: Implement `enableZoomGesture` on Android
mrousavy Aug 23, 2023
4b009a0
fix: Improve performance of zoom, fps, hdr and format selection
mrousavy Aug 23, 2023
c88605e
fix: Fix circular dependency in `FrameProcessorPlugins.ts`
mrousavy Aug 24, 2023
23af74a
feat: Support `focus()` on Android (#1713)
mrousavy Aug 24, 2023
57592d4
chore: release 3.0.0-rc.6
mrousavy Aug 24, 2023
4833c3e
chore: Bump version
mrousavy Aug 24, 2023
66c012f
fix: Fix `node_modules/` directory detection
mrousavy Aug 24, 2023
d275812
fix: Error on disabled Frame Processors
mrousavy Aug 24, 2023
e036b31
fix: Lock PixelBuffer for read in `toArrayBuffer()`
mrousavy Aug 24, 2023
dfee3b1
fix: Export `pixelFormat` property on iOS
mrousavy Aug 24, 2023
828e1ba
chore: Bump version to RC.7
mrousavy Aug 25, 2023
f87bc74
chore: release 3.0.0-rc.8
mrousavy Aug 25, 2023
dfb86e1
feat: Replace `*NativeMap` and `*NativeArray` with `Map<K,V>` and `Li…
mrousavy Aug 25, 2023
ea3686c
feat: Create C++/OpenGL-based Video Pipeline for more efficient Recor…
mrousavy Aug 29, 2023
3b04757
fix: Make Skia and Worklets optional in `package.json` (#1728)
rocket13011 Aug 29, 2023
6bbb44d
fix: Fix scene mode crash on some emulators
mrousavy Aug 31, 2023
a7c137d
feat: Skia for Android (#1731)
mrousavy Sep 1, 2023
2282908
chore: release 3.0.0-rc.9
mrousavy Sep 1, 2023
0a28454
chore: Remove Skia ❌🎨 (#1740)
mrousavy Sep 1, 2023
03b57a7
feat: Use clang-format to keep the C++ codebase clean (#1741)
mrousavy Sep 1, 2023
01a79d6
chore: Restructure codebase a bit (#1742)
mrousavy Sep 1, 2023
0e9f1ca
perf: Improve `pixelFormat` and add `CameraDevice.sensorOrientation` …
mrousavy Sep 1, 2023
b2ea240
Update clang-format.sh
mrousavy Sep 1, 2023
65aa9b4
docs: Add fancy new Banner :sparkles:
mrousavy Sep 1, 2023
2a5c333
docs: New README (#1744)
mrousavy Sep 1, 2023
036856a
chore: Move everything into `package/` (#1745)
mrousavy Sep 1, 2023
19eabe2
Update .gitignore
mrousavy Sep 1, 2023
7772fc3
Update .gitignore
mrousavy Sep 1, 2023
290a20f
docs: Update CONTRIBUTING
mrousavy Sep 1, 2023
c3f6589
Update issue templates
mrousavy Sep 1, 2023
0ee9cb3
chore: release 3.0.0-rc.10
mrousavy Sep 1, 2023
033ddb8
Move prettier and babel to separate files
mrousavy Sep 1, 2023
325fc4d
chore: Change line width to 140 in C++
mrousavy Sep 1, 2023
cebb7b3
Update .prettierrc.js
mrousavy Sep 1, 2023
fc0e2bf
fix: Fix `savePhotoToFile()` sometimes writing empty files (#1746)
vonovak Sep 1, 2023
a3b48f4
Add `start` script
mrousavy Sep 1, 2023
18d5400
Add Image to example
mrousavy Sep 1, 2023
bfa18ee
Merge branch 'main' into v3
mrousavy Sep 1, 2023
fa111ad
docs: Add docs for Pause/Resume recording
mrousavy Sep 1, 2023
e44d0e7
chore: Fix iOS build CI
mrousavy Sep 1, 2023
7ca226a
Add optional checkboxes
mrousavy Sep 1, 2023
385014b
Create `.bundle/config`
mrousavy Sep 1, 2023
ae439e3
Update .gitignore
mrousavy Sep 1, 2023
74b5898
fix: Use `pod install` instead of `bundle exec pod ...`
mrousavy Sep 1, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
27 changes: 16 additions & 11 deletions .github/ISSUE_TEMPLATE/BUG_REPORT.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,26 @@ labels: [🐛 bug]
body:
- type: textarea
attributes:
label: What were you trying to do?
description: Explain what you are trying to do.
placeholder: I wanted to take a picture.
label: What's happening?
description: Explain what you are trying to do and what happened instead. Be as precise as possible, I can't help you if I don't understand your issue.
placeholder: I wanted to take a picture, but the method failed with this error "[capture/photo-not-enabled] Failed to take photo, photo is not enabled!"
validations:
required: true
- type: textarea
attributes:
label: Reproduceable Code
description: Share a small reproduceable code snippet here (or the entire file if necessary). This will be automatically formatted into code, so no need for backticks.
render: tsx
- type: textarea
attributes:
label: What happened instead?
description: Explain what happened instead of the desired outcome. Did something crash?
placeholder: The app crashes with an `InvalidPhotoCodec` error.
validations:
required: true
- type: textarea
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output (Xcode Logs/Android Studio Logcat). This will be automatically formatted into code, so no need for backticks.
render: shell
- type: textarea
attributes:
label: Camera Device
description: Please paste the JSON Camera `device` that was used here. (`console.log(JSON.stringify(device, null, 2))`) This will be automatically formatted into code, so no need for backticks.
render: shell
- type: input
attributes:
label: Device
Expand All @@ -38,15 +36,22 @@ body:
attributes:
label: VisionCamera Version
description: Which version of react-native-vision-camera are you using?
placeholder: ex. 2.0.1-beta.1
placeholder: ex. 3.1.6
validations:
required: true
- type: checkboxes
attributes:
label: Can you reproduce this issue in the VisionCamera Example app?
description: Run the example app (`package/example/`) and see if the issue is reproduceable here.
options:
- label: I can reproduce the issue in the VisionCamera Example app.
- type: checkboxes
attributes:
label: Additional information
description: Please check all the boxes that apply
options:
- label: I am using Expo
- label: I have enabled Frame Processors (react-native-worklets-core)
- label: I have read the [Troubleshooting Guide](https://react-native-vision-camera.com/docs/guides/troubleshooting)
required: true
- label: I agree to follow this project's [Code of Conduct](https://github.com/mrousavy/react-native-vision-camera/blob/main/CODE_OF_CONDUCT.md)
Expand Down
64 changes: 64 additions & 0 deletions .github/ISSUE_TEMPLATE/BUILD_ERROR.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: 🔧 Build Error
description: File a build error bug report
title: "🔧 "
labels: [🔧 build error]
body:
- type: textarea
attributes:
label: How were you trying to build the app?
description: Explain how you tried to build the app, through Xcode, `yarn ios`, a CI, or other. Be as precise as possible, I can't help you if I don't understand your issue.
placeholder: I tried to build my app with react-native-vision-camera using the `yarn ios` command, and it failed.
validations:
required: true
- type: textarea
attributes:
label: Full build logs
description: Share the full build logs that appear in the console. Make sure you don't just paste the last few lines here, but rather everything from start to end.
render: tsx
- type: textarea
attributes:
label: Project dependencies
description: Share all of your project's dependencies including their versions from `package.json`. This is useful if there are any other conflicting libraries.
render: tsx
validations:
required: true
- type: dropdown
attributes:
label: Target platforms
description: Select the platforms where the build error occurs.
multiple: true
options:
- iOS
- Android
validations:
required: true
- type: dropdown
attributes:
label: Operating system
description: Select your operating system that you are trying to build on.
multiple: true
options:
- MacOS
- Windows
- Linux
validations:
required: true
- type: checkboxes
attributes:
label: Can you build the VisionCamera Example app?
description: Try to build the example app (`package/example/`) and see if the issue is reproduceable here.
options:
- label: I can build the VisionCamera Example app.
- type: checkboxes
attributes:
label: Additional information
description: Please check all the boxes that apply
options:
- label: I am using Expo
- label: I have enabled Frame Processors (react-native-worklets-core)
- label: I have read the [Troubleshooting Guide](https://react-native-vision-camera.com/docs/guides/troubleshooting)
required: true
- label: I agree to follow this project's [Code of Conduct](https://github.com/mrousavy/react-native-vision-camera/blob/main/CODE_OF_CONDUCT.md)
required: true
- label: I searched for [similar issues in this repository](https://github.com/mrousavy/react-native-vision-camera/issues) and found none.
required: true
57 changes: 52 additions & 5 deletions .github/workflows/build-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,34 @@ on:
- main
paths:
- '.github/workflows/build-android.yml'
- 'cpp/**'
- 'android/**'
- 'example/android/**'
- 'yarn.lock'
- 'example/yarn.lock'
pull_request:
paths:
- '.github/workflows/build-android.yml'
- 'cpp/**'
- 'android/**'
- 'example/android/**'
- 'yarn.lock'
- 'example/yarn.lock'

jobs:
build_example:
build:
name: Build Android Example App
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./package
steps:
- uses: actions/checkout@v2

- name: Setup JDK 1.8
- name: Setup JDK 11
uses: actions/setup-java@v1
with:
java-version: 1.8
java-version: 11

- name: Get yarn cache directory path
id: yarn-cache-dir-path
Expand All @@ -55,7 +60,49 @@ jobs:
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Run Gradle Build for android/
run: cd android && ./gradlew assembleDebug --build-cache && cd ..
- name: Run Gradle Build for example/android/
run: cd example/android && ./gradlew assembleDebug --build-cache && cd ../..

build-no-frame-processors:
name: Build Android Example App (without Frame Processors)
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./package
steps:
- uses: actions/checkout@v2

- name: Setup JDK 11
uses: actions/setup-java@v1
with:
java-version: 11

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Restore node_modules from cache
uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install node_modules
run: yarn install --frozen-lockfile
- name: Install node_modules for example/
run: yarn install --frozen-lockfile --cwd example
- name: Remove react-native-worklets-core
run: yarn remove react-native-worklets-core --cwd example

- name: Restore Gradle cache
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Run Gradle Build for example/android/
run: cd example/android && ./gradlew assembleDebug --build-cache && cd ../..
mrousavy marked this conversation as resolved.
Show resolved Hide resolved
70 changes: 66 additions & 4 deletions .github/workflows/build-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ on:
- main
paths:
- '.github/workflows/build-ios.yml'
- 'cpp/**'
- 'ios/**'
- '*.podspec'
- 'example/ios/**'
pull_request:
paths:
- '.github/workflows/build-ios.yml'
- 'cpp/**'
- 'ios/**'
- '*.podspec'
- 'example/ios/**'
Expand All @@ -22,7 +24,7 @@ jobs:
runs-on: macOS-latest
defaults:
run:
working-directory: example/ios
working-directory: package/example/ios
steps:
- uses: actions/checkout@v2

Expand All @@ -47,9 +49,8 @@ jobs:
- name: Setup Ruby (bundle)
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
ruby-version: 2.6.10
bundler-cache: true
working-directory: example/ios

- name: Restore Pods cache
uses: actions/cache@v2
Expand All @@ -62,7 +63,68 @@ jobs:
restore-keys: |
${{ runner.os }}-pods-
- name: Install Pods
run: bundle exec pod check || bundle exec pod install
run: pod install
- name: Install xcpretty
run: gem install xcpretty
- name: Build App
run: "set -o pipefail && xcodebuild \
CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ \
-derivedDataPath build -UseModernBuildSystem=YES \
-workspace VisionCameraExample.xcworkspace \
-scheme VisionCameraExample \
-sdk iphonesimulator \
-configuration Debug \
-destination 'platform=iOS Simulator,name=iPhone 11 Pro' \
build \
CODE_SIGNING_ALLOWED=NO | xcpretty"

build-no-frame-processors:
name: Build iOS Example App without Frame Processors
runs-on: macOS-latest
defaults:
run:
working-directory: package/example/ios
steps:
- uses: actions/checkout@v2

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Restore node_modules from cache
uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install node_modules for example/
run: yarn install --frozen-lockfile --cwd ..
- name: Remove react-native-worklets-core
run: yarn remove react-native-worklets-core --cwd ..

- name: Restore buildcache
uses: mikehardy/buildcache-action@v1
continue-on-error: true

- name: Setup Ruby (bundle)
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6.10
bundler-cache: true

- name: Restore Pods cache
uses: actions/cache@v2
with:
path: |
example/ios/Pods
~/Library/Caches/CocoaPods
~/.cocoapods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Install Pods
run: pod install
- name: Install xcpretty
run: gem install xcpretty
- name: Build App
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/notice-yarn-changes.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/validate-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ jobs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./android
working-directory: ./package/android
steps:
- uses: actions/checkout@v2
- name: Setup JDK 1.8
- name: Setup JDK 11
uses: actions/setup-java@v1
with:
java-version: 1.8
java-version: 11

- name: Get yarn cache directory path
id: yarn-cache-dir-path
Expand Down
Loading
Loading