Skip to content

Commit

Permalink
rc4
Browse files Browse the repository at this point in the history
  • Loading branch information
l1npengtul committed Dec 19, 2022
1 parent 0df16e1 commit f687649
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 32 deletions.
18 changes: 5 additions & 13 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "nokhwa"
version = "0.10.0"
version = "0.10.0-rc.4"
authors = ["l1npengtul <[email protected]>"]
edition = "2021"
description = "A Simple-to-use, cross-platform Rust Webcam Capture Library"
Expand Down Expand Up @@ -43,7 +43,7 @@ thiserror = "1.0"
paste = "1.0"

[dependencies.nokhwa-core]
version = "0.1.0"
version = "0.1.0-rc.4"
path = "nokhwa-core"

[dependencies.serde]
Expand Down Expand Up @@ -81,17 +81,17 @@ version = "0.8"
optional = true

[dependencies.nokhwa-bindings-windows]
version = "0.4.0"
version = "0.4.0-rc.4"
path = "nokhwa-bindings-windows"
optional = true

[dependencies.nokhwa-bindings-macos]
version = "0.2.0"
version = "0.2.0-rc.4"
path = "nokhwa-bindings-macos"
optional = true

[dependencies.nokhwa-bindings-linux]
version = "0.1.0"
version = "0.1.0-rc.4"
path = "nokhwa-bindings-linux"
optional = true

Expand Down Expand Up @@ -135,13 +135,5 @@ optional = true
version = "0.9"
optional = true

#[dependencies.parking_lot]
#version = "0.12"
#optional = true

#[dependencies.lazy_static]
#version = "1.4"
#optional = true

[package.metadata.docs.rs]
features = ["docs-only", "docs-nolink", "docs-features"]
4 changes: 2 additions & 2 deletions nokhwa-bindings-linux/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "nokhwa-bindings-linux"
version = "0.1.0"
version = "0.1.0-rc.4"
edition = "2021"
license = "Apache-2.0"
repository = "https://github.com/l1npengtul/nokhwa"
Expand All @@ -11,7 +11,7 @@ keywords = ["v4l", "v4l2", "linux", "capture", "webcam"]
[dependencies]

[dependencies.nokhwa-core]
version = "0.1.0-rc.2"
version = "0.1.0-rc.4"
path = "../nokhwa-core"

[target.'cfg(target_os="linux")'.dependencies]
Expand Down
9 changes: 5 additions & 4 deletions nokhwa-bindings-macos/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "nokhwa-bindings-macos"
version = "0.2.0"
version = "0.2.0-rc.4"
edition = "2021"
authors = ["l1npengtul"]
license = "Apache-2.0"
Expand All @@ -10,11 +10,10 @@ keywords = ["avfoundation", "macos", "capture", "webcam"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
flume = "0.10"
once_cell = "1.14"


[dependencies.nokhwa-core]
version = "0.1.0-rc.2"
version = "0.1.0-rc.4"
path = "../nokhwa-core"

[target.'cfg(any(target_os="macos",target_os="ios"))'.dependencies]
Expand All @@ -23,3 +22,5 @@ core-video-sys = "0.1"
cocoa-foundation = "0.1"
objc = { version = "0.2", features = ["exception"] }
block = "0.1"
flume = "0.10"
once_cell = "1.16"
10 changes: 6 additions & 4 deletions nokhwa-bindings-windows/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "nokhwa-bindings-windows"
version = "0.4.0"
version = "0.4.0-rc.4"
authors = ["l1npengtul"]
edition = "2021"
license = "Apache-2.0"
Expand All @@ -11,12 +11,14 @@ keywords = ["media-foundation", "windows", "capture", "webcam"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
lazy_static = "1.4.0"

[dependencies.nokhwa-core]
version = "0.1.0-rc.2"
version = "0.1.0-rc.4"
path = "../nokhwa-core"

[target.'cfg(target_os="windows")'.dependencies.windows]
version = "0.43.0"
version = "0.43"
features = ["Win32_Media_MediaFoundation", "Win32_System_Com", "Win32_Foundation", "Win32_Media_DirectShow", "Win32_Media", "Win32", "Win32_Media_KernelStreaming"]

[target.'cfg(target_os="windows")'.dependencies.once_cell]
version = "1.16"
11 changes: 3 additions & 8 deletions nokhwa-bindings-windows/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,14 @@
//!
//! No support or API stability will be given. Subject to change at any time.
#[cfg(all(target_os = "windows", windows))]
#[macro_use]
extern crate lazy_static;

#[cfg(all(windows, not(feature = "docs-only")))]
pub mod wmf {
use nokhwa_core::error::NokhwaError;
use nokhwa_core::types::{
ApiBackend, CameraControl, CameraFormat, CameraIndex, CameraInfo, ControlValueDescription,
ControlValueSetter, FrameFormat, KnownCameraControl, KnownCameraControlFlag, Resolution,
};
use once_cell::sync::Lazy;
use std::ffi::c_void;
use std::{
borrow::Cow,
Expand Down Expand Up @@ -82,10 +79,8 @@ pub mod wmf {
},
};

lazy_static! {
static ref INITIALIZED: Arc<AtomicBool> = Arc::new(AtomicBool::new(false));
static ref CAMERA_REFCNT: Arc<AtomicUsize> = Arc::new(AtomicUsize::new(0));
}
static INITIALIZED: Lazy<Arc<AtomicBool>> = Lazy::new(|| Arc::new(AtomicBool::new(false)));
static CAMERA_REFCNT: Lazy<Arc<AtomicUsize>> = Lazy::new(|| Arc::new(AtomicUsize::new(0)));

// See: https://stackoverflow.com/questions/80160/what-does-coinit-speed-over-memory-do
const CO_INIT_APARTMENT_THREADED: COINIT = COINIT(0x2);
Expand Down
2 changes: 1 addition & 1 deletion nokhwa-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "nokhwa-core"
version = "0.1.0"
version = "0.1.0-rc.4"
authors = ["l1npengtul <[email protected]>"]
edition = "2021"
description = "Core type definitions for nokhwa"
Expand Down

0 comments on commit f687649

Please sign in to comment.