pub struct Stream {
pub codec_type: Option<String>,
pub codec_name: Option<String>,
pub width: Option<u32>,
pub height: Option<u32>,
pub channels: Option<u32>,
pub r_frame_rate: Option<String>,
pub bit_rate: Option<String>,
pub color_transfer: Option<String>,
pub side_data_list: Vec<SideData>,
pub tags: HashMap<String, String>,
}Expand description
A single stream (video or audio).
Fields§
§codec_type: Option<String>“video”, “audio”, “subtitle”, …
codec_name: Option<String>§width: Option<u32>§height: Option<u32>§channels: Option<u32>§r_frame_rate: Option<String>Average frame rate as “num/den”, e.g. “30000/1001”.
bit_rate: Option<String>Stream bit rate in bits/s, as a string (absent for some containers).
color_transfer: Option<String>Transfer characteristic, e.g. “bt709”, “arib-std-b67” (HLG), “smpte2084” (PQ).
side_data_list: Vec<SideData>Side data — a “Display Matrix” entry carries the rotation a player applies (phones store portrait video as a landscape frame + rotation).
Stream tags (older files keep the rotation as rotate).
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Stream
impl<'de> Deserialize<'de> for Stream
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Stream
impl RefUnwindSafe for Stream
impl Send for Stream
impl Sync for Stream
impl Unpin for Stream
impl UnsafeUnpin for Stream
impl UnwindSafe for Stream
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more