Struct gstreamer_video::VideoVBIEncoder
source · pub struct VideoVBIEncoder { /* private fields */ }
Expand description
An encoder for writing ancillary data to the Vertical Blanking Interval lines of component signals.
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.
sourcepub fn add_ancillary(
&mut self,
adf_mode: VideoAFDDescriptionMode,
did: u8,
sdid_block_number: u8,
data: &[u8],
) -> Result<(), VideoVBIError>
pub fn add_ancillary( &mut self, adf_mode: VideoAFDDescriptionMode, did: u8, sdid_block_number: u8, data: &[u8], ) -> Result<(), VideoVBIError>
Stores Video Ancillary data, according to SMPTE-291M specification.
Note that the contents of the data are always read as 8bit data (i.e. do not contain the parity check bits).
§composite
true
if composite ADF should be created, component otherwise
§DID
The Data Identifier
§SDID_block_number
The Secondary Data Identifier (if type 2) or the Data Block Number (if type 1)
§data
The user data content of the Ancillary packet. Does not contain the ADF, DID, SDID nor CS.
§Returns
true
if enough space was left in the current line, false
otherwise.
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,
source§impl PartialEq for VideoVBIEncoder
impl PartialEq for VideoVBIEncoder
source§fn eq(&self, other: &VideoVBIEncoder) -> bool
fn eq(&self, other: &VideoVBIEncoder) -> bool
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
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
source§fn try_from(info: &'a VideoInfo) -> Result<VideoVBIEncoder, VideoVBIError>
fn try_from(info: &'a VideoInfo) -> Result<VideoVBIEncoder, VideoVBIError>
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more