Commit Graph

423 Commits

Author SHA1 Message Date
l1npengtul 5a9874fe67 fix features 0.10.6 2024-12-03 20:38:47 +09:00
l1npengtul 368d15bf1c bump main crate version 2024-12-03 20:33:59 +09:00
l1npengtul b96a595868 test and bump versions, fix warnings, fix opencv 2024-12-03 20:33:12 +09:00
l1npengtul 3533fcb977 bump version fix #183 2024-11-28 14:20:19 +09:00
l1npengtul ebfe71a5a4 fix opencv not working in devshell flake 2024-11-28 14:19:48 +09:00
Dario A Lencina-Talarico cf9b8a0fdb add yuyv (#181) 2024-10-14 23:04:48 +09:00
l1npengtul fc64a23b3d fix unused warning 0.10.5 2024-10-12 23:30:13 +09:00
l1npengtul 21a357f082 bump versions 2024-10-12 23:27:19 +09:00
l1npengtul fafffac409 update dependencies fix #177 2024-10-12 23:25:23 +09:00
Nikolay Igotti c5a56bd2c8 Fix for older Apple cameras (#153) 2024-03-07 10:58:08 +09:00
YAMAMOTO Takashi c0940321d7 yuyv444_to_rgb: avoid highlight overflows (#152) 2024-03-07 10:57:51 +09:00
Markus Mayer 8ac5ce9d91 Reuse OpenCV matrix (decode_into_opencv_mat) (#137)
* Add decode_into_opencv_mat function

* Ensure data is always copied to destination matrix

* Add matrix dimension check
2023-10-17 15:26:07 +09:00
lain ping tool 219ede94aa Merge pull request #131 from tactile-eng/fix-cross-compilation
Fix cross compilation on a macos host
2023-10-17 15:25:35 +09:00
lain ping tool 8ed702e93c Merge pull request #151 from yamt/avfoundation-videosettings
avfoundation: set videoSettings explicitly
2023-10-17 15:25:03 +09:00
YAMAMOTO Takashi 72677489af avfoundation: set videoSettings explicitly
It seems by default AVCaptureVideoDataOutput converts frames to
kCMVideoCodecType_422YpCbCr8. (= kCMPixelFormat_422YpCbCr8)
Unfortunately it doesn't match what nokhwa decides to use
on my environment. (kCMPixelFormat_422YpCbCr8_yuvs)

This commit configures AVCaptureVideoDataOutput to use the same
pixel format. (Thus no conversions)

Only tested for kCMPixelFormat_422YpCbCr8_yuvs.
2023-10-17 15:14:11 +09:00
lain ping tool 12910325b0 Merge pull request #142 from mattdeak/0.10
Type fix to ImageDataLayout construction under the wgu-types feature in nokhwa-core
2023-09-27 10:39:41 +09:00
Matthew Deakos 8987af8678 Added type fix to src/traits under the wgu-types feature 2023-09-22 15:25:51 -03:00
alexmoon 411e243dcd Fix cross compilation on a macos host
In a build script `cfg(target_os=...)` refers to the host, not the target. Using the `CARGO_CFG_TARGET_OS` environment variable sets the link parameters properly.
2023-06-19 13:40:07 -04:00
lain ping tool ea971242a8 Merge pull request #129 from Naostage/fix-arena-buffer-usage-v4l
🐛 v4l: fix perf issue introduce by disabled arena buffer
2023-06-15 23:55:12 +09:00
Olivier Le Doeuff eff92a5cd7 🐛 v4l: fix perf issue introduce by disabled arena buffer
- Calling `stream.next` push internal buffers to v4l then call `stream.start`. By default with `new` buffer count is 4.
- #121 directly call `stream.start`, without setting any buffer. This result in v4l only having 1 buffer (I guess), so because there is no double buffer (or more), 1 frame out of two is skipped.
2023-06-15 16:40:24 +02:00
lain ping tool 57e56ac854 Merge pull request #119 from michivi/michivi/fix-project-paths-0.10
Simplify workspace paths (0.10)
2023-06-15 23:29:39 +09:00
lain ping tool 129b60930e Merge pull request #127 from Naostage/v4l-multi-device
🐛 v4l support share device handle, to behave like MF backend
2023-06-15 23:27:33 +09:00
Olivier Le Doeuff 18fbf2d261 🐛 v4l support share device handle, to behave like MF backend
- Introduce a global array that keep track of every opened device
- A device can be shared between multiple capture backend, but only one can open the stream
- Cleaning of dropped device is done lazily
2023-06-15 13:47:21 +02:00
l1npengtul 7176265cc6 update nokhwa core fix #126 2023-06-15 14:05:59 +09:00
l1npengtul 095bf85aa3 Merge remote-tracking branch 'origin/0.10' into 0.10 2023-06-15 14:04:55 +09:00
l1npengtul b2bf2deab8 fix wgpu api change 2023-06-15 14:04:26 +09:00
lain ping tool 7b576b2369 Merge pull request #112 from RReverser/fix-callback-camera-deadlock
Use fair mutex for CallbackCamera
2023-06-06 01:20:25 +09:00
lain ping tool 668b7faa10 Merge branch '0.10' into fix-callback-camera-deadlock 2023-06-06 01:20:18 +09:00
lain ping tool 3be9227a4c Merge pull request #122 from Naostage/update-v4l-2
⬆️ v4l v0.14 & v4l2-sys-mit 0.3
2023-06-05 18:26:50 +09:00
Olivier Le Doeuff f1405412e5 ⬆️ v4l v0.14 & v4l2-sys-mit 0.3
This release bump bindgen = "0.59" to bindgen = "0.65.1" which fix compilation error on ubuntu 20.04

# Changelog

## [0.14.0] - 2023-05-13
### Added
- Expose raw file descriptor of streams through `Stream::handle()` ### Changed
- Updated `bindgen` dependency to 0.65.1 ### Fixed
- Use proper C FFI struct field for `Integer64` controls
- Fix example in README.md to account for the negotiated pixelformat

```
error: failed to run custom build command for `v4l2-sys-mit v0.2.0`

Caused by:
  process didn't exit successfully: `/home/naostage/dev/nokhwa/target/debug/build/v4l2-sys-mit-5048993d2f304be7/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at '"v4l2_pix_format_union_(anonymous_at_/usr/include/linux/videodev2_h_493_2)" is not a valid Ident'
```
2023-06-04 09:40:54 +02:00
lain ping tool ada30d7f66 Merge pull request #121 from michivi/tle/rpi
Add Raspberry Pi support
2023-05-30 01:00:30 +09:00
Tuan Le 26b96f3aab Add Raspberry Pi support
Includes:
- Use whole range of frame interval steps, including max.
- Start stream capture explicitly. While the v4l dependency can do that automatically when trying to fetch a frame, it will do so by providing several buffers that will end up not released properly by the Raspberry Pi V4L2 driver. Starting the capture explicitly allows us to only use a single buffer with proper lifecycle management.
2023-05-29 17:33:00 +02:00
Tuan Le 713d2bc7a7 Simplify workspace paths 2023-05-28 16:45:26 +02:00
l1npengtul 2c4887b9d8 update opencv to 81 for 10.4 2023-05-14 18:43:53 +09:00
l1npengtul 585fc78f59 update main crate depends 2023-05-14 18:40:40 +09:00
l1npengtul d66f878824 update coore depends 2023-05-14 18:39:47 +09:00
l1npengtul 1f3bf185f1 Merge remote-tracking branch 'origin/0.10' into 0.10
# Conflicts:
#	Cargo.toml
2023-05-14 18:39:12 +09:00
l1npengtul c46fb4be32 try and fix #98 again 2023-05-14 18:38:36 +09:00
Ingvar Stepanyan 624c6004ca Revert accidental Cargo change 2023-04-17 00:38:53 +01:00
Ingvar Stepanyan 4aeabb47c5 Use fair mutex for CallbackCamera
This fixes lock contention that prevented any operations on the camera once capture loop is started by using a fair mutex instead of a regular one.

It's slightly more expensive, but this usecase - trying to access a shared resource that is repeatedly locked/unlocked by someone else - is exactly what it's designed for, and indeed it fixes the deadlock issue.

Fixes #111.
2023-04-17 00:34:01 +01:00
l1npengtul 12cfe670e8 Merge pull request #106 from mosure/feat/wgpu-0.15
feat: upgrade wgpu to 0.15
2023-03-12 13:58:37 +09:00
mosure b58ee5f82e feat: upgrade wgpu to 0.15 2023-03-11 19:58:47 -06:00
l1npengtul 58454663b8 0.10.3 0.10.3 2022-12-28 15:50:31 +09:00
Jannis Froese 31ebff1a78 fix compile error in threaded.rs 2022-12-28 15:48:17 +09:00
April Wade 79faf1bdfe Fix spelling of AVCaptureDeviceTypeExternalUnknown 0.10.2 2022-12-25 17:25:34 +09:00
l1npengtul 8b22c99bc3 0.10.2 2022-12-25 17:25:21 +09:00
l1npengtul 759f6b6138 0.10.1 0.10.1 2022-12-23 15:43:42 +09:00
l1npengtul 462b966406 fix core 0.10.0 2022-12-19 17:18:10 +09:00
l1npengtul e77607d144 0.10 2022-12-19 17:17:38 +09:00
l1npengtul c65504a2ba rc6 0.10.0-rc6 2022-12-19 16:24:27 +09:00