VideoConverter
#include <icy/av/videoconverter.h>
struct VideoConverterDefined in src/av/include/icy/av/videoconverter.h:32
Public Attributes
| 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. |
ctx
SwsContext * ctxDefined in src/av/include/icy/av/videoconverter.h:56
libswscale conversion context.
oframe
AVFrame * oframeDefined in src/av/include/icy/av/videoconverter.h:57
Reusable output frame allocated by create().
iparams
VideoCodec iparamsType: VideoCodec
Defined in src/av/include/icy/av/videoconverter.h:58
Expected input video parameters.
oparams
VideoCodec oparamsType: VideoCodec
Defined in src/av/include/icy/av/videoconverter.h:59
Target output video parameters.
Public Methods
| Return | Name | Description |
|---|---|---|
VideoConverter | ||
~VideoConverter virtual noexcept | ||
VideoConverter | Deleted constructor. | |
VideoConverter & | operator= | Deleted assignment operator. |
VideoConverter | Deleted constructor. | |
VideoConverter & | operator= | Deleted assignment operator. |
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()Defined in src/av/include/icy/av/videoconverter.h:34
~VideoConverter
virtual noexcept
virtual ~VideoConverter() noexceptDefined in src/av/include/icy/av/videoconverter.h:35
VideoConverter
VideoConverter(const VideoConverter &) = deleteDefined in src/av/include/icy/av/videoconverter.h:37
Deleted constructor.
operator=
VideoConverter & operator=(const VideoConverter &) = deleteDefined in src/av/include/icy/av/videoconverter.h:38
Deleted assignment operator.
VideoConverter
VideoConverter(VideoConverter &&) = deleteDefined in src/av/include/icy/av/videoconverter.h:39
Deleted constructor.
operator=
VideoConverter & operator=(VideoConverter &&) = deleteDefined in src/av/include/icy/av/videoconverter.h:40
Deleted assignment operator.
create
virtual
virtual void create()Defined in src/av/include/icy/av/videoconverter.h:45
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.
close
virtual
virtual void close()Defined in src/av/include/icy/av/videoconverter.h:48
Free the libswscale context and the output frame.
convert
virtual
virtual AVFrame * convert(AVFrame * iframe)Defined in src/av/include/icy/av/videoconverter.h:54
Convert iframe to the output pixel format and resolution. The returned frame is owned by this converter and is overwritten on the next call.
Returns
The converted output AVFrame.
Parameters
| Parameter | Type | Description |
|---|---|---|
iframe | AVFrame * | The source AVFrame; must match iparams dimensions and pixel format. |
