pub struct SubtitlePacket {
pub timestamp_ms: u32,
pub duration_ms: u32,
pub x: u16,
pub y: u16,
pub width: u16,
pub height: u16,
pub color_indices: [u8; 4],
pub alpha_values: [u8; 4],
/* private fields */
}Expand description
Parsed subtitle packet from the SUB file.
Fields§
§timestamp_ms: u32Timestamp in milliseconds (from PTS)
duration_ms: u32Duration in milliseconds
x: u16X position
y: u16Y position
width: u16Width
height: u16Height
color_indices: [u8; 4]4 color indices into the 16-color palette
alpha_values: [u8; 4]4 alpha values (0-15, where 0 is transparent, 15 is opaque)
Implementations§
Source§impl SubtitlePacket
impl SubtitlePacket
pub fn even_field_data<'a>(&'a self, sub_data: &'a [u8]) -> &'a [u8] ⓘ
pub fn odd_field_data<'a>(&'a self, sub_data: &'a [u8]) -> &'a [u8] ⓘ
Trait Implementations§
Source§impl Clone for SubtitlePacket
impl Clone for SubtitlePacket
Source§fn clone(&self) -> SubtitlePacket
fn clone(&self) -> SubtitlePacket
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 moreAuto Trait Implementations§
impl Freeze for SubtitlePacket
impl RefUnwindSafe for SubtitlePacket
impl Send for SubtitlePacket
impl Sync for SubtitlePacket
impl Unpin for SubtitlePacket
impl UnsafeUnpin for SubtitlePacket
impl UnwindSafe for SubtitlePacket
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