VideoDecoder
VideoDecoder
#include <icy/av/videodecoder.h>Inherits:
VideoContext
Decodes compressed video packets into raw frames.
Public Methods
| 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
VideoDecoder(AVStream * stream)Construct a decoder for the given stream. The codec parameters are read from the stream's codecpar.
Parameters
streamThe AVStream to decode; must remain valid for the lifetime of this decoder.
create
virtual
virtual void create()Initialise the AVCodecContext from the stream's codec parameters.
open
virtual
virtual void open()Open the codec and initialise any required pixel format conversion context.
close
virtual
virtual void close()Close and free the AVCodecContext and associated resources.
decode
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.
Parameters
ipacketThe compressed video packet to decode.
Returns
True if an output frame was decoded and emitted, false otherwise.
flush
virtual
virtual void flush()Flush any frames buffered inside the decoder. Call repeatedly after the last packet until false is returned.
