mirror of
https://github.com/l1npengtul/nokhwa.git
synced 2026-07-04 10:37:26 +00:00
rc4
This commit is contained in:
@@ -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"
|
||||
@@ -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"
|
||||
@@ -27,10 +27,6 @@
|
||||
//!
|
||||
//! 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;
|
||||
@@ -38,6 +34,7 @@ pub mod wmf {
|
||||
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,
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user