|
MythTV
0.26-pre
|
#include <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) |
| QWaitCondition * | cond () |
| 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) |
Write the given metadata to the filename. | |
| virtual void | commitVolatileMetadata (const Metadata *mdata) |
| Write the changable metadata, e.g. | |
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 |
Definition at line 66 of file mythplugins/mythmusic/mythmusic/decoder.h.
| Decoder::~Decoder | ( | ) | [virtual] |
Definition at line 32 of file decoder.cpp.
| Decoder::Decoder | ( | DecoderFactory * | d, |
| QIODevice * | i, | ||
| AudioOutput * | o | ||
| ) | [protected] |
Definition at line 27 of file decoder.cpp.
| virtual bool Decoder::initialize | ( | ) | [pure virtual] |
Implemented in CdDecoder, and avfDecoder.
Referenced by MusicPlayer::decoderHandlerReady().
| virtual void Decoder::seek | ( | double | ) | [pure virtual] |
Implemented in CdDecoder, and avfDecoder.
Referenced by MusicCommon::seek(), and MusicPlayer::seek().
| virtual void Decoder::stop | ( | ) | [pure virtual] |
Implemented in CdDecoder, and avfDecoder.
Referenced by DecoderHandler::stop().
| DecoderFactory* Decoder::factory | ( | ) | const [inline] |
Definition at line 75 of file mythplugins/mythmusic/mythmusic/decoder.h.
Referenced by DecoderHandler::doConnectDecoder().
| QIODevice* Decoder::input | ( | ) | [inline] |
Definition at line 77 of file mythplugins/mythmusic/mythmusic/decoder.h.
Referenced by avfDecoder::initialize(), and CdDecoder::initialize().
| AudioOutput* Decoder::output | ( | ) | [inline] |
Definition at line 78 of file mythplugins/mythmusic/mythmusic/decoder.h.
Referenced by avfDecoder::initialize(), CdDecoder::initialize(), avfDecoder::run(), CdDecoder::run(), CdDecoder::seek(), avfDecoder::writeBlock(), and CdDecoder::writeBlock().
| void Decoder::setInput | ( | QIODevice * | i | ) |
Definition at line 39 of file decoder.cpp.
Referenced by CdDecoderFactory::create(), avfDecoderFactory::create(), avfDecoder::deinit(), CdDecoder::deinit(), and DecoderHandler::doConnectDecoder().
| void Decoder::setOutput | ( | AudioOutput * | o | ) |
Definition at line 46 of file decoder.cpp.
Referenced by CdDecoderFactory::create(), avfDecoderFactory::create(), MusicPlayer::decoderHandlerReady(), avfDecoder::deinit(), and CdDecoder::deinit().
| void Decoder::setFilename | ( | const QString & | newName | ) | [inline] |
Definition at line 81 of file mythplugins/mythmusic/mythmusic/decoder.h.
Referenced by avfDecoder::avfDecoder(), CdDecoder::CdDecoder(), CdDecoderFactory::create(), DecoderHandler::doConnectDecoder(), CdDecoder::getMetadata(), and CdDecoder::initialize().
| virtual void Decoder::lock | ( | void | ) | [inline, virtual] |
Definition at line 83 of file mythplugins/mythmusic/mythmusic/decoder.h.
Referenced by CdDecoder::commitMetadata(), CdDecoder::deinit(), CdDecoder::getMetadata(), CdDecoder::getNumCDAudioTracks(), CdDecoder::getNumTracks(), CdDecoder::initialize(), MusicPlayer::pause(), CdDecoder::run(), MusicCommon::seek(), CdDecoder::setCDSpeed(), setInput(), setOutput(), and DecoderHandler::stop().
| virtual void Decoder::unlock | ( | void | ) | [inline, virtual] |
Definition at line 84 of file mythplugins/mythmusic/mythmusic/decoder.h.
Referenced by MusicPlayer::pause(), MusicCommon::seek(), setInput(), setOutput(), and DecoderHandler::stop().
| virtual bool Decoder::tryLock | ( | void | ) | [inline, virtual] |
Definition at line 85 of file mythplugins/mythmusic/mythmusic/decoder.h.
| QWaitCondition* Decoder::cond | ( | ) | [inline] |
Definition at line 88 of file mythplugins/mythmusic/mythmusic/decoder.h.
Referenced by MusicPlayer::pause(), and DecoderHandler::stop().
| QString Decoder::getFilename | ( | void | ) | const [inline] |
Definition at line 90 of file mythplugins/mythmusic/mythmusic/decoder.h.
Referenced by CdDecoder::getMetadata(), and CdDecoder::initialize().
| 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 67 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 102 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 avf decoder (AvfDecoder) implements this, whereas the audio CD decoder (CdDecoder) does not.
MetaIO owned by the caller Reimplemented in avfDecoder.
Definition at line 136 of file decoder.cpp.
Referenced by commitMetadata(), commitVolatileMetadata(), and readMetadata().
| void Decoder::commitMetadata | ( | Metadata * | mdata | ) | [virtual] |
Write the given metadata to the filename.
Creates a MetaIO object using Decoder::doCreateTagger and asks the MetaIO object to write the contents of mdata to filename.
mdata the metadata to write to the disk
Reimplemented in CdDecoder.
Definition at line 150 of file decoder.cpp.
Referenced by ImportMusicDialog::addPressed().
| void Decoder::commitVolatileMetadata | ( | const Metadata * | mdata | ) | [virtual] |
Write the changable metadata, e.g.
ratings, playcounts; to the filename if the tag format supports it.
Creates a MetaIO object using Decoder::doCreateTagger and asks the MetaIO object to write changes to a specific subset of metadata to filename.
mdata the metadata to write to the disk
Definition at line 170 of file decoder.cpp.
Referenced by MusicPlayer::updateVolatileMetadata().
| QStringList Decoder::all | ( | ) | [static] |
Definition at line 217 of file decoder.cpp.
| bool Decoder::supports | ( | const QString & | source | ) | [static] |
Definition at line 230 of file decoder.cpp.
| void Decoder::registerFactory | ( | DecoderFactory * | fact | ) | [static] |
Definition at line 244 of file decoder.cpp.
Referenced by checkFactories().
| Decoder * Decoder::create | ( | const QString & | source, |
| QIODevice * | input, | ||
| AudioOutput * | output, | ||
| bool | deletable = false |
||
| ) | [static] |
Definition at line 249 of file decoder.cpp.
Referenced by FileScanner::AddFileToDB(), ImportMusicDialog::addPressed(), DecoderHandler::doConnectDecoder(), ImportMusicDialog::scanDirectory(), and FileScanner::UpdateFileInDB().
| void Decoder::SetLocationFormatUseTags | ( | void | ) | [static] |
Definition at line 190 of file decoder.cpp.
Referenced by loadMusic(), mythplugin_config(), and mythplugin_init().
| QMutex* Decoder::getMutex | ( | void | ) | [inline, protected] |
Definition at line 108 of file mythplugins/mythmusic/mythmusic/decoder.h.
| void Decoder::error | ( | const QString & | e | ) | [protected] |
Definition at line 53 of file decoder.cpp.
Referenced by avfDecoder::initialize().
QString Decoder::filename [protected] |
Definition at line 111 of file mythplugins/mythmusic/mythmusic/decoder.h.
Referenced by avfDecoder::doCreateTagger(), getFilename(), getMetadata(), avfDecoder::initialize(), readMetadata(), avfDecoder::run(), and setFilename().
QString Decoder::filename_format [static, protected] |
Definition at line 113 of file mythplugins/mythmusic/mythmusic/decoder.h.
int Decoder::ignore_id3 = 0 [static, protected] |
Definition at line 114 of file mythplugins/mythmusic/mythmusic/decoder.h.
Referenced by readMetadata(), and SetLocationFormatUseTags().
QString Decoder::musiclocation [static, protected] |
Definition at line 115 of file mythplugins/mythmusic/mythmusic/decoder.h.
Referenced by SetLocationFormatUseTags().
DecoderFactory* Decoder::fctry [private] |
Definition at line 118 of file mythplugins/mythmusic/mythmusic/decoder.h.
Referenced by factory(), and ~Decoder().
QIODevice* Decoder::in [private] |
Definition at line 120 of file mythplugins/mythmusic/mythmusic/decoder.h.
Referenced by input(), setInput(), and ~Decoder().
AudioOutput* Decoder::out [private] |
Definition at line 121 of file mythplugins/mythmusic/mythmusic/decoder.h.
Referenced by output(), setOutput(), and ~Decoder().
QMutex Decoder::mtx [private] |
Definition at line 123 of file mythplugins/mythmusic/mythmusic/decoder.h.
Referenced by CdDecoder::getCdioMutex(), getMutex(), lock(), tryLock(), and unlock().
QWaitCondition Decoder::cnd [private] |
Definition at line 124 of file mythplugins/mythmusic/mythmusic/decoder.h.
Referenced by cond().
1.7.6.1