Repository navigation
Use cypherstack/camera-linux, replacing OpenCV with V4L2 - #1504
Merged
Merged
Conversation
camera_linux is now a Linux implementation of the camera federated plugin (sneurlax/camera-linux branch feat/native-assets-v4l2, to move to cypherstack/camera-linux once merged): a Dart build hook compiles a V4L2 capture library at app build time, and CameraLinux registers itself as the camera platform through the Dart plugin registrant. The resulting libcamera_linux.so depends on libc only and is installed into bundle/lib by the native-assets step the Linux CMake template already has, the same path the Epic, MWC and Tor hooks use. That makes OpenCV unnecessary: the CI image and the build docs no longer install libopencv-dev, and no flatpak module, static OpenCV build or CMake bundling step is needed. The desktop QR scanner dialog now drives Linux through the same camera platform interface code as Windows. On Linux it reads frames from the plugin's image stream (JPEG, no temp files) and asks for the medium preset, which is 640x480 there; "low" would be 320x240, too small for QR codes. camera_macos exports its own CameraImageData, so that name is hidden from its import.
The V4L2 camera_linux opens /dev/video* directly, and --device=dri does not expose those nodes in the sandbox. Use --device=all.
sneurlax
force-pushed
the
feat/camera-linux-hook
branch
from
November 6, 2026 17:43
fcdf7c3 to
3f81beb
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## staging #1504 +/- ##
===========================================
- Coverage 13.92% 13.92% -0.01%
===========================================
Files 1139 1139
Lines 114695 114707 +12
===========================================
Hits 15976 15976
- Misses 98719 98731 +12 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
camera_linux reports a capture failure on the frame stream as well as through onCameraError. The frame listener had no error handler, so the camera-lost message showed but the exception also escaped as an uncaught asynchronous error. Route it through _onCameraLost, which ignores the second report.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.