edith_codecs
Clone
https://git.tahinli.com/Tahinli/edith_codecs.git
0 watching0 forksRust370.3 MiBca4790fTahinli3 months ago1157 commits
| 1 | //! The intermediate representation every edith_codecs crate is built on. |
| 2 | //! |
| 3 | //! One vocabulary spans demux, decode, encode and mux: a [`Packet`] of |
| 4 | //! compressed bytes, a [`Frame`] of decoded samples, a [`CodecId`] naming what |
| 5 | //! turns one into the other, [`CodecParameters`] describing a stream before its |
| 6 | //! first packet, and a rational [`TimeBase`] that keeps `24000/1001` exact from |
| 7 | //! the container to the muxer. [`bitio`] holds the one bit reader/writer pair |
| 8 | //! the parsers share, and [`color`] the H.273 meaning behind [`ColorInfo`]'s raw |
| 9 | //! code points — including the HDR mastering/content-light a tone map needs. |
| 10 | //! |
| 11 | //! Contracts worth knowing before implementing against this crate: |
| 12 | //! |
| 13 | //! - Timing is integer. `f64` appears only in `as_secs_f64` helpers, for |
| 14 | //! display, and never flows back into a timestamp. |
| 15 | //! - Truncated input is [`Error::NeedMore`], not a panic; a refusal is |
| 16 | //! [`Error::Unsupported`] and always names *what* and *why*. |
| 17 | //! - Codecs are push/pull ([`Decoder::send_packet`] / [`Decoder::receive_frame`]), |
| 18 | //! because packets and frames do not correspond one to one. |
| 19 | //! - Payloads are [`Buf`], a refcounted byte range: cloning a packet or sharing |
| 20 | //! a plane is a refcount bump, not a copy. |
| 21 | //! |
| 22 | //! No async, no unsafe, no external dependencies. |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | pub use ; |
| 36 | pub use |
| 37 | |
| 38 | |
| 39 | ; |
| 40 | pub use ; |
| 41 | pub use |
| 42 | |
| 43 | |
| 44 | ; |
| 45 | pub use ; |
| 46 | pub use |
| 47 | |
| 48 | |
| 49 | ; |
| 50 | pub use ; |