Codec
#include <icy/av/codec.h>
struct CodecDefined in src/av/include/icy/av/codec.h:29
- Subclassed by
AudioCodec,VideoCodec
Public Attributes
| 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. |
name
std::string nameDefined in src/av/include/icy/av/codec.h:34
The display name for this codec.
encoder
std::string encoderDefined in src/av/include/icy/av/codec.h:35
The encoder name for FFmpeg.
sampleRate
int sampleRateDefined in src/av/include/icy/av/codec.h:36
The sampling rate or RTP clock rate.
bitRate
int bitRateDefined in src/av/include/icy/av/codec.h:37
The bit rate to encode at.
quality
int qualityDefined in src/av/include/icy/av/codec.h:38
Optional quality value, variable range depending on codec.
compliance
int complianceDefined in src/av/include/icy/av/codec.h:39
FFmpeg strict_std_compliance level (default: FF_COMPLIANCE_EXPERIMENTAL).
enabled
bool enabledDefined in src/av/include/icy/av/codec.h:40
Weather or not the codec is available for use.
options
std::map< std::string, std::string > optionsDefined in src/av/include/icy/av/codec.h:45
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.
Public Methods
| 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 noexcept | 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
Codec()Defined in src/av/include/icy/av/codec.h:51
Construct a disabled codec with zeroed parameters.
Codec
Codec(const std::string & name, int sampleRate = 0, int bitRate = 0, bool enabled = true)Defined in src/av/include/icy/av/codec.h:58
Construct a codec with a display name, sample rate, bit rate, and enabled flag.
Parameters
| Parameter | Type | Description |
|---|---|---|
name | const std::string & | The codec display name. |
sampleRate | int | The sampling rate or RTP clock rate in Hz. |
bitRate | int | The target bit rate in bits per second. |
enabled | bool | Whether the codec is available for use. |
Codec
Codec(const std::string & name, const std::string & encoder, int sampleRate = 0, int bitRate = 0, bool enabled = true)Defined in src/av/include/icy/av/codec.h:67
Construct a codec with an explicit FFmpeg encoder name.
Parameters
| Parameter | Type | Description |
|---|---|---|
name | const std::string & | The codec display name. |
encoder | const std::string & | The FFmpeg encoder name (e.g. "libx264"). |
sampleRate | int | The sampling rate or RTP clock rate in Hz. |
bitRate | int | The target bit rate in bits per second. |
enabled | bool | Whether the codec is available for use. |
~Codec
virtual noexcept
virtual ~Codec() noexceptDefined in src/av/include/icy/av/codec.h:70
Codec(const Codec& r);.
toString
virtual const
virtual std::string toString() constDefined in src/av/include/icy/av/codec.h:77
Return a compact string representation of this codec.
Returns
A string in the form "Codec[name:encoder:sampleRate:enabled]".
Reimplemented by
specified
const
bool specified() constDefined in src/av/include/icy/av/codec.h:81
Returns 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)Defined in src/av/include/icy/av/codec.h:85
Print a multi-line human-readable description to the given stream.
Reimplemented by
Parameters
| Parameter | Type | Description |
|---|---|---|
ost | std::ostream & | The output stream to write to. |
