AV module

VideoCodec

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

VideoCodec

#include <icy/av/codec.h>

Inherits: Codec

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

Public Attributes

ReturnNameDescription
intwidth
intheight
doublefps
std::stringpixelFmt

width

int width

height

int height

fps

double fps

pixelFmt

std::string pixelFmt

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#### Returns
voidprint virtualPrint a multi-line human-readable description to the given stream.

VideoCodec

VideoCodec()

Construct a disabled video codec with zeroed parameters.


VideoCodec

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

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, int height, double fps, int bitRate, int sampleRate, const std::string & pixelFmt)

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, int height, double fps, int bitRate, int sampleRate, const std::string & pixelFmt)

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)

toString

virtual const

virtual std::string toString() const

Returns

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


print

virtual

virtual void print(std::ostream & ost)

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

Parameters

  • ost The output stream to write to.