Home
AV module

VideoCodec

Video codec parameters including resolution, frame rate, and pixel format.

VideoCodec

#include <icy/av/codec.h>
struct VideoCodec

Defined in src/av/include/icy/av/codec.h:169

Inherits: Codec

Video codec parameters including resolution, frame rate, and pixel format.

List of all members

NameKindOwner
widthvariableDeclared here
heightvariableDeclared here
fpsvariableDeclared here
pixelFmtvariableDeclared here
VideoCodecfunctionDeclared here
VideoCodecfunctionDeclared here
VideoCodecfunctionDeclared here
VideoCodecfunctionDeclared here
VideoCodecfunctionDeclared here
operator=functionDeclared here
~VideoCodecfunctionDeclared here
toStringfunctionDeclared here
printfunctionDeclared here
namevariableInherited from Codec
encodervariableInherited from Codec
sampleRatevariableInherited from Codec
bitRatevariableInherited from Codec
qualityvariableInherited from Codec
compliancevariableInherited from Codec
enabledvariableInherited from Codec
optionsvariableInherited from Codec
CodecfunctionInherited from Codec
CodecfunctionInherited from Codec
CodecfunctionInherited from Codec
~CodecfunctionInherited from Codec
toStringfunctionInherited from Codec
specifiedfunctionInherited from Codec
printfunctionInherited from Codec

Inherited from Codec

KindNameDescription
variablenameThe display name for this codec.
variableencoderThe encoder name for FFmpeg.
variablesampleRateThe sampling rate or RTP clock rate.
variablebitRateThe bit rate to encode at.
variablequalityOptional quality value, variable range depending on codec.
variablecomplianceFFmpeg strict_std_compliance level (default: FF_COMPLIANCE_EXPERIMENTAL).
variableenabledWeather or not the codec is available for use.
variableoptionsArbitrary encoder options passed to FFmpeg via av_opt_set(). Keys are FFmpeg option names (e.g. "preset", "tune", "profile"). Applied after codec-specific defaults, so they override everything.
functionCodecConstruct a disabled codec with zeroed parameters.
functionCodecConstruct a codec with a display name, sample rate, bit rate, and enabled flag.
functionCodecConstruct a codec with an explicit FFmpeg encoder name.
function~Codec virtual noexceptCodec(const Codec& r);.
functiontoString virtual constReturn a compact string representation of this codec.
functionspecified constReturns true when this codec explicitly names either an RTP/media codec or an FFmpeg encoder and is enabled for use.
functionprint virtualPrint a multi-line human-readable description to the given stream.

Public Attributes

ReturnNameDescription
intwidth
intheight
doublefps
std::stringpixelFmt

width

int width

Defined in src/av/include/icy/av/codec.h:171


height

int height

Defined in src/av/include/icy/av/codec.h:172


fps

double fps

Defined in src/av/include/icy/av/codec.h:173


pixelFmt

std::string pixelFmt

Defined in src/av/include/icy/av/codec.h:174

Public Methods

ReturnNameDescription
VideoCodecConstruct a disabled video codec with zeroed parameters.
VideoCodecConstruct an anonymous video codec from raw parameters.
VideoCodecConstruct a named video codec.
VideoCodecConstruct a named video codec with an explicit FFmpeg encoder name.
VideoCodec
std::stringtoString virtual const override
voidprint virtual overridePrint a multi-line human-readable description to the given stream.

VideoCodec

VideoCodec()

Defined in src/av/include/icy/av/codec.h:177

Construct a disabled video codec with zeroed parameters.


VideoCodec

VideoCodec(int width, int height, double fps = 0.0, const std::string & pixelFmt = DEFAULT_VIDEO_PIXEL_FMT, int bitRate = 0, int sampleRate = 0)

Defined in src/av/include/icy/av/codec.h:186

Construct an anonymous video codec from raw parameters.

Parameters

  • width The frame width in pixels.

  • height The frame height in pixels.

  • fps The target frame rate in frames per second.

  • pixelFmt The pixel format string (e.g. "yuv420p").

  • bitRate The target bit rate in bits per second.

  • sampleRate The RTP clock rate in Hz.


VideoCodec

VideoCodec(const std::string & name, int width = 0, int height = 0, double fps = 0.0, int bitRate = 0, int sampleRate = 0, const std::string & pixelFmt = DEFAULT_VIDEO_PIXEL_FMT)

Defined in src/av/include/icy/av/codec.h:199

Construct a named video codec.

Parameters

  • name The codec display name.

  • width The frame width in pixels.

  • height The frame height in pixels.

  • fps The target frame rate in frames per second.

  • bitRate The target bit rate in bits per second.

  • sampleRate The RTP clock rate in Hz.

  • pixelFmt The pixel format string.


VideoCodec

VideoCodec(const std::string & name, const std::string & encoder, int width = 0, int height = 0, double fps = 0.0, int bitRate = 0, int sampleRate = 0, const std::string & pixelFmt = DEFAULT_VIDEO_PIXEL_FMT)

Defined in src/av/include/icy/av/codec.h:213

Construct a named video codec with an explicit FFmpeg encoder name.

Parameters

  • name The codec display name.

  • encoder The FFmpeg encoder name (e.g. "libx264").

  • width The frame width in pixels.

  • height The frame height in pixels.

  • fps The target frame rate in frames per second.

  • bitRate The target bit rate in bits per second.

  • sampleRate The RTP clock rate in Hz.

  • pixelFmt The pixel format string.


VideoCodec

VideoCodec(const VideoCodec & r)

Defined in src/av/include/icy/av/codec.h:218


toString

virtual const override

virtual std::string toString() const override

Defined in src/av/include/icy/av/codec.h:223

Returns

A string in the form "VideoCodec[name:encoder:width:height:fps:pixelFmt:enabled]".

Reimplements

print

virtual override

virtual void print(std::ostream & ost) override

Defined in src/av/include/icy/av/codec.h:227

Print a multi-line human-readable description to the given stream.

Parameters

  • ost The output stream to write to.
Reimplements