#include <icy/av/videodecoder.h>Inherits:
VideoContext
Decodes compressed video packets into raw frames.
| Return | Name | Description |
|---|---|---|
VideoDecoder | 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 | open virtual | Open the codec and initialise any required pixel format conversion context. |
void | close virtual | Close and free the AVCodecContext and associated resources. |
bool | decode virtual | Decode the given compressed video packet and emit the decoded frame. Input packets must use the raw AVStream time base; time base conversion to microseconds is performed internally. |
void | flush virtual | Flush any frames buffered inside the decoder. Call repeatedly after the last packet until false is returned. |
VideoDecoder(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 open()Open the codec and initialise any required pixel format conversion context.
virtual
virtual void close()Close and free the AVCodecContext and associated resources.
virtual
virtual bool decode(AVPacket & ipacket)Decode the given compressed video packet and emit the decoded frame. Input packets must use the raw AVStream time base; time base conversion to microseconds is performed internally.
ipacket The compressed video packet to decode.True if an output frame was decoded and emitted, false otherwise.
virtual
virtual void flush()Flush any frames buffered inside the decoder. Call repeatedly after the last packet until false is returned.