Commit Graph

439 Commits

Author SHA1 Message Date
l1npengtul d25151da6d 0.10.10 0.10.10 2025-11-10 13:40:36 +09:00
l1npengtul 6f5d4efac5 0.10.10 2025-11-10 10:59:04 +09:00
Nick a0a864c848 Fix duplicate index assertion in new_shared_device (#219)
Replace broken windows(2) logic with HashSet-based duplicate check.
The previous assertion would always fail when 2+ devices with different
indexes were opened sequentially.
2025-11-10 10:42:47 +09:00
l1npengtul dc8beced7f bump versions fix wgpu errors 2025-07-07 02:55:04 +09:00
l1npengtul e43d5894fa bump macos vers 2025-07-07 02:50:14 +09:00
l1npengtul 996fec03f7 bump versions fix wgpu errors 2025-07-07 02:32:04 +09:00
l1npengtul fbf8d9777e macos: bump version 2025-07-06 23:59:19 +09:00
l1npengtul 0149b2bd08 update dependencies and bump versions, fix #211 2025-07-05 15:15:18 +09:00
Sander in 't Hout 9b757a2923 Short circuit when no devices found on Windows to fix panic in from_raw_parts (#207) 2025-04-18 10:00:57 +09:00
Eduardo Ramos 612c861ef1 Fix bug in MSFoundation backend where media formats are created not exactly as expected by the device and fail to open (#197)
* Fix infinite loop when guid_to_frameformat fails

* Fix bug in MSFoundation backend where media formats are created not exactly as expected by the device and fail to open. Also fix conversion of MSFoundation RGB24, it's RAWBGR instead of RAWRGB

* Fix compilation issue
2025-01-04 14:31:00 +09:00
Andrew Straw 45c6a3aef3 macos: use YUYV for pixel types (#193)
kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange
kCVPixelFormatType_420YpCbCr8BiPlanarFullRange
kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange

Fixes #100.

This was suggested by the code from @paviro at
https://github.com/l1npengtul/nokhwa/issues/100#issuecomment-2217577611.
2024-12-23 16:07:34 +09:00
Pâris DOUADY 30fd2ed467 rename externalunknown -> external (#172)
* rename externalunknown -> external

* Update Cargo.toml

* fix mozjpeg

---------

Co-authored-by: lain ping tool <35755164+l1npengtul@users.noreply.github.com>
2024-12-05 13:08:05 +09:00
Eduardo Ramos dde211e32b Fix infinite loop when guid_to_frameformat fails (#188) 2024-12-05 13:03:24 +09:00
l1npengtul 674827bb10 bump thiserror version, bump nokhwa-core version, delete nokhwa-decoder (what was it doing here? you belong on senpai!) 0.10.7 2024-12-05 12:59:07 +09:00
l1npengtul c2c823259d fix wgpu types bump version 0.10.7 2024-12-05 12:54:53 +09:00
Kol Crooks 59ee276aac bump wgpu dep for workspace wgpu (#187) 2024-12-04 15:44:21 +09:00
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