pub struct TransparentEncoder { /* private fields */ }Expand description
Encodes transparent frames and muxes them into an Apple-compatible container.
Implementations§
Source§impl TransparentEncoder
impl TransparentEncoder
Sourcepub fn new(width: u32, height: u32) -> Self
pub fn new(width: u32, height: u32) -> Self
New encoder using the reference 64×64 multi-layer VPS.
Sourcepub fn with_vps(width: u32, height: u32, vps_nal: &[u8]) -> Self
pub fn with_vps(width: u32, height: u32, vps_nal: &[u8]) -> Self
New encoder with an explicit multi-layer VPS NAL (for experimenting with
resolution generalization / a generated vps_extension).
Sourcepub fn encode_frame(&mut self, color: &Yuv420Frame, alpha: &[u8])
pub fn encode_frame(&mut self, color: &Yuv420Frame, alpha: &[u8])
Append one frame: color (4:2:0) plus a full-resolution alpha plane
(width × height, 0 = transparent, 255 = opaque).
Sourcepub fn finish_mov(&self, fps: u32) -> Vec<u8> ⓘ
pub fn finish_mov(&self, fps: u32) -> Vec<u8> ⓘ
Finish, muxing all frames into an Apple-compatible .mov byte stream at
fps frames per second.
Auto Trait Implementations§
impl Forget for TransparentEncoder
impl Freeze for TransparentEncoder
impl Move for TransparentEncoder
impl RefUnwindSafe for TransparentEncoder
impl Send for TransparentEncoder
impl Sync for TransparentEncoder
impl Unpin for TransparentEncoder
impl UnsafeUnpin for TransparentEncoder
impl UnwindSafe for TransparentEncoder
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
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> ⓘ
Converts
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> ⓘ
Converts
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