pub struct Ac4Decoder {
pub last_info: Option<Ac4FrameInfo>,
pub last_substream: Option<Ac4SubstreamInfo>,
/* private fields */
}Fields§
§last_info: Option<Ac4FrameInfo>Last parsed frame info — exposed for downstream inspection.
last_substream: Option<Ac4SubstreamInfo>Last parsed substream tool summary (first substream of the last
decoded frame). None when the TOC didn’t expose a usable size
for the substream (e.g. single-substream frame where
b_size_present == 0).
Implementations§
Source§impl Ac4Decoder
impl Ac4Decoder
pub fn new(params: &CodecParameters) -> Self
Trait Implementations§
Source§impl Decoder for Ac4Decoder
impl Decoder for Ac4Decoder
fn codec_id(&self) -> &CodecId
Source§fn send_packet(&mut self, packet: &Packet) -> Result<()>
fn send_packet(&mut self, packet: &Packet) -> Result<()>
Feed one compressed packet. May or may not produce a frame immediately —
call
receive_frame in a loop afterwards.Source§fn receive_frame(&mut self) -> Result<Frame>
fn receive_frame(&mut self) -> Result<Frame>
Pull the next decoded frame, if any. Returns
Error::NeedMore when the
decoder needs another packet.Source§fn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
Signal end-of-stream. After this,
receive_frame will drain buffered
frames and eventually return Error::Eof.Source§fn receive_arena_frame(&mut self) -> Result<Arc<FrameInner>, Error>
fn receive_arena_frame(&mut self) -> Result<Arc<FrameInner>, Error>
Pull the next decoded frame as an arena-backed
arena::sync::Frame. Read moreSource§fn reset(&mut self) -> Result<(), Error>
fn reset(&mut self) -> Result<(), Error>
Discard all carry-over state so the decoder can resume from a new
bitstream position without producing stale output. Called by the
player after a container seek. Read more
Source§fn set_execution_context(&mut self, _ctx: &ExecutionContext)
fn set_execution_context(&mut self, _ctx: &ExecutionContext)
Advisory: announce the runtime environment (today: a thread budget
for codec-internal parallelism). Called at most once, before the
first
send_packet. Default no-op; codecs that want to run
slice-/GOP-/tile-parallel override this to capture the budget.
Ignoring the hint is always safe — callers must still work with
a decoder that runs serial.Auto Trait Implementations§
impl Freeze for Ac4Decoder
impl RefUnwindSafe for Ac4Decoder
impl Send for Ac4Decoder
impl Sync for Ac4Decoder
impl Unpin for Ac4Decoder
impl UnsafeUnpin for Ac4Decoder
impl UnwindSafe for Ac4Decoder
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