kwave
18.07.70
|
#include <Compression.h>
Classes | |
class | Info |
Public Types | |
enum | Type { INVALID = -1, NONE = 0, G722 = 501, G711_ULAW = 502, G711_ALAW = 503, APPLE_ACE2 = 504, APPLE_ACE8 = 505, APPLE_MAC3 = 506, APPLE_MAC6 = 507, G726 = 517, G728 = 518, DVI_AUDIO = 519, GSM = 520, FS1016 = 521, DV = 522, MS_ADPCM = 523, FLAC = 530, ALAC = 540, MPEG_LAYER_I = 600, MPEG_LAYER_II, MPEG_LAYER_III, OGG_VORBIS, OGG_OPUS } |
Public Member Functions | |
Compression () | |
Compression (const Type value) | |
Compression (const Kwave::Compression &other) | |
virtual | ~Compression () |
void | assign (Type t) |
QString | name () const |
QString | preferredMimeType () const |
QList< Kwave::SampleFormat > | sampleFormats () const |
bool | hasABR () const |
bool | hasVBR () const |
int | toInt () const |
Static Public Member Functions | |
static Kwave::Compression::Type | fromInt (int i) |
static int | toAudiofile (Kwave::Compression::Type compression) |
static Kwave::Compression::Type | fromAudiofile (int af_compression) |
Static Private Member Functions | |
static void | fillMap () |
Private Attributes | |
Type | m_type |
Static Private Attributes | |
static QMap< int, Kwave::Compression::Info > | m_map |
Definition at line 34 of file Compression.h.
supported compression types
Definition at line 43 of file Compression.h.
Kwave::Compression::Compression | ( | ) |
default constructor
Definition at line 31 of file Compression.cpp.
References fillMap().
|
explicit |
Constructor, from enum
value | the enum of an already known compression type |
Definition at line 38 of file Compression.cpp.
References fillMap().
|
explicit |
Copy constructor
other | another compression to copy from |
|
inlinevirtual |
|
inline |
assignment operator from sample_format_t
Definition at line 90 of file Compression.h.
References name.
|
staticprivate |
fills the map with known compression types (if empty)
Definition at line 86 of file Compression.cpp.
References _, APPLE_ACE2, APPLE_ACE8, APPLE_MAC3, APPLE_MAC6, Kwave::SampleFormat::Double, DV, DVI_AUDIO, FLAC, Kwave::SampleFormat::Float, FS1016, G711_ALAW, G711_ULAW, G722, G726, GSM, m_map, MPEG_LAYER_I, MPEG_LAYER_II, MPEG_LAYER_III, MS_ADPCM, NONE, OGG_OPUS, OGG_VORBIS, Kwave::SampleFormat::Signed, and Kwave::SampleFormat::Unsigned.
Referenced by Compression(), fromAudiofile(), fromInt(), and toAudiofile().
|
static |
conversion from a numeric value from libaudiofile
Definition at line 279 of file Compression.cpp.
References ALAC, APPLE_ACE2, APPLE_ACE8, APPLE_MAC3, APPLE_MAC6, DV, DVI_AUDIO, fillMap(), FLAC, FS1016, G711_ALAW, G711_ULAW, G722, G726, G728, GSM, MS_ADPCM, and NONE.
Referenced by Kwave::audiofileCompressionTypes(), Kwave::AudiofileDecoder::open(), and Kwave::WavDecoder::open().
|
static |
conversion from int (e.g. for use in plugin parameters)
Definition at line 78 of file Compression.cpp.
References fillMap(), m_map, and NONE.
Referenced by Kwave::FileInfoDialog::accept(), Kwave::FileInfoDialog::compressionChanged(), Kwave::RecordDialog::compressionChanged(), Kwave::OggEncoder::encode(), Kwave::WavEncoder::encode(), Kwave::RecordParams::fromList(), Kwave::RecordDialog::setCompression(), and Kwave::FileInfoDialog::setupFileInfoTab().
bool Kwave::Compression::hasABR | ( | ) | const |
Returns whether average bitrate mode is supported
Definition at line 66 of file Compression.cpp.
Referenced by Kwave::FileInfoDialog::accept().
bool Kwave::Compression::hasVBR | ( | ) | const |
Returns whether variable bitrate mode is supported
Definition at line 72 of file Compression.cpp.
Referenced by Kwave::FileInfoDialog::accept().
QString Kwave::Compression::name | ( | ) | const |
Returns the descriptive name of the compression, already localized
Definition at line 45 of file Compression.cpp.
References m_map, m_type, and UTF8.
Referenced by Kwave::RecordPulseAudio::detectSupportedFormats(), Kwave::RecordDialog::setCompression(), Kwave::RecordDialog::setSupportedCompressions(), Kwave::FileInfoDialog::setupFileInfoTab(), and Kwave::FileInfoDialog::updateAvailableCompressions().
QString Kwave::Compression::preferredMimeType | ( | ) | const |
Returns the preferred mime type or an empty string
Definition at line 52 of file Compression.cpp.
References m_map, m_type, and UTF8.
Referenced by Kwave::FileInfoDialog::setupFileInfoTab().
QList< Kwave::SampleFormat > Kwave::Compression::sampleFormats | ( | ) | const |
Returns a list of supported sample formats
Definition at line 59 of file Compression.cpp.
|
static |
conversion to a numeric value from libaudiofile
Definition at line 208 of file Compression.cpp.
References ALAC, APPLE_ACE2, APPLE_ACE8, APPLE_MAC3, APPLE_MAC6, DV, DVI_AUDIO, fillMap(), FLAC, FS1016, G711_ALAW, G711_ULAW, G722, G726, G728, GSM, MS_ADPCM, and NONE.
Referenced by Kwave::WavEncoder::encode().
|
inline |
conversion to int (e.g. for use in plugin parameters)
Definition at line 122 of file Compression.h.
Referenced by Kwave::AudiofileDecoder::open(), Kwave::WavDecoder::open(), Kwave::RecordDialog::setSupportedCompressions(), Kwave::FileInfoDialog::setupFileInfoTab(), and Kwave::FileInfoDialog::updateAvailableCompressions().
|
staticprivate |
map with all known compression types
Definition at line 196 of file Compression.h.
Referenced by fillMap(), fromInt(), hasABR(), hasVBR(), name(), preferredMimeType(), and sampleFormats().
|
private |
internal storage of the compression type, see Type
Definition at line 141 of file Compression.h.
Referenced by hasABR(), hasVBR(), name(), preferredMimeType(), and sampleFormats().