edith_codecs
Clone
https://git.tahinli.com/Tahinli/edith_codecs.git
0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits
| 1 | //! VA-API (libva) layer over [`cros_libva`]. |
| 2 | //! |
| 3 | //! This is the hardware-video foundation of the `edith_codecs` family: `ec-hw` |
| 4 | //! builds stateless VA-API decoders and encoders on top of it, and nothing else |
| 5 | //! in the family talks to libva directly. Every libva call goes through |
| 6 | //! cros-libva's safe wrappers, so this crate contains no `unsafe` of its own. |
| 7 | //! |
| 8 | //! * [`va`] — the whole cros-libva API, re-exported: raw constants and typed |
| 9 | //! codec parameter buffers ([`va::BufferType`], e.g. |
| 10 | //! `BufferType::PictureParameter(PictureParameter::H264(..))`). |
| 11 | //! * [`Display`], [`Config`], [`Context`], [`Surface`], [`Picture`], [`Buffer`] |
| 12 | //! and [`Image`] are cros-libva's RAII handles. Each child holds an `Rc` of |
| 13 | //! its parent, so libva's destruction order is enforced by ownership. |
| 14 | //! * [`surface`] adds PRIME export/import, timed sync and pool creation; |
| 15 | //! [`caps`] probes what the driver supports; [`vpp`] is a video-processing |
| 16 | //! pipeline. |
| 17 | //! |
| 18 | //! # Version policy |
| 19 | //! |
| 20 | //! The pinned cros-libva revision builds against libva 1.23. The runtime |
| 21 | //! version is not exposed by cros-libva, so it is not checked here. |
| 22 | //! |
| 23 | //! # Example |
| 24 | //! |
| 25 | //! ```no_run |
| 26 | //! use ec_va::caps::{CapReport, Entrypoint, Profile}; |
| 27 | //! |
| 28 | //! let display = ec_va::open()?; |
| 29 | //! let caps = CapReport::probe(&display)?; |
| 30 | //! assert!(caps.supports(Profile::H264Main, Entrypoint::VLD)); |
| 31 | //! # Ok::<(), ec_va::Error>(()) |
| 32 | //! ``` |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | pub use cros_libva as va; |
| 47 | |
| 48 | pub use ; |
| 49 | pub use ; |
| 50 | pub use ; |
| 51 | pub use ; |
| 52 | pub use ; |
| 53 | pub use |
| 54 | |
| 55 | |
| 56 | ; |
| 57 | pub use Vpp; |