VideoCodec
VideoCodec
#include <icy/av/codec.h>Inherits:
Codec
Video codec parameters including resolution, frame rate, and pixel format.
Public Attributes
width
int widthheight
int heightfps
double fpspixelFmt
std::string pixelFmtPublic Methods
| Return | Name | Description |
|---|---|---|
VideoCodec | Construct a disabled video codec with zeroed parameters. | |
VideoCodec | Construct an anonymous video codec from raw parameters. | |
VideoCodec | Construct a named video codec. | |
VideoCodec | Construct a named video codec with an explicit FFmpeg encoder name. | |
VideoCodec | ||
std::string | toString virtual const | #### Returns |
void | print virtual | Print 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
widthThe frame width in pixels.heightThe frame height in pixels.fpsThe target frame rate in frames per second.pixelFmtThe pixel format string (e.g. "yuv420p").bitRateThe target bit rate in bits per second.sampleRateThe 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
nameThe codec display name.widthThe frame width in pixels.heightThe frame height in pixels.fpsThe target frame rate in frames per second.bitRateThe target bit rate in bits per second.sampleRateThe RTP clock rate in Hz.pixelFmtThe 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
nameThe codec display name.encoderThe FFmpeg encoder name (e.g. "libx264").widthThe frame width in pixels.heightThe frame height in pixels.fpsThe target frame rate in frames per second.bitRateThe target bit rate in bits per second.sampleRateThe RTP clock rate in Hz.pixelFmtThe pixel format string.
VideoCodec
VideoCodec(const VideoCodec & r)toString
virtual const
virtual std::string toString() constReturns
A string in the form "VideoCodec[name:encoder:width:height:fps:pixelFmt:enabled]".
virtual
virtual void print(std::ostream & ost)Print a multi-line human-readable description to the given stream.
Parameters
ostThe output stream to write to.
