VideoDecoder
#include <icy/av/videodecoder.h>
struct VideoDecoderDefined in src/av/include/icy/av/videodecoder.h:28
- Inherits
VideoContext
List of all members
| Name | Kind | Owner |
|---|---|---|
VideoDecoder | function | Declared here |
~VideoDecoder | function | Declared here |
create | function | Declared here |
open | function | Declared here |
close | function | Declared here |
decode | function | Declared here |
flush | function | Declared here |
emitter | variable | Inherited from VideoContext |
iparams | variable | Inherited from VideoContext |
oparams | variable | Inherited from VideoContext |
stream | variable | Inherited from VideoContext |
ctx | variable | Inherited from VideoContext |
codec | variable | Inherited from VideoContext |
frame | variable | Inherited from VideoContext |
conv | variable | Inherited from VideoContext |
time | variable | Inherited from VideoContext |
pts | variable | Inherited from VideoContext |
seconds | variable | Inherited from VideoContext |
error | variable | Inherited from VideoContext |
VideoContext | function | Inherited from VideoContext |
~VideoContext | function | Inherited from VideoContext |
VideoContext | function | Inherited from VideoContext |
operator= | function | Inherited from VideoContext |
VideoContext | function | Inherited from VideoContext |
operator= | function | Inherited from VideoContext |
create | function | Inherited from VideoContext |
open | function | Inherited from VideoContext |
close | function | Inherited from VideoContext |
decode | function | Inherited from VideoContext |
encode | function | Inherited from VideoContext |
encode | function | Inherited from VideoContext |
encode | function | Inherited from VideoContext |
flush | function | Inherited from VideoContext |
convert | function | Inherited from VideoContext |
recreateConverter | function | Inherited from VideoContext |
Inherited from VideoContext
| Kind | Name | Description |
|---|---|---|
variable | emitter | |
variable | iparams | input parameters |
variable | oparams | output parameters |
variable | stream | encoder or decoder stream |
variable | ctx | encoder or decoder context |
variable | codec | encoder or decoder codec |
variable | frame | encoder or decoder frame |
variable | conv | video conversion context |
variable | time | stream time in codec time base |
variable | pts | last packet pts value |
variable | seconds | video time in seconds |
variable | error | error message |
function | VideoContext | |
function | ~VideoContext virtual noexcept | |
function | VideoContext | Deleted constructor. |
function | operator= | Deleted assignment operator. |
function | VideoContext | Deleted constructor. |
function | operator= | Deleted assignment operator. |
function | create virtual | Initialise the AVCodecContext with codec-specific defaults. Overridden by VideoEncoder and VideoDecoder. |
function | open virtual | Open the codec and create the pixel format conversion context if required. Throws std::runtime_error if the codec context has not been created. |
function | close virtual | Close the codec context, free the frame, and reset timestamps. |
function | decode virtual | Decode a compressed video packet and emit the resulting frame. |
function | encode virtual | Encode a buffer of interleaved video data. |
function | encode virtual | Encode a planar video frame. |
function | encode virtual | Encode a single AVFrame. |
function | flush virtual | Flush any frames buffered inside the codec and emit remaining output. |
function | convert virtual | Convert the video frame and return the result. |
function | recreateConverter virtual | Recreate the VideoConverter if the input or output parameters have changed. Called automatically by open() and convert(). |
Public Methods
| Return | Name | Description |
|---|---|---|
VideoDecoder | Construct a decoder for the given stream. The codec parameters are read from the stream's codecpar. | |
~VideoDecoder noexcept override | ||
void | create virtual override | Initialise the AVCodecContext from the stream's codec parameters. |
void | open virtual override | Open the codec and initialise any required pixel format conversion context. |
void | close virtual override | Close and free the AVCodecContext and associated resources. |
bool | decode virtual override | 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 override | Flush any frames buffered inside the decoder. Call repeatedly after the last packet until false is returned. |
VideoDecoder
VideoDecoder(AVStream * stream)Defined in src/av/include/icy/av/videodecoder.h:33
Construct a decoder for the given stream. The codec parameters are read from the stream's codecpar.
Parameters
| Parameter | Type | Description |
|---|---|---|
stream | AVStream * | The AVStream to decode; must remain valid for the lifetime of this decoder. |
~VideoDecoder
noexcept override
~VideoDecoder() noexcept overrideDefined in src/av/include/icy/av/videodecoder.h:34
create
virtual override
virtual void create() overrideDefined in src/av/include/icy/av/videodecoder.h:37
Initialise the AVCodecContext from the stream's codec parameters.
Reimplements
open
virtual override
virtual void open() overrideDefined in src/av/include/icy/av/videodecoder.h:40
Open the codec and initialise any required pixel format conversion context.
Reimplements
close
virtual override
virtual void close() overrideDefined in src/av/include/icy/av/videodecoder.h:43
Close and free the AVCodecContext and associated resources.
Reimplements
decode
virtual override
virtual bool decode(AVPacket & ipacket) overrideDefined in src/av/include/icy/av/videodecoder.h:50
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.
Returns
True if an output frame was decoded and emitted, false otherwise.
Reimplements
Parameters
| Parameter | Type | Description |
|---|---|---|
ipacket | AVPacket & | The compressed video packet to decode. |
flush
virtual override
virtual void flush() overrideDefined in src/av/include/icy/av/videodecoder.h:54
Flush any frames buffered inside the decoder. Call repeatedly after the last packet until false is returned.
