pub struct CCDataParser { /* private fields */ }
Expand description
Parses a byte stream of cc_data
bytes into indivdual DTVCCPacket
s.
Implementations§
Source§impl CCDataParser
impl CCDataParser
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new CCDataParser
pub fn handle_cea608(&mut self)
Sourcepub fn push(&mut self, data: &[u8]) -> Result<(), ParserError>
pub fn push(&mut self, data: &[u8]) -> Result<(), ParserError>
Push a complete cc_data
packet into the parser for processing.
Will fail with ParserError::LengthMismatch if the length of the data does not match the
number of cc triples specified in the cc_data
header.
Any CEA-608 data provided after valid CEA-708 data will return ParserError::Cea608AfterCea708.
Sourcepub fn pop_packet(&mut self) -> Option<DTVCCPacket>
pub fn pop_packet(&mut self) -> Option<DTVCCPacket>
Pop a valid DTVCCPacket or None if no packet could be parsed
Trait Implementations§
Source§impl Debug for CCDataParser
impl Debug for CCDataParser
Source§impl Default for CCDataParser
impl Default for CCDataParser
Source§fn default() -> CCDataParser
fn default() -> CCDataParser
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CCDataParser
impl RefUnwindSafe for CCDataParser
impl Send for CCDataParser
impl Sync for CCDataParser
impl Unpin for CCDataParser
impl UnwindSafe for CCDataParser
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