pub struct SoftwareVideoDecoder { /* private fields */ }Expand description
Pure-Rust software fallback decoder handling intra RGBA8, intra YUV420P (with full CICP color matrix math), and P-frame XOR delta packets.
Implementations§
Source§impl SoftwareVideoDecoder
Packet encoders and YUV-to-RGB color conversion helpers for SoftwareVideoDecoder.
impl SoftwareVideoDecoder
Packet encoders and YUV-to-RGB color conversion helpers for SoftwareVideoDecoder.
Sourcepub fn encode_intra_yuv420p_packet(
width: u32,
height: u32,
y_plane: &[u8],
u_plane: &[u8],
v_plane: &[u8],
) -> Vec<u8> ⓘ
pub fn encode_intra_yuv420p_packet( width: u32, height: u32, y_plane: &[u8], u_plane: &[u8], v_plane: &[u8], ) -> Vec<u8> ⓘ
Encodes an intra-coded EVF1 tri-planar YUV420P frame packet decoded using the track’s VideoColorInfo matrix and range.
§Arguments
u32- Frame width in pixels.u32- Frame height in pixels.&[u8]- Y luma plane (width * height).&[u8]- U (Cb) chroma plane (ceil(width / 2) * ceil(height / 2)).&[u8]- V (Cr) chroma plane (ceil(width / 2) * ceil(height / 2)).
§Returns
Vec<u8>- EncodedEVF1intra YUV420P packet bytes.
Source§impl SoftwareVideoDecoder
impl SoftwareVideoDecoder
pub fn get_config(&self) -> VideoDecoderConfig
pub fn get_mut_config(&mut self) -> &mut VideoDecoderConfig
pub fn set_config( &mut self, val: VideoDecoderConfig, ) -> &mut SoftwareVideoDecoder
pub fn get_has_reference(&self) -> bool
pub fn get_mut_has_reference(&mut self) -> &mut bool
pub fn set_has_reference(&mut self, val: bool) -> &mut SoftwareVideoDecoder
pub fn get_decoded_frames(&self) -> u64
pub fn get_mut_decoded_frames(&mut self) -> &mut u64
pub fn set_decoded_frames(&mut self, val: u64) -> &mut SoftwareVideoDecoder
Trait Implementations§
Source§impl Clone for SoftwareVideoDecoder
impl Clone for SoftwareVideoDecoder
Source§fn clone(&self) -> SoftwareVideoDecoder
fn clone(&self) -> SoftwareVideoDecoder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SoftwareVideoDecoder
impl Debug for SoftwareVideoDecoder
Source§impl Default for SoftwareVideoDecoder
impl Default for SoftwareVideoDecoder
Source§fn default() -> SoftwareVideoDecoder
fn default() -> SoftwareVideoDecoder
Returns the “default value” for a type. Read more
Source§impl VideoDecoderBackend for SoftwareVideoDecoder
Pure-Rust software fallback VideoDecoderBackend implementation for SoftwareVideoDecoder.
impl VideoDecoderBackend for SoftwareVideoDecoder
Pure-Rust software fallback VideoDecoderBackend implementation for SoftwareVideoDecoder.
Source§fn backend_kind(&self) -> HardwareDecoderKind
fn backend_kind(&self) -> HardwareDecoderKind
Source§fn capabilities(&self) -> HardwareDecoderCapabilities
fn capabilities(&self) -> HardwareDecoderCapabilities
Source§fn decode_packet(
&mut self,
packet: &EncodedVideoPacket,
pool: &VideoFramePool,
) -> Result<Option<DecodedVideoFrame>, String>
fn decode_packet( &mut self, packet: &EncodedVideoPacket, pool: &VideoFramePool, ) -> Result<Option<DecodedVideoFrame>, String>
Decodes an EVF1 intra/YUV420P/delta packet or raw RGBA8 frame into a pooled CPU DecodedVideoFrame.
§Arguments
&Self- Mutable software decoder.&EncodedVideoPacket- Encoded packet with DTS/PTS and seek generation.&VideoFramePool- Bounded CPU pixel pool.
§Returns
Result<Option<DecodedVideoFrame>, String>- Decoded CPU pooled frame or error.
Auto Trait Implementations§
impl Forget for SoftwareVideoDecoder
impl Freeze for SoftwareVideoDecoder
impl Move for SoftwareVideoDecoder
impl RefUnwindSafe for SoftwareVideoDecoder
impl Send for SoftwareVideoDecoderwhere
RawVecInner: Send,
impl Sync for SoftwareVideoDecoderwhere
RawVecInner: Sync,
impl Unpin for SoftwareVideoDecoder
impl UnsafeUnpin for SoftwareVideoDecoder
impl UnwindSafe for SoftwareVideoDecoderwhere
RawVecInner: UnwindSafe,
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