kwave
18.07.70
|
#include <AsciiDecoder.h>
Public Member Functions | |
AsciiDecoder () | |
virtual | ~AsciiDecoder () Q_DECL_OVERRIDE |
virtual Kwave::Decoder * | instance () Q_DECL_OVERRIDE |
virtual bool | open (QWidget *widget, QIODevice &source) Q_DECL_OVERRIDE |
virtual bool | decode (QWidget *widget, Kwave::MultiWriter &dst) Q_DECL_OVERRIDE |
virtual void | close () Q_DECL_OVERRIDE |
![]() | |
Decoder () | |
virtual | ~Decoder () |
virtual Kwave::MetaDataList & | metaData () |
![]() | |
CodecBase () | |
virtual | ~CodecBase () |
virtual bool | supports (const QMimeType &mimetype) |
virtual bool | supports (const QString &mimetype_name) |
virtual QStringList | extensions (const QString &mimetype_name) const |
virtual const QList< CodecBase::MimeType > | mimeTypes () |
virtual const QList< Kwave::Compression::Type > | compressionTypes () |
virtual void | addMimeType (const char *name, const QString &description, const char *patterns) |
virtual void | addCompression (Kwave::Compression::Type compression) |
virtual QString | mimeTypeOf (const QUrl &url) |
Private Member Functions | |
bool | readNextLine () |
Private Attributes | |
QTextStream | m_source |
Kwave::MultiWriter * | m_dest |
QQueue< QString > | m_queue_input |
quint64 | m_line_nr |
Additional Inherited Members | |
![]() | |
void | sourceProcessed (quint64 pos) |
![]() | |
Kwave::MetaDataList | m_meta_data |
Definition at line 35 of file AsciiDecoder.h.
Kwave::AsciiDecoder::AsciiDecoder | ( | ) |
Constructor
Definition at line 44 of file AsciiDecoder.cpp.
References LOAD_MIME_TYPES, m_source, and REGISTER_COMPRESSION_TYPES.
|
virtual |
Destructor
Definition at line 57 of file AsciiDecoder.cpp.
References close(), and m_source.
|
virtual |
Closes the source.
Implements Kwave::Decoder.
Definition at line 289 of file AsciiDecoder.cpp.
References m_source.
Referenced by ~AsciiDecoder().
|
virtual |
Decodes a stream of bytes into a MultiWriter
widget | a widget that can be used for displaying message boxes or dialogs |
dst | MultiWriter that receives the audio data |
Implements Kwave::Decoder.
Definition at line 235 of file AsciiDecoder.cpp.
References Kwave::MultiWriter::isCanceled(), Kwave::MultiWriter::last(), m_dest, m_queue_input, m_source, Kwave::Decoder::metaData(), readNextLine(), Kwave::MetaDataList::replace(), Kwave::FileInfo::setLength(), and Kwave::FileInfo::tracks().
|
virtual |
Returns a new instance of the decoder
Implements Kwave::Decoder.
Definition at line 63 of file AsciiDecoder.cpp.
|
virtual |
Opens the source and decodes the header information.
widget | a widget that can be used for displaying message boxes or dialogs |
source | file or other source with a stream of bytes |
Implements Kwave::Decoder.
Definition at line 69 of file AsciiDecoder.cpp.
References _, Kwave::MetaDataList::add(), Kwave::FileInfo::allKnownProperties(), Kwave::FileInfo::contains(), DBG, Kwave::FileInfo::get(), Kwave::INF_BITS_PER_SAMPLE, Kwave::INF_CHANNELS, Kwave::INF_SAMPLE_RATE, Kwave::INF_TRACK, Kwave::INF_TRACKS, m_line_nr, m_queue_input, m_source, MAX_LINE_LEN, Kwave::Decoder::metaData(), Kwave::FileInfo::name(), name, Kwave::MetaDataList::replace(), Kwave::FileInfo::set(), Kwave::LabelList::toMetaDataList(), Kwave::FileInfo::tracks(), and Kwave::Parser::unescape().
|
private |
try to read a complete line from the source, skip empty lines and comments
Definition at line 213 of file AsciiDecoder.cpp.
References m_line_nr, m_queue_input, m_source, and MAX_LINE_LEN.
Referenced by decode().
|
private |
|
private |
last read line number, starting with 1
Definition at line 93 of file AsciiDecoder.h.
Referenced by open(), and readNextLine().
|
private |
queue for buffering strings read from the file
Definition at line 90 of file AsciiDecoder.h.
Referenced by decode(), open(), and readNextLine().
|
private |
source of the audio data
Definition at line 84 of file AsciiDecoder.h.
Referenced by AsciiDecoder(), close(), decode(), open(), readNextLine(), and ~AsciiDecoder().