Skip to main content

Cea708CueExtractor

Struct Cea708CueExtractor 

Source
pub struct Cea708CueExtractor { /* private fields */ }
Available on crate feature cc-data only.
Expand description

Extracts Cues from a single CEA-708 (DTVCC) service (CTA-708-E), wrapping a cc-data cc_data::decode::Cea708Decoder.

Reads cc_data::decode::Cea708Decoder::service_text for the configured service number (1-6; service 1 is the primary caption service) after each fed frame — see crate::webvtt module docs for the diff-based boundary design and its documented losses (styling, window geometry, cross-service merging).

Implementations§

Source§

impl Cea708CueExtractor

Source

pub fn new(service_number: usize) -> Self

A new extractor tracking the given CEA-708 service number (1-6).

Source

pub fn push_frame(&mut self, pts33: u64, triplets: &[CcTriplet])

Feed one access unit’s CEA-708 triplets (already demuxed from its cc_data()), tagged with that access unit’s raw 33-bit PTS. Non-708 triplets in triplets are ignored.

Source

pub fn finalize(&mut self, end_pts33: u64)

Close any still-open cue at end of stream, at end_pts33.

Source

pub fn cues(&self) -> &[Cue]

The cues extracted so far, in order.

Source

pub fn into_cues(self) -> Vec<Cue>

Consume the extractor, returning the extracted cues.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.