vaapi: remove unwanted unwraps

Format lookup can legitimately fail, so avoid crashing if this happens.
1 file changed
tree: a9a76914f33d7b9e76e7edb9c174c6a516ebf53d
  1. .github/
  2. examples/
  3. src/
  4. .gitignore
  5. Cargo.lock
  6. Cargo.toml
  7. CONTRIBUTING.md
  8. LICENSE
  9. README.md
README.md

Cros-codecs

A lightweight, simple, low-dependency, and hopefully safe crate for hardware-accelerated video decoding and encoding on Linux.

It is developed for use in ChromeOS (particularly crosvm), but has dependency to ChromeOS and should this be usable anywhere.

This crate is still under heavy development and is not recommended for use yet. Currently implemented features are:

  • Simple decoder API,
  • VAAPI decoder support (using cros-libva) for H.264, VP8 and VP9.

Planned features:

  • Stateful V4L2 decoder support.
  • Stateless V4L2 decoder support.
  • Vaapi encoder support.
  • V4L2 encoder support.
  • Support for H.265 and AV1.
  • C API to be used in non-Rust projects.

Example programs

The ccdec example program is included. It can decode an encoded stream and write the decoded frames to a file.