AudioCodec
#include <icy/av/codec.h>
struct AudioCodecDefined in src/av/include/icy/av/codec.h:102
- Inherits
Codec
List of all members
| Name | Kind | Owner |
|---|---|---|
channels | variable | Declared here |
sampleFmt | variable | Declared here |
AudioCodec | function | Declared here |
AudioCodec | function | Declared here |
AudioCodec | function | Declared here |
AudioCodec | function | Declared here |
~AudioCodec | function | Declared here |
toString | function | Declared here |
print | function | Declared here |
name | variable | Inherited from Codec |
encoder | variable | Inherited from Codec |
sampleRate | variable | Inherited from Codec |
bitRate | variable | Inherited from Codec |
quality | variable | Inherited from Codec |
compliance | variable | Inherited from Codec |
enabled | variable | Inherited from Codec |
options | variable | Inherited from Codec |
Codec | function | Inherited from Codec |
Codec | function | Inherited from Codec |
Codec | function | Inherited from Codec |
~Codec | function | Inherited from Codec |
toString | function | Inherited from Codec |
specified | function | Inherited from Codec |
print | function | Inherited from Codec |
Inherited from Codec
| Kind | Name | Description |
|---|---|---|
variable | name | The display name for this codec. |
variable | encoder | The encoder name for FFmpeg. |
variable | sampleRate | The sampling rate or RTP clock rate. |
variable | bitRate | The bit rate to encode at. |
variable | quality | Optional quality value, variable range depending on codec. |
variable | compliance | FFmpeg strict_std_compliance level (default: FF_COMPLIANCE_EXPERIMENTAL). |
variable | enabled | Weather or not the codec is available for use. |
variable | 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. |
function | Codec | Construct a disabled codec with zeroed parameters. |
function | Codec | Construct a codec with a display name, sample rate, bit rate, and enabled flag. |
function | Codec | Construct a codec with an explicit FFmpeg encoder name. |
function | ~Codec virtual noexcept | Codec(const Codec& r);. |
function | toString virtual const | Return a compact string representation of this codec. |
function | specified const | Returns true when this codec explicitly names either an RTP/media codec or an FFmpeg encoder and is enabled for use. |
function | print virtual | Print a multi-line human-readable description to the given stream. |
Public Attributes
| Return | Name | Description |
|---|---|---|
int | channels | |
std::string | sampleFmt | One of: u8, s16, s32, flt, dbl, u8p, s16p, s32p, fltp, dblp. |
channels
int channelsDefined in src/av/include/icy/av/codec.h:104
sampleFmt
std::string sampleFmtDefined in src/av/include/icy/av/codec.h:105
One of: u8, s16, s32, flt, dbl, u8p, s16p, s32p, fltp, dblp.
Public Methods
| Return | Name | Description |
|---|---|---|
AudioCodec | Construct a disabled audio codec with zeroed parameters. | |
AudioCodec | Construct an anonymous audio codec from raw parameters. | |
AudioCodec | Construct a named audio codec. | |
AudioCodec | Construct a named audio codec with an explicit FFmpeg encoder name. | |
~AudioCodec virtual noexcept | ||
std::string | toString virtual const override | |
void | print virtual override | Print a multi-line human-readable description to the given stream. |
AudioCodec
AudioCodec()Defined in src/av/include/icy/av/codec.h:108
Construct a disabled audio codec with zeroed parameters.
AudioCodec
AudioCodec(int channels, int sampleRate, const std::string & sampleFmt = "", int bitRate = 0)Defined in src/av/include/icy/av/codec.h:115
Construct an anonymous audio codec from raw parameters.
Parameters
| Parameter | Type | Description |
|---|---|---|
channels | int | The number of audio channels. |
sampleRate | int | The sample rate in Hz. |
sampleFmt | const std::string & | The sample format string (e.g. "s16", "fltp"). |
bitRate | int | The target bit rate in bits per second. |
AudioCodec
AudioCodec(const std::string & name, int channels = 0, int sampleRate = 0, int bitRate = 0, const std::string & sampleFmt = "")Defined in src/av/include/icy/av/codec.h:126
Construct a named audio codec.
Parameters
| Parameter | Type | Description |
|---|---|---|
name | const std::string & | The codec display name. |
channels | int | The number of audio channels. |
sampleRate | int | The sample rate in Hz. |
bitRate | int | The target bit rate in bits per second. |
sampleFmt | const std::string & | The sample format string. |
AudioCodec
AudioCodec(const std::string & name, const std::string & encoder, int channels = 0, int sampleRate = 0, int bitRate = 0, const std::string & sampleFmt = "")Defined in src/av/include/icy/av/codec.h:139
Construct a named audio 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. "libopus"). |
channels | int | The number of audio channels. |
sampleRate | int | The sample rate in Hz. |
bitRate | int | The target bit rate in bits per second. |
sampleFmt | const std::string & | The sample format string. |
~AudioCodec
virtual noexcept
virtual ~AudioCodec() noexceptDefined in src/av/include/icy/av/codec.h:146
toString
virtual const override
virtual std::string toString() const overrideDefined in src/av/include/icy/av/codec.h:149
Returns
A string in the form "AudioCodec[name:encoder:sampleRate:bitRate:channels:sampleFmt:enabled]".
Reimplements
virtual override
virtual void print(std::ostream & ost) overrideDefined in src/av/include/icy/av/codec.h:153
Print a multi-line human-readable description to the given stream.
Reimplements
Parameters
| Parameter | Type | Description |
|---|---|---|
ost | std::ostream & | The output stream to write to. |
