Expand description
§nokhwa
A Simple-to-use, cross-platform Rust Webcam Capture Library
The raw backends can be found in backends
The Camera
struct is what you will likely use.
The recommended default feature to enable is input-native
. The library will not work without
at least one input-*
feature enabled.
Please read the README.md for more.
Re-exports§
pub use threaded::CallbackCamera;
output-threaded
Modules§
- backends
- Raw access to each of Nokhwa’s backends.
- buffer
- camera_
traits - error
- js_
camera input-jscam
- A camera that uses native browser APIs meant for WASM applications. This contains all the code for using webcams in the browser.
- pixel_
format - threaded
output-threaded
- A camera that runs in a different thread and can call your code based on callbacks.
- utils
Structs§
- Buffer
- A buffer returned by a camera to accommodate custom decoding.
Contains information of Resolution, the buffer’s
FrameFormat
, and the buffer. - Camera
- The main
Camera
struct. This is the struct that abstracts over all the backends, providing a simplified interface for use.
Enums§
- Nokhwa
Error - All errors in
nokhwa
.
Traits§
- Format
Decoder - Trait that has methods to convert raw data from the webcam to a proper raw image.
Functions§
- native_
api_ backend - Gets the native
ApiBackend
- nokhwa_
check - Check the status if
nokhwa
True if the initialization is successful (ready-to-use) - nokhwa_
initialize - Initialize
nokhwa
It is your responsibility to call this function before anything else, but only onMacOS
. - query
- Query the system for a list of available devices. Please refer to the API Backends that support
Query
)
Usually the order goes Native -> UVC -> Gstreamer.