camera: update nokhwa to 0.10.10
Update camera lib, also to avoid git dependency for macos. Reviewed-on: https://code.gri.mw/GUI/grim/pulls/40
This commit is contained in:
Generated
+16
-81
@@ -1629,15 +1629,14 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cocoa-foundation"
|
||||
version = "0.1.2"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8c6234cbb2e4c785b456c0644748b1ac416dd045799740356f8363dfe00c93f7"
|
||||
checksum = "81411967c50ee9a1fc11365f8c585f863a22a9697c89239c452292c40ba79b0d"
|
||||
dependencies = [
|
||||
"bitflags 1.3.2",
|
||||
"bitflags 2.10.0",
|
||||
"block",
|
||||
"core-foundation 0.9.4",
|
||||
"core-graphics-types 0.1.3",
|
||||
"libc",
|
||||
"core-foundation 0.10.1",
|
||||
"core-graphics-types 0.2.0",
|
||||
"objc",
|
||||
]
|
||||
|
||||
@@ -2501,12 +2500,6 @@ version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76"
|
||||
|
||||
[[package]]
|
||||
name = "dunce"
|
||||
version = "1.0.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813"
|
||||
|
||||
[[package]]
|
||||
name = "dyn-clone"
|
||||
version = "1.0.20"
|
||||
@@ -3836,8 +3829,7 @@ dependencies = [
|
||||
"lazy_static",
|
||||
"local-ip-address",
|
||||
"log",
|
||||
"nokhwa 0.10.10",
|
||||
"nokhwa 0.10.7",
|
||||
"nokhwa",
|
||||
"parking_lot 0.12.5",
|
||||
"pin-project",
|
||||
"qrcode",
|
||||
@@ -5952,31 +5944,6 @@ dependencies = [
|
||||
"pxfm",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mozjpeg"
|
||||
version = "0.10.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b7891b80aaa86097d38d276eb98b3805d6280708c4e0a1e6f6aed9380c51fec9"
|
||||
dependencies = [
|
||||
"arrayvec 0.7.6",
|
||||
"bytemuck",
|
||||
"libc",
|
||||
"mozjpeg-sys",
|
||||
"rgb",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mozjpeg-sys"
|
||||
version = "2.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7f0dc668bf9bf888c88e2fb1ab16a406d2c380f1d082b20d51dd540ab2aa70c1"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"dunce",
|
||||
"libc",
|
||||
"nasm-rs",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "naga"
|
||||
version = "27.0.3"
|
||||
@@ -6012,16 +5979,6 @@ dependencies = [
|
||||
"getrandom 0.2.16",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nasm-rs"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "34f676553b60ccbb76f41f9ae8f2428dac3f259ff8f1c2468a174778d06a1af9"
|
||||
dependencies = [
|
||||
"jobserver",
|
||||
"log",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "native-tls"
|
||||
version = "0.2.14"
|
||||
@@ -6136,20 +6093,6 @@ version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451"
|
||||
|
||||
[[package]]
|
||||
name = "nokhwa"
|
||||
version = "0.10.7"
|
||||
source = "git+https://code.gri.mw/GUI/nokhwa?rev=612c861ef153cf0ee575d8dd1413b960e4e19dd6#612c861ef153cf0ee575d8dd1413b960e4e19dd6"
|
||||
dependencies = [
|
||||
"flume",
|
||||
"image",
|
||||
"nokhwa-bindings-macos",
|
||||
"nokhwa-core 0.1.5",
|
||||
"parking_lot 0.12.5",
|
||||
"paste",
|
||||
"thiserror 2.0.17",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nokhwa"
|
||||
version = "0.10.10"
|
||||
@@ -6159,8 +6102,10 @@ dependencies = [
|
||||
"flume",
|
||||
"image",
|
||||
"nokhwa-bindings-linux",
|
||||
"nokhwa-bindings-macos",
|
||||
"nokhwa-bindings-windows",
|
||||
"nokhwa-core 0.1.8",
|
||||
"nokhwa-core",
|
||||
"parking_lot 0.12.5",
|
||||
"paste",
|
||||
"thiserror 2.0.17",
|
||||
]
|
||||
@@ -6171,22 +6116,23 @@ version = "0.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4bd666aaa41d14357817bd9a981773a73c4d00b34d344cfc244e47ebd397b1ec"
|
||||
dependencies = [
|
||||
"nokhwa-core 0.1.8",
|
||||
"nokhwa-core",
|
||||
"v4l",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nokhwa-bindings-macos"
|
||||
version = "0.2.2"
|
||||
source = "git+https://code.gri.mw/GUI/nokhwa?rev=612c861ef153cf0ee575d8dd1413b960e4e19dd6#612c861ef153cf0ee575d8dd1413b960e4e19dd6"
|
||||
version = "0.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "de78eb4a2d47a68f490899aa0516070d7a972f853ec2bb374ab53be0bd39b60f"
|
||||
dependencies = [
|
||||
"block",
|
||||
"cocoa-foundation",
|
||||
"core-foundation 0.9.4",
|
||||
"core-foundation 0.10.1",
|
||||
"core-media-sys",
|
||||
"core-video-sys",
|
||||
"flume",
|
||||
"nokhwa-core 0.1.5",
|
||||
"nokhwa-core",
|
||||
"objc",
|
||||
"once_cell",
|
||||
]
|
||||
@@ -6197,22 +6143,11 @@ version = "0.4.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "899799275c93ef69bbe8cb888cf6f8249abe751cbc50be5299105022aec14a1c"
|
||||
dependencies = [
|
||||
"nokhwa-core 0.1.8",
|
||||
"nokhwa-core",
|
||||
"once_cell",
|
||||
"windows 0.62.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nokhwa-core"
|
||||
version = "0.1.5"
|
||||
source = "git+https://code.gri.mw/GUI/nokhwa?rev=612c861ef153cf0ee575d8dd1413b960e4e19dd6#612c861ef153cf0ee575d8dd1413b960e4e19dd6"
|
||||
dependencies = [
|
||||
"bytes 1.10.1",
|
||||
"image",
|
||||
"mozjpeg",
|
||||
"thiserror 2.0.17",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nokhwa-core"
|
||||
version = "0.1.8"
|
||||
|
||||
+3
-3
@@ -143,13 +143,13 @@ tokio-old = { version = "0.2", features = ["full"], package = "tokio" }
|
||||
tokio-util-old = { version = "0.2", features = ["codec"], package = "tokio-util" }
|
||||
|
||||
[target.'cfg(target_os = "linux")'.dependencies]
|
||||
nokhwa = { version = "0.10.5", default-features = false, features = ["input-v4l"] }
|
||||
nokhwa = { version = "0.10.10", default-features = false, features = ["input-v4l"] }
|
||||
|
||||
[target.'cfg(target_os = "windows")'.dependencies]
|
||||
nokhwa = { version = "0.10.5", default-features = false, features = ["input-msmf"] }
|
||||
nokhwa = { version = "0.10.10", default-features = false, features = ["input-msmf"] }
|
||||
|
||||
[target.'cfg(target_os = "macos")'.dependencies]
|
||||
nokhwa-mac = { git = "https://code.gri.mw/GUI/nokhwa", rev = "612c861ef153cf0ee575d8dd1413b960e4e19dd6", features = ["input-avfoundation", "output-threaded"], package = "nokhwa" }
|
||||
nokhwa = { version = "0.10.10", default-features = false, features = ["input-avfoundation", "output-threaded"] }
|
||||
|
||||
[target.'cfg(not(target_os = "android"))'.dependencies]
|
||||
env_logger = "0.11.3"
|
||||
|
||||
@@ -109,12 +109,12 @@ impl Desktop {
|
||||
fn start_camera_capture(cameras_amount: Arc<AtomicUsize>,
|
||||
camera_index: Arc<AtomicUsize>,
|
||||
stop_camera: Arc<AtomicBool>) {
|
||||
use nokhwa_mac::nokhwa_initialize;
|
||||
use nokhwa_mac::pixel_format::RgbFormat;
|
||||
use nokhwa_mac::utils::{CameraIndex, RequestedFormat, RequestedFormatType};
|
||||
use nokhwa_mac::utils::ApiBackend;
|
||||
use nokhwa_mac::query;
|
||||
use nokhwa_mac::CallbackCamera;
|
||||
use nokhwa::nokhwa_initialize;
|
||||
use nokhwa::pixel_format::RgbFormat;
|
||||
use nokhwa::utils::{CameraIndex, RequestedFormat, RequestedFormatType};
|
||||
use nokhwa::utils::ApiBackend;
|
||||
use nokhwa::query;
|
||||
use nokhwa::CallbackCamera;
|
||||
|
||||
// Ask permission to open camera.
|
||||
nokhwa_initialize(|_| {});
|
||||
|
||||
Reference in New Issue
Block a user