Crate nokhwa

source ·
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

Modules

  • Raw access to each of Nokhwa’s backends.
  • js_camerainput-jscam
    A camera that uses native browser APIs meant for WASM applications. This contains all the code for using webcams in the browser.
  • threadedoutput-threaded
    A camera that runs in a different thread and can call your code based on callbacks.

Structs

  • A buffer returned by a camera to accommodate custom decoding. Contains information of Resolution, the buffer’s FrameFormat, and the buffer.
  • The main Camera struct. This is the struct that abstracts over all the backends, providing a simplified interface for use.

Enums

Traits

  • Trait that has methods to convert raw data from the webcam to a proper raw image.

Functions

  • Gets the native ApiBackend
  • Check the status if nokhwa True if the initialization is successful (ready-to-use)
  • Initialize nokhwa It is your responsibility to call this function before anything else, but only on MacOS.
  • 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.