pub struct SourceFormat {
pub pix_fmt: String,
pub bit_depth: u8,
pub color_primaries: String,
pub color_transfer: String,
pub color_space: String,
pub is_hdr: bool,
}Expand description
Snapshot of source video color characteristics for encode preservation.
Fields§
§pix_fmt: StringPreferred output pixel format (e.g. yuv420p10le).
bit_depth: u8Effective bit depth (8, 10, 12, or 16).
color_primaries: StringColor primaries from probe (e.g. bt2020).
color_transfer: StringColor transfer from probe (e.g. smpte2084).
color_space: StringColor matrix / space from probe.
is_hdr: boolWhether the stream carries HDR signaling.
Implementations§
Source§impl SourceFormat
impl SourceFormat
Sourcepub fn from_stream(stream: &StreamInfo) -> Self
pub fn from_stream(stream: &StreamInfo) -> Self
Builds a format snapshot from a probed video stream.
Sourcepub fn is_high_bit_depth(&self) -> bool
pub fn is_high_bit_depth(&self) -> bool
Returns true when the source should be encoded at more than 8 bits per sample.
Trait Implementations§
Source§impl Clone for SourceFormat
impl Clone for SourceFormat
Source§fn clone(&self) -> SourceFormat
fn clone(&self) -> SourceFormat
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SourceFormat
impl Debug for SourceFormat
Source§impl Default for SourceFormat
impl Default for SourceFormat
Source§fn default() -> SourceFormat
fn default() -> SourceFormat
Returns the “default value” for a type. Read more
impl Eq for SourceFormat
Source§impl PartialEq for SourceFormat
impl PartialEq for SourceFormat
Source§fn eq(&self, other: &SourceFormat) -> bool
fn eq(&self, other: &SourceFormat) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SourceFormat
Auto Trait Implementations§
impl Freeze for SourceFormat
impl RefUnwindSafe for SourceFormat
impl Send for SourceFormat
impl Sync for SourceFormat
impl Unpin for SourceFormat
impl UnsafeUnpin for SourceFormat
impl UnwindSafe for SourceFormat
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