pub struct MetadataFrame { /* private fields */ }Expand description
Owned UTF-8 metadata text and its timecode.
NDI expects XML when sending; callers are responsible for XML syntax. Text cannot contain NUL bytes and is limited to 4 MiB including the SDK terminator.
Implementations§
Source§impl MetadataFrame
impl MetadataFrame
Sourcepub fn with_data(data: impl Into<String>, timecode: i64) -> Result<Self>
pub fn with_data(data: impl Into<String>, timecode: i64) -> Result<Self>
Create a metadata frame from UTF-8 text and a timecode.
§Errors
Returns Error::InvalidCString if data contains an interior NUL byte
or Error::InvalidFrame if the SDK metadata length would exceed the
crate’s metadata size limit.
Sourcepub fn timecode(&self) -> i64
pub fn timecode(&self) -> i64
Get the timecode in 100 ns units.
Defaults to the SDK’s synthesized-timecode sentinel. An explicit zero is passed through as a literal timecode.
Sourcepub fn set_data(&mut self, data: impl Into<String>) -> Result<()>
pub fn set_data(&mut self, data: impl Into<String>) -> Result<()>
Replace the metadata text.
§Errors
Returns Error::InvalidCString if data contains an interior NUL byte
or Error::InvalidFrame if the SDK metadata length would exceed the
crate’s metadata size limit.
Sourcepub fn set_timecode(&mut self, timecode: i64)
pub fn set_timecode(&mut self, timecode: i64)
Set the timecode.
Sourcepub fn with_timecode(self, timecode: i64) -> Self
pub fn with_timecode(self, timecode: i64) -> Self
Return this frame with an updated timecode.
Trait Implementations§
Source§impl Clone for MetadataFrame
impl Clone for MetadataFrame
Source§fn clone(&self) -> MetadataFrame
fn clone(&self) -> MetadataFrame
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more