[package]
edition = "2024"
rust-version = "1.85"
name = "cameras"
version = "0.3.1"
authors = ["Matthew Berger <matthewjordanberger@gmail.com>"]
build = false
include = [
"src/**/*.rs",
"examples/**/*.rs",
"Cargo.toml",
"README.md",
"LICENSE-MIT",
"LICENSE-APACHE",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = """
A cross-platform camera library for Rust, built with data-oriented design.\r
Explicit format negotiation, push-based frame delivery, typed errors, and zero\r
trait objects.\r
"""
homepage = "https://github.com/matthewjberger/cameras"
documentation = "https://docs.rs/cameras"
readme = "README.md"
keywords = [
"camera",
"webcam",
"video",
"capture",
"mjpeg",
]
categories = [
"multimedia::video",
"hardware-support",
"api-bindings",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/matthewjberger/cameras"
resolver = "2"
[package.metadata.docs.rs]
all-features = true
rustdoc-args = [
"--cfg",
"docsrs",
]
[features]
analysis = []
controls = ["windows/Win32_Media_DirectShow"]
default = []
discover = [
"rtsp",
"dep:ipnet",
"tokio/io-util",
]
rtsp = [
"dep:retina",
"dep:tokio",
"dep:url",
"dep:futures-util",
]
[lib]
name = "cameras"
path = "src/lib.rs"
[[example]]
name = "autofocus"
path = "examples/autofocus.rs"
required-features = [
"analysis",
"controls",
]
[[example]]
name = "discover"
path = "examples/discover.rs"
required-features = ["discover"]
[[example]]
name = "monitor"
path = "examples/monitor.rs"
[[example]]
name = "pump"
path = "examples/pump.rs"
[[example]]
name = "sharpest"
path = "examples/sharpest.rs"
required-features = ["analysis"]
[[example]]
name = "snapshot"
path = "examples/snapshot.rs"
[dependencies.bytes]
version = "1"
[dependencies.crossbeam-channel]
version = "0.5"
[dependencies.futures-util]
version = "0.3"
optional = true
[dependencies.ipnet]
version = "2"
optional = true
[dependencies.retina]
version = "0.4"
optional = true
[dependencies.thiserror]
version = "2"
[dependencies.tokio]
version = "1"
features = [
"rt",
"rt-multi-thread",
"macros",
"sync",
"time",
"net",
]
optional = true
[dependencies.url]
version = "2"
optional = true
[dependencies.zune-jpeg]
version = "0.4"
[dev-dependencies.image]
version = "0.25"
features = ["png"]
default-features = false
[target.'cfg(target_os = "linux")'.dependencies.v4l]
version = "0.14"
[target.'cfg(target_os = "macos")'.dependencies.block2]
version = "0.6"
[target.'cfg(target_os = "macos")'.dependencies.dispatch2]
version = "0.3"
[target.'cfg(target_os = "macos")'.dependencies.objc2]
version = "0.6"
features = ["exception"]
[target.'cfg(target_os = "macos")'.dependencies.objc2-av-foundation]
version = "0.3"
features = ["objc2-core-media"]
[target.'cfg(target_os = "macos")'.dependencies.objc2-core-foundation]
version = "0.3"
[target.'cfg(target_os = "macos")'.dependencies.objc2-core-media]
version = "0.3"
[target.'cfg(target_os = "macos")'.dependencies.objc2-core-video]
version = "0.3"
[target.'cfg(target_os = "macos")'.dependencies.objc2-foundation]
version = "0.3"
[target.'cfg(target_os = "macos")'.dependencies.objc2-video-toolbox]
version = "0.3"
features = [
"objc2-core-media",
"objc2-core-video",
]
[target.'cfg(target_os = "windows")'.dependencies.windows]
version = "0.58"
features = [
"Win32_Foundation",
"Win32_Media_MediaFoundation",
"Win32_System_Com",
"Win32_System_Com_StructuredStorage",
"Win32_Devices_Properties",
]