#include <icy/av/audiodecoder.h>Inherits:
AudioContext
Decodes compressed audio packets into raw sample frames.
| Return | Name | Description |
|---|---|---|
AudioDecoder | Construct a decoder for the given stream. The codec parameters are read from the stream's codecpar. | |
void | create virtual | Initialise the AVCodecContext from the stream's codec parameters. |
void | close virtual | Close and free the AVCodecContext and associated resources. |
bool | decode virtual | Decode the given compressed audio packet and emit the decoded samples. |
void | flush virtual | Flush any frames buffered inside the decoder. Call this after the last packet to retrieve all remaining decoded output. |
AudioDecoder(AVStream * stream)Construct a decoder for the given stream. The codec parameters are read from the stream's codecpar.
stream The AVStream to decode; must remain valid for the lifetime of this decoder.virtual
virtual void create()Initialise the AVCodecContext from the stream's codec parameters.
virtual
virtual void close()Close and free the AVCodecContext and associated resources.
virtual
virtual bool decode(AVPacket & ipacket)Decode the given compressed audio packet and emit the decoded samples.
ipacket The compressed audio packet to decode.True if one or more output frames were decoded and emitted, false otherwise.
virtual
virtual void flush()Flush any frames buffered inside the decoder. Call this after the last packet to retrieve all remaining decoded output.