Struct gstreamer_video::VideoVBIEncoder
source · pub struct VideoVBIEncoder { /* private fields */ }
Available on crate feature
v1_16
only.Implementations§
source§impl VideoVBIEncoder
impl VideoVBIEncoder
pub fn try_new( format: VideoFormat, pixel_width: u32 ) -> Result<VideoVBIEncoder, VideoVBIError>
sourcepub fn add_did_ancillary(
&mut self,
adf_mode: VideoAFDDescriptionMode,
did: VideoAncillaryDID,
block_number: u8,
data: &[u8]
) -> Result<(), VideoVBIError>
pub fn add_did_ancillary( &mut self, adf_mode: VideoAFDDescriptionMode, did: VideoAncillaryDID, block_number: u8, data: &[u8] ) -> Result<(), VideoVBIError>
Adds the provided ancillary data as a DID and block number AFD.
sourcepub fn add_did16_ancillary(
&mut self,
adf_mode: VideoAFDDescriptionMode,
did16: VideoAncillaryDID16,
data: &[u8]
) -> Result<(), VideoVBIError>
pub fn add_did16_ancillary( &mut self, adf_mode: VideoAFDDescriptionMode, did16: VideoAncillaryDID16, data: &[u8] ) -> Result<(), VideoVBIError>
Adds the provided ancillary data as a DID16 (DID & SDID) AFD.
pub fn add_ancillary( &mut self, adf_mode: VideoAFDDescriptionMode, did: u8, sdid_block_number: u8, data: &[u8] ) -> Result<(), VideoVBIError>
sourcepub fn line_buffer_len(&self) -> usize
pub fn line_buffer_len(&self) -> usize
Returns the buffer length needed to store the line.
sourcepub fn write_line(&mut self, data: &mut [u8]) -> Result<usize, VideoVBIError>
pub fn write_line(&mut self, data: &mut [u8]) -> Result<usize, VideoVBIError>
Writes the ancillaries encoded for VBI to the provided buffer.
Use Self::line_buffer_len
to get the expected buffer length.
Resets the internal state, so this VideoVBIEncoder
can be reused for
subsequent VBI encodings.
§Returns
Ok
with the written length in bytes in the line buffer containing the encoded ancilliaries previously added usingVideoVBIEncoder::add_ancillary
,VideoVBIEncoder::add_did_ancillary
orVideoVBIEncoder::add_did16_ancillary
.Err
if the ancillary could not be added.
Trait Implementations§
source§impl Debug for VideoVBIEncoder
impl Debug for VideoVBIEncoder
source§impl Hash for VideoVBIEncoder
impl Hash for VideoVBIEncoder
source§impl Ord for VideoVBIEncoder
impl Ord for VideoVBIEncoder
source§fn cmp(&self, other: &VideoVBIEncoder) -> Ordering
fn cmp(&self, other: &VideoVBIEncoder) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for VideoVBIEncoder
impl PartialEq for VideoVBIEncoder
source§fn eq(&self, other: &VideoVBIEncoder) -> bool
fn eq(&self, other: &VideoVBIEncoder) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for VideoVBIEncoder
impl PartialOrd for VideoVBIEncoder
source§fn partial_cmp(&self, other: &VideoVBIEncoder) -> Option<Ordering>
fn partial_cmp(&self, other: &VideoVBIEncoder) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl<'a> TryFrom<&'a VideoInfo> for VideoVBIEncoder
impl<'a> TryFrom<&'a VideoInfo> for VideoVBIEncoder
§type Error = VideoVBIError
type Error = VideoVBIError
The type returned in the event of a conversion error.
source§fn try_from(info: &'a VideoInfo) -> Result<VideoVBIEncoder, VideoVBIError>
fn try_from(info: &'a VideoInfo) -> Result<VideoVBIEncoder, VideoVBIError>
Performs the conversion.
impl Eq for VideoVBIEncoder
impl Send for VideoVBIEncoder
impl StructuralPartialEq for VideoVBIEncoder
impl Sync for VideoVBIEncoder
Auto Trait Implementations§
impl Freeze for VideoVBIEncoder
impl RefUnwindSafe for VideoVBIEncoder
impl Unpin for VideoVBIEncoder
impl UnwindSafe for VideoVBIEncoder
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