pub struct CaptionMeta {
pub triples: Vec<CaptionTriple>,
}Expand description
The closed-caption bytes the coded picture this frame came from carried
(its A/53 GA94 caption SEI, or a container caption track). Lets a
decode -> re-encode chain re-author captions the decoder would otherwise
have dropped with the bitstream.
Only the triples are stored: the rest of the A/53 cc_data header is
either constant (process_cc_data_flag, em_data) or derived
(cc_count = the triple count), so a rebuilt SEI is byte-identical.
Fields§
§triples: Vec<CaptionTriple>Implementations§
Source§impl CaptionMeta
impl CaptionMeta
pub fn new() -> Self
Sourcepub fn push(&mut self, triple: CaptionTriple)
pub fn push(&mut self, triple: CaptionTriple)
Append one caption triple, in transmission order.
Sourcepub fn iter(&self) -> impl Iterator<Item = &CaptionTriple>
pub fn iter(&self) -> impl Iterator<Item = &CaptionTriple>
Iterate the carried triples in transmission order.
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
Trait Implementations§
Source§impl Clone for CaptionMeta
impl Clone for CaptionMeta
Source§fn clone(&self) -> CaptionMeta
fn clone(&self) -> CaptionMeta
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CaptionMeta
impl Debug for CaptionMeta
Source§impl Default for CaptionMeta
impl Default for CaptionMeta
Source§fn default() -> CaptionMeta
fn default() -> CaptionMeta
impl Eq for CaptionMeta
Source§impl FrameMeta for CaptionMeta
impl FrameMeta for CaptionMeta
Source§fn propagate(&self, _transform: Transform) -> Propagation
fn propagate(&self, _transform: Transform) -> Propagation
Captions are text on a timeline, not pixel geometry, so they survive a scale / crop / copy and a re-encode: the whole point is that a caption inserter downstream of an encoder can re-author them into the new bitstream.
fn as_any(&self) -> &dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Source§fn clone_box(&self) -> Box<dyn FrameMeta>
fn clone_box(&self) -> Box<dyn FrameMeta>
copy_func analog. Backs
the copy-on-write of a shared meta when a tee branch mutates it (see
FrameMetaSet::get_mut); each FrameMeta impl is its own concrete
type, so the duplication can only be expressed on the trait.