#include <decoder.h>

Definition at line 52 of file mythplugins/mythmusic/mythmusic/decoder.h.
Public Member Functions | |
| virtual | ~Decoder () |
| virtual bool | initialize ()=0 |
| virtual void | seek (double)=0 |
| virtual void | stop ()=0 |
| DecoderFactory * | factory () const |
| QIODevice * | input () |
| AudioOutput * | output () |
| void | setInput (QIODevice *) |
| void | setOutput (AudioOutput *) |
| void | setFilename (const QString &newName) |
| virtual void | lock (void) |
| virtual void | unlock (void) |
| virtual bool | tryLock (void) |
| virtual bool | locked (void) |
| QWaitCondition * | cond () |
| void | setBlockSize (unsigned int sz) |
| unsigned int | blockSize () const |
| QString | getFilename (void) const |
| virtual Metadata * | readMetadata (void) |
Read the metadata from filename directly. | |
| virtual Metadata * | getMetadata (void) |
Get the metadata for filename. | |
| virtual MetaIO * | doCreateTagger (void) |
Create a MetaIO object for the format. | |
| virtual void | commitMetadata (Metadata *mdata) |
Static Public Member Functions | |
| static QStringList | all () |
| static bool | supports (const QString &) |
| static void | registerFactory (DecoderFactory *) |
| static Decoder * | create (const QString &, QIODevice *, AudioOutput *, bool=FALSE) |
| static void | SetLocationFormatUseTags (void) |
Protected Member Functions | |
| Decoder (DecoderFactory *, QIODevice *, AudioOutput *) | |
| QMutex * | getMutex (void) |
| void | error (const QString &) |
Protected Attributes | |
| QString | filename |
Static Protected Attributes | |
| static QString | filename_format |
| static int | ignore_id3 = 0 |
| static QString | musiclocation = "" |
Private Attributes | |
| DecoderFactory * | fctry |
| QIODevice * | in |
| AudioOutput * | out |
| QMutex | mtx |
| QWaitCondition | cnd |
| int | blksize |
| Decoder::~Decoder | ( | ) | [virtual] |
Definition at line 38 of file decoder.cpp.
| Decoder::Decoder | ( | DecoderFactory * | d, | |
| QIODevice * | i, | |||
| AudioOutput * | o | |||
| ) | [protected] |
Definition at line 33 of file decoder.cpp.
| virtual bool Decoder::initialize | ( | ) | [pure virtual] |
Implemented in aacDecoder, avfDecoder, CdDecoder, FlacDecoder, MadDecoder, and VorbisDecoder.
Referenced by MusicPlayer::play().
| virtual void Decoder::seek | ( | double | ) | [pure virtual] |
Implemented in aacDecoder, avfDecoder, CdDecoder, FlacDecoder, MadDecoder, and VorbisDecoder.
Referenced by PlaybackBoxMusic::seek(), MusicPlayer::seek(), and MiniPlayer::seek().
| virtual void Decoder::stop | ( | ) | [pure virtual] |
Implemented in aacDecoder, avfDecoder, CdDecoder, FlacDecoder, MadDecoder, and VorbisDecoder.
Referenced by MusicPlayer::stopDecoder().
| DecoderFactory* Decoder::factory | ( | ) | const [inline] |
Definition at line 61 of file mythplugins/mythmusic/mythmusic/decoder.h.
Referenced by MusicPlayer::play().
| QIODevice* Decoder::input | ( | ) | [inline] |
Definition at line 63 of file mythplugins/mythmusic/mythmusic/decoder.h.
Referenced by aacDecoder::aacRead(), aacDecoder::aacSeek(), MadDecoder::calcLength(), MadDecoder::deinit(), FlacDecoder::deinit(), MadDecoder::findHeader(), flaceof(), flaclength(), flacread(), flacseek(), flactell(), VorbisDecoder::initialize(), MadDecoder::initialize(), FlacDecoder::initialize(), avfDecoder::initialize(), aacDecoder::initialize(), oggclose(), oggread(), oggseek(), oggtell(), and MadDecoder::run().
| AudioOutput* Decoder::output | ( | ) | [inline] |
Definition at line 64 of file mythplugins/mythmusic/mythmusic/decoder.h.
Referenced by VorbisDecoder::flush(), MadDecoder::flush(), FlacDecoder::flush(), avfDecoder::flush(), aacDecoder::flush(), VorbisDecoder::initialize(), MadDecoder::initialize(), avfDecoder::initialize(), aacDecoder::initializeMP4(), MadDecoder::madOutput(), VorbisDecoder::run(), MadDecoder::run(), FlacDecoder::run(), avfDecoder::run(), aacDecoder::run(), and FlacDecoder::setFlacMetadata().
| void Decoder::setInput | ( | QIODevice * | i | ) |
Definition at line 46 of file decoder.cpp.
Referenced by VorbisDecoderFactory::create(), MadDecoderFactory::create(), FlacDecoderFactory::create(), CdDecoderFactory::create(), avfDecoderFactory::create(), aacDecoderFactory::create(), VorbisDecoder::deinit(), FlacDecoder::deinit(), avfDecoder::deinit(), aacDecoder::deinit(), and MusicPlayer::play().
| void Decoder::setOutput | ( | AudioOutput * | o | ) |
Definition at line 53 of file decoder.cpp.
Referenced by VorbisDecoderFactory::create(), MadDecoderFactory::create(), FlacDecoderFactory::create(), CdDecoderFactory::create(), avfDecoderFactory::create(), aacDecoderFactory::create(), VorbisDecoder::deinit(), FlacDecoder::deinit(), avfDecoder::deinit(), aacDecoder::deinit(), and MusicPlayer::play().
| void Decoder::setFilename | ( | const QString & | newName | ) | [inline] |
Definition at line 67 of file mythplugins/mythmusic/mythmusic/decoder.h.
Referenced by VorbisDecoderFactory::create(), MadDecoderFactory::create(), FlacDecoderFactory::create(), CdDecoderFactory::create(), and MusicPlayer::play().
| virtual void Decoder::lock | ( | void | ) | [inline, virtual] |
Definition at line 69 of file mythplugins/mythmusic/mythmusic/decoder.h.
Referenced by VorbisDecoder::flush(), MadDecoder::flush(), FlacDecoder::flush(), avfDecoder::flush(), aacDecoder::flush(), MusicPlayer::pause(), VorbisDecoder::run(), MadDecoder::run(), FlacDecoder::run(), avfDecoder::run(), aacDecoder::run(), PlaybackBoxMusic::seek(), MusicPlayer::seek(), MiniPlayer::seek(), CdDecoder::setCDSpeed(), setInput(), setOutput(), and MusicPlayer::stopDecoder().
| virtual void Decoder::unlock | ( | void | ) | [inline, virtual] |
Definition at line 70 of file mythplugins/mythmusic/mythmusic/decoder.h.
Referenced by VorbisDecoder::flush(), MadDecoder::flush(), FlacDecoder::flush(), avfDecoder::flush(), aacDecoder::flush(), MusicPlayer::pause(), VorbisDecoder::run(), MadDecoder::run(), FlacDecoder::run(), avfDecoder::run(), aacDecoder::run(), PlaybackBoxMusic::seek(), MusicPlayer::seek(), MiniPlayer::seek(), setInput(), setOutput(), and MusicPlayer::stopDecoder().
| virtual bool Decoder::tryLock | ( | void | ) | [inline, virtual] |
Definition at line 71 of file mythplugins/mythmusic/mythmusic/decoder.h.
| virtual bool Decoder::locked | ( | void | ) | [inline, virtual] |
Definition at line 72 of file mythplugins/mythmusic/mythmusic/decoder.h.
| QWaitCondition* Decoder::cond | ( | ) | [inline] |
Definition at line 74 of file mythplugins/mythmusic/mythmusic/decoder.h.
Referenced by MusicPlayer::pause(), and MusicPlayer::stopDecoder().
| void Decoder::setBlockSize | ( | unsigned int | sz | ) | [inline] |
Definition at line 76 of file mythplugins/mythmusic/mythmusic/decoder.h.
Referenced by MusicPlayer::play().
| unsigned int Decoder::blockSize | ( | ) | const [inline] |
Definition at line 77 of file mythplugins/mythmusic/mythmusic/decoder.h.
Referenced by VorbisDecoder::initialize(), MadDecoder::initialize(), FlacDecoder::initialize(), avfDecoder::initialize(), and aacDecoder::initialize().
| QString Decoder::getFilename | ( | void | ) | const [inline] |
Definition at line 78 of file mythplugins/mythmusic/mythmusic/decoder.h.
Referenced by AlbumArt::AlbumArt().
| Metadata * Decoder::readMetadata | ( | void | ) | [virtual] |
Read the metadata from filename directly.
Creates a MetaIO object using Decoder::doCreateTagger and uses the MetaIO object to read the metadata.
Metadata owned by the caller Definition at line 74 of file decoder.cpp.
Referenced by FileScanner::AddFileToDB(), getMetadata(), and FileScanner::UpdateFileInDB().
| Metadata * Decoder::getMetadata | ( | void | ) | [virtual] |
Get the metadata for filename.
First tries to read the metadata from the database. If there is no database entry, it'll call Decoder::readMetadata.
Metadata owned by the caller Reimplemented in CdDecoder.
Definition at line 108 of file decoder.cpp.
Referenced by ImportMusicDialog::scanDirectory(), and FileScanner::UpdateFileInDB().
| MetaIO * Decoder::doCreateTagger | ( | void | ) | [virtual] |
Create a MetaIO object for the format.
This method should be overwritten by subclasses to return an instance of the appropriate MetaIO subtype. It is used by Decoder::getMetadata, Decoder::readMetadata and Decoder::commitMetadata.
The default implementation returns a NULL pointer, which essentially means, that if the decoder does not overrider this method or all of the users (see previous paragraph), files that the decoder supports cannot be indexed using metadata in the file.
e.g. the mp3 decoder (MadDecoder) implements this, whereas the audio CD decoder (CdDecoder) does not.
MetaIO owned by the caller Reimplemented in aacDecoder, avfDecoder, FlacDecoder, MadDecoder, and VorbisDecoder.
Definition at line 142 of file decoder.cpp.
Referenced by commitMetadata(), and readMetadata().
| void Decoder::commitMetadata | ( | Metadata * | mdata | ) | [virtual] |
Reimplemented in CdDecoder.
Definition at line 156 of file decoder.cpp.
Referenced by ImportMusicDialog::addPressed(), EditMetadataDialog::saveAll(), and EditMetadataDialog::saveToFile().
| QStringList Decoder::all | ( | ) | [static] |
Definition at line 204 of file decoder.cpp.
| bool Decoder::supports | ( | const QString & | source | ) | [static] |
Definition at line 219 of file decoder.cpp.
| void Decoder::registerFactory | ( | DecoderFactory * | fact | ) | [static] |
| Decoder * Decoder::create | ( | const QString & | source, | |
| QIODevice * | input, | |||
| AudioOutput * | output, | |||
| bool | deletable = FALSE | |||
| ) | [static] |
Definition at line 240 of file decoder.cpp.
Referenced by FileScanner::AddFileToDB(), ImportMusicDialog::addPressed(), MusicPlayer::play(), EditMetadataDialog::saveAll(), EditMetadataDialog::saveToFile(), ImportMusicDialog::scanDirectory(), and FileScanner::UpdateFileInDB().
| void Decoder::SetLocationFormatUseTags | ( | void | ) | [static] |
Definition at line 171 of file decoder.cpp.
Referenced by mythplugin_config(), mythplugin_init(), and preMusic().
| QMutex* Decoder::getMutex | ( | void | ) | [inline, protected] |
Definition at line 95 of file mythplugins/mythmusic/mythmusic/decoder.h.
Referenced by CdDecoder::setCDSpeed().
| void Decoder::error | ( | const QString & | e | ) | [protected] |
Definition at line 60 of file decoder.cpp.
Referenced by aacDecoder::aacRead(), aacDecoder::aacSeek(), VorbisDecoder::initialize(), MadDecoder::initialize(), FlacDecoder::initialize(), aacDecoder::initialize(), aacDecoder::initializeMP4(), VorbisDecoder::run(), and aacDecoder::run().
QString Decoder::filename [protected] |
Definition at line 98 of file mythplugins/mythmusic/mythmusic/decoder.h.
Referenced by aacDecoder::aacDecoder(), avfDecoder::avfDecoder(), CdDecoder::CdDecoder(), fileForTrack(), FlacDecoder::FlacDecoder(), getMetadata(), avfDecoder::initialize(), MadDecoder::MadDecoder(), readMetadata(), and VorbisDecoder::VorbisDecoder().
QString Decoder::filename_format [static, protected] |
Definition at line 100 of file mythplugins/mythmusic/mythmusic/decoder.h.
int Decoder::ignore_id3 = 0 [static, protected] |
Definition at line 101 of file mythplugins/mythmusic/mythmusic/decoder.h.
Referenced by readMetadata(), and SetLocationFormatUseTags().
QString Decoder::musiclocation = "" [static, protected] |
Definition at line 102 of file mythplugins/mythmusic/mythmusic/decoder.h.
Referenced by SetLocationFormatUseTags().
DecoderFactory* Decoder::fctry [private] |
QIODevice* Decoder::in [private] |
Definition at line 107 of file mythplugins/mythmusic/mythmusic/decoder.h.
Referenced by setInput(), and ~Decoder().
AudioOutput* Decoder::out [private] |
Definition at line 108 of file mythplugins/mythmusic/mythmusic/decoder.h.
Referenced by setOutput(), and ~Decoder().
QMutex Decoder::mtx [private] |
Definition at line 110 of file mythplugins/mythmusic/mythmusic/decoder.h.
QWaitCondition Decoder::cnd [private] |
Definition at line 111 of file mythplugins/mythmusic/mythmusic/decoder.h.
int Decoder::blksize [private] |
1.5.5