#include <icy/av/codec.h>Inherits:
Codec
Audio codec parameters including channels, sample rate, and sample format.
| Return | Name | Description |
|---|---|---|
int | channels | |
std::string | sampleFmt | One of: u8, s16, s32, flt, dbl, u8p, s16p, s32p, fltp, dblp. |
int channelsstd::string sampleFmtOne of: u8, s16, s32, flt, dbl, u8p, s16p, s32p, fltp, dblp.
| 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. | |
std::string | toString virtual const | #### Returns |
void | print virtual | Print a multi-line human-readable description to the given stream. |
AudioCodec()Construct a disabled audio codec with zeroed parameters.
AudioCodec(int channels, int sampleRate, const std::string & sampleFmt, int bitRate)Construct an anonymous audio codec from raw parameters.
channels The number of audio channels.
sampleRate The sample rate in Hz.
sampleFmt The sample format string (e.g. "s16", "fltp").
bitRate The target bit rate in bits per second.
AudioCodec(const std::string & name, int channels, int sampleRate, int bitRate, const std::string & sampleFmt)Construct a named audio codec.
name The codec display name.
channels The number of audio channels.
sampleRate The sample rate in Hz.
bitRate The target bit rate in bits per second.
sampleFmt The sample format string.
AudioCodec(const std::string & name, const std::string & encoder, int channels, int sampleRate, int bitRate, const std::string & sampleFmt)Construct a named audio codec with an explicit FFmpeg encoder name.
name The codec display name.
encoder The FFmpeg encoder name (e.g. "libopus").
channels The number of audio channels.
sampleRate The sample rate in Hz.
bitRate The target bit rate in bits per second.
sampleFmt The sample format string.
virtual const
virtual std::string toString() constA string in the form "AudioCodec[name:encoder:sampleRate:bitRate:channels:sampleFmt:enabled]".
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.