diff --git a/nokhwa-core/src/lib.rs b/nokhwa-core/src/lib.rs index 23ed70f..415622d 100644 --- a/nokhwa-core/src/lib.rs +++ b/nokhwa-core/src/lib.rs @@ -35,4 +35,3 @@ pub mod stream; pub mod traits; pub mod types; pub mod utils; -mod metadata; diff --git a/nokhwa-core/src/types.rs b/nokhwa-core/src/types.rs index f07d739..033c210 100644 --- a/nokhwa-core/src/types.rs +++ b/nokhwa-core/src/types.rs @@ -23,6 +23,7 @@ use std::{ pub enum CameraIndex { Index(u32), String(String), + Stable(String) } impl CameraIndex { @@ -32,7 +33,7 @@ impl CameraIndex { pub fn as_index(&self) -> Result { match self { CameraIndex::Index(i) => Ok(*i), - CameraIndex::String(s) => s + CameraIndex::String(s) | CameraIndex::Stable(s) => s .parse::() .map_err(|why| NokhwaError::GeneralError(why.to_string())), } @@ -44,6 +45,7 @@ impl CameraIndex { match self { CameraIndex::Index(i) => i.to_string(), CameraIndex::String(s) => s.to_string(), + CameraIndex::Stable(s) => s.to_string(), } } @@ -52,7 +54,7 @@ impl CameraIndex { pub fn is_index(&self) -> bool { match self { CameraIndex::Index(_) => true, - CameraIndex::String(_) => false, + CameraIndex::String(_) | CameraIndex::Stable(_) => false, } } diff --git a/nokhwa-decoders/Cargo.toml b/nokhwa-decoders/Cargo.toml index efd74f7..6910b61 100644 --- a/nokhwa-decoders/Cargo.toml +++ b/nokhwa-decoders/Cargo.toml @@ -8,8 +8,6 @@ ffmpeg = ["ffmpeg-the-third"] av1 = ["rav1e"] yuyv = ["dcv-color-primitives", "yuv"] mjpeg = ["zune-jpeg", "zune-core"] -browser = [] -general = ["ffmpeg", "av1", "yuyv", "mjpeg"] static = ["ffmpeg-the-third/static"] async = [] diff --git a/nokhwa-decoders/src/general.rs b/nokhwa-decoders/src/general.rs deleted file mode 100644 index e69de29..0000000 diff --git a/nokhwa-decoders/src/lib.rs b/nokhwa-decoders/src/lib.rs index 3661011..8248bff 100644 --- a/nokhwa-decoders/src/lib.rs +++ b/nokhwa-decoders/src/lib.rs @@ -1,7 +1,5 @@ #[cfg(feature = "ffmpeg")] pub mod ffmpeg; -#[cfg(feature = "general")] -pub mod general; #[cfg(feature = "mjpeg")] pub mod mjpeg; #[cfg(feature = "yuyv")]