nvidia_video_codec_sdk/
lib.rs

1//! Bindings for the [NVIDIA Video Codec SDK](https://developer.nvidia.com/video-codec-sdk).
2//!
3//! The raw bindings can be found in [`sys`].
4//! Parts of the API have been wrapped in [`safe`].
5//!
6//! Feel free to contribute!
7//!
8//! ---
9//!
10//! # Encoding
11//!
12//! See [NVIDIA Video Codec SDK - Video Encoder API Programming Guide](https://docs.nvidia.com/video-technologies/video-codec-sdk/12.0/nvenc-video-encoder-api-prog-guide/index.html).
13//!
14//! The main entrypoint for the encoder API is the [`Encoder`] type.
15//!
16//! Usage follows this structure:
17//! 1. Initialize an [`Encoder`] with an encode device (such as CUDA).
18//! 2. Configure the encoder and start a [`Session`].
19//! 3. Create input [`Buffer`]s  (or [`RegisteredResource`]) and output
20//!    [`Bitstream`]s.
21//! 4. Encode frames with [`Session::encode_picture`].
22//!
23//! See the mentioned types for more info on how to use each.
24//!
25//! # Decoding
26//!
27//! There is no safe wrapper yet.
28
29#![warn(
30    missing_docs,
31    clippy::pedantic,
32    clippy::style,
33    clippy::unwrap_used,
34    missing_debug_implementations,
35    missing_copy_implementations
36)]
37
38pub mod safe;
39pub mod sys;
40
41#[macro_use]
42extern crate lazy_static;
43
44pub use safe::*;