pub struct Vp8MetadataBlock {
pub payload: Vec<u8>,
}Expand description
A VP8 user-data extension block.
VP8 does not define a formal SEI syntax, so this structure embeds metadata
using an application-level convention: a marker byte (0xFE) followed by a
4-byte big-endian length, followed by the payload. This block is placed
after the last partition data and before the end of the data partition.
Important: this is not part of the VP8 bitstream specification. It is OxiMedia’s application-level convention for attaching metadata to VP8 packets when the container does not provide a side-data channel.
Fields§
§payload: Vec<u8>Serialised SEI payload (output of SeiEncoder::finish).
Implementations§
Source§impl Vp8MetadataBlock
impl Vp8MetadataBlock
Sourcepub fn new(payload: Vec<u8>) -> Self
pub fn new(payload: Vec<u8>) -> Self
Create a VP8 metadata block from a pre-serialised SEI payload.
Sourcepub fn to_bytes(&self) -> Vec<u8> ⓘ
pub fn to_bytes(&self) -> Vec<u8> ⓘ
Serialise to bytes.
Wire format: [0xFE][length: u32 BE][payload...]
Sourcepub fn from_bytes(raw: &[u8]) -> CodecResult<Self>
pub fn from_bytes(raw: &[u8]) -> CodecResult<Self>
Parse a VP8 metadata block from raw bytes.
Trait Implementations§
Source§impl Clone for Vp8MetadataBlock
impl Clone for Vp8MetadataBlock
Source§fn clone(&self) -> Vp8MetadataBlock
fn clone(&self) -> Vp8MetadataBlock
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 Vp8MetadataBlock
impl Debug for Vp8MetadataBlock
Source§impl PartialEq for Vp8MetadataBlock
impl PartialEq for Vp8MetadataBlock
Source§fn eq(&self, other: &Vp8MetadataBlock) -> bool
fn eq(&self, other: &Vp8MetadataBlock) -> bool
self and other values to be equal, and is used by ==.impl Eq for Vp8MetadataBlock
impl StructuralPartialEq for Vp8MetadataBlock
Auto Trait Implementations§
impl Freeze for Vp8MetadataBlock
impl RefUnwindSafe for Vp8MetadataBlock
impl Send for Vp8MetadataBlock
impl Sync for Vp8MetadataBlock
impl Unpin for Vp8MetadataBlock
impl UnsafeUnpin for Vp8MetadataBlock
impl UnwindSafe for Vp8MetadataBlock
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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