#include <icy/av/videoconverter.h>Converts video frames between pixel formats and resolutions.
| Return | Name | Description |
|---|---|---|
SwsContext * | ctx | libswscale conversion context. |
AVFrame * | oframe | Reusable output frame allocated by create(). |
VideoCodec | iparams | Expected input video parameters. |
VideoCodec | oparams | Target output video parameters. |
SwsContext * ctxlibswscale conversion context.
AVFrame * oframeReusable output frame allocated by create().
VideoCodec iparamsExpected input video parameters.
VideoCodec oparamsTarget output video parameters.
| Return | Name | Description |
|---|---|---|
VideoConverter | ||
VideoConverter | Deleted constructor. | |
VideoConverter | Deleted constructor. | |
void | create virtual | Initialise the libswscale context and allocate the output frame. Uses iparams and oparams to configure the conversion pipeline. Throws std::runtime_error if already initialised or if parameters are invalid. |
void | close virtual | Free the libswscale context and the output frame. |
AVFrame * | convert virtual | Convert iframe to the output pixel format and resolution. The returned frame is owned by this converter and is overwritten on the next call. |
VideoConverter()VideoConverter(const VideoConverter &) = deleteDeleted constructor.
VideoConverter(VideoConverter &&) = deleteDeleted constructor.
virtual
virtual void create()Initialise the libswscale context and allocate the output frame. Uses iparams and oparams to configure the conversion pipeline. Throws std::runtime_error if already initialised or if parameters are invalid.
virtual
virtual void close()Free the libswscale context and the output frame.
virtual
virtual AVFrame * convert(AVFrame * iframe)Convert iframe to the output pixel format and resolution. The returned frame is owned by this converter and is overwritten on the next call.
iframe The source AVFrame; must match iparams dimensions and pixel format.The converted output AVFrame.