#include <icy/av/codec.h>Subclassed by:
AudioCodec,VideoCodec
Codec for encoding/decoding media.
| Return | Name | Description |
|---|---|---|
std::string | name | The display name for this codec. |
std::string | encoder | The encoder name for FFmpeg. |
int | sampleRate | The sampling rate or RTP clock rate. |
int | bitRate | The bit rate to encode at. |
int | quality | Optional quality value, variable range depending on codec. |
int | compliance | FFmpeg strict_std_compliance level (default: FF_COMPLIANCE_EXPERIMENTAL). |
bool | enabled | Weather or not the codec is available for use. |
std::map< std::string, std::string > | options | Arbitrary 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. |
std::string nameThe display name for this codec.
std::string encoderThe encoder name for FFmpeg.
int sampleRateThe sampling rate or RTP clock rate.
int bitRateThe bit rate to encode at.
int qualityOptional quality value, variable range depending on codec.
int complianceFFmpeg strict_std_compliance level (default: FF_COMPLIANCE_EXPERIMENTAL).
bool enabledWeather or not the codec is available for use.
std::map< std::string, std::string > optionsArbitrary 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.
| Return | Name | Description |
|---|---|---|
Codec | Construct a disabled codec with zeroed parameters. | |
Codec | Construct a codec with a display name, sample rate, bit rate, and enabled flag. | |
Codec | Construct a codec with an explicit FFmpeg encoder name. | |
~Codec virtual | Codec(const Codec& r);. | |
std::string | toString virtual const | Return a compact string representation of this codec. |
bool | specified const | Returns true when this codec explicitly names either an RTP/media codec or an FFmpeg encoder and is enabled for use. |
void | print virtual | Print a multi-line human-readable description to the given stream. |
Codec()Construct a disabled codec with zeroed parameters.
Codec(const std::string & name, int sampleRate, int bitRate, bool enabled)Construct a codec with a display name, sample rate, bit rate, and enabled flag.
name The codec display name.
sampleRate The sampling rate or RTP clock rate in Hz.
bitRate The target bit rate in bits per second.
enabled Whether the codec is available for use.
Codec(const std::string & name, const std::string & encoder, int sampleRate, int bitRate, bool enabled)Construct a codec with an explicit FFmpeg encoder name.
name The codec display name.
encoder The FFmpeg encoder name (e.g. "libx264").
sampleRate The sampling rate or RTP clock rate in Hz.
bitRate The target bit rate in bits per second.
enabled Whether the codec is available for use.
virtual
virtual ~Codec() noexceptCodec(const Codec& r);.
virtual const
virtual std::string toString() constReturn a compact string representation of this codec.
A string in the form "Codec[name:encoder:sampleRate:enabled]".
const
bool specified() constReturns true when this codec explicitly names either an RTP/media codec or an FFmpeg encoder and is enabled for use.
virtual
virtual void print(std::ostream & ost)Print a multi-line human-readable description to the given stream.
ost The output stream to write to.