pub struct DisplaySet {
pub pts: u32,
pub dts: u32,
pub composition: Option<PresentationCompositionSegment>,
pub palettes: Vec<PaletteDefinitionSegment>,
pub objects: Vec<ObjectDefinitionSegment>,
pub windows: Vec<WindowDefinitionSegment>,
}Expand description
A display set contains all segments for a single subtitle update.
Fields§
§pts: u32Presentation timestamp in 90kHz units
dts: u32Decoding timestamp in 90kHz units
composition: Option<PresentationCompositionSegment>Presentation composition segment (defines what to render)
palettes: Vec<PaletteDefinitionSegment>Palette definitions in this display set
objects: Vec<ObjectDefinitionSegment>Object definitions in this display set
windows: Vec<WindowDefinitionSegment>Window definitions in this display set
Implementations§
Source§impl DisplaySet
impl DisplaySet
Sourcepub fn parse(data: &[u8], include_header: bool) -> Option<(Self, usize)>
pub fn parse(data: &[u8], include_header: bool) -> Option<(Self, usize)>
Parse a display set from binary data. Returns the display set and the number of bytes consumed.
Sourcepub fn find_window(&self, id: u8) -> Option<&WindowDefinition>
pub fn find_window(&self, id: u8) -> Option<&WindowDefinition>
Find a window definition by ID.
Sourcepub fn find_palette(&self, id: u8) -> Option<&PaletteDefinitionSegment>
pub fn find_palette(&self, id: u8) -> Option<&PaletteDefinitionSegment>
Find a palette by ID.
Trait Implementations§
Source§impl Clone for DisplaySet
impl Clone for DisplaySet
Source§fn clone(&self) -> DisplaySet
fn clone(&self) -> DisplaySet
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 DisplaySet
impl Debug for DisplaySet
Auto Trait Implementations§
impl Freeze for DisplaySet
impl RefUnwindSafe for DisplaySet
impl Send for DisplaySet
impl Sync for DisplaySet
impl Unpin for DisplaySet
impl UnsafeUnpin for DisplaySet
impl UnwindSafe for DisplaySet
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