MythTV
master
|
#include <mythplugins/mythmusic/mythmusic/decoder.h>
Public Member Functions | |
~Decoder () override | |
virtual bool | initialize ()=0 |
virtual void | seek (double)=0 |
virtual void | stop ()=0 |
DecoderFactory * | factory () const |
AudioOutput * | output () |
void | setOutput (AudioOutput *o) |
void | setURL (const QString &url) |
virtual void | lock (void) |
virtual void | unlock (void) |
virtual bool | tryLock (void) |
QWaitCondition * | cond () |
QString | getURL (void) const |
![]() | |
MThread (const QString &objectName) | |
Standard constructor. More... | |
MThread (const QString &objectName, QRunnable *runnable) | |
Use this constructor if you want the default run() method to run the QRunnable's run() method instead of entering the Qt event loop. More... | |
virtual | ~MThread () |
MThread (const MThread &)=delete | |
MThread & | operator= (const MThread &)=delete |
void | RunProlog (void) |
Sets up a thread, call this if you reimplement run(). More... | |
void | RunEpilog (void) |
Cleans up a thread's resources, call this if you reimplement run(). More... | |
QThread * | qthread (void) |
Returns the thread, this will always return the same pointer no matter how often you restart the thread. More... | |
void | setObjectName (const QString &name) |
QString | objectName (void) const |
void | setPriority (QThread::Priority priority) |
QThread::Priority | priority (void) const |
bool | isFinished (void) const |
bool | isRunning (void) const |
void | setStackSize (uint stackSize) |
uint | stackSize (void) const |
void | exit (int retcode=0) |
Use this to exit from the thread if you are using a Qt event loop. More... | |
void | start (QThread::Priority p=QThread::InheritPriority) |
Tell MThread to start running the thread in the near future. More... | |
void | terminate (void) |
Kill a thread unsafely. More... | |
void | quit (void) |
calls exit(0) More... | |
bool | wait (std::chrono::milliseconds time=std::chrono::milliseconds::max()) |
Wait for the MThread to exit, with a maximum timeout. More... | |
![]() | |
MythObservable () | |
virtual | ~MythObservable () |
void | addListener (QObject *listener) |
Add a listener to the observable. More... | |
void | removeListener (QObject *listener) |
Remove a listener to the observable. More... | |
void | dispatch (const MythEvent &event) |
Dispatch an event to all listeners. More... | |
bool | hasListeners (void) |
Static Public Member Functions | |
static QStringList | all () |
static bool | supports (const QString &source) |
static void | registerFactory (DecoderFactory *fact) |
static Decoder * | create (const QString &source, AudioOutput *output, bool deletable=false) |
![]() | |
static void | ThreadSetup (const QString &name) |
This is to be called on startup in those few threads that haven't been ported to MThread. More... | |
static void | ThreadCleanup (void) |
This is to be called on exit in those few threads that haven't been ported to MThread. More... | |
static void | Cleanup (void) |
This will print out all the running threads, call exit(1) on each and then wait up to 5 seconds total for all the threads to exit. More... | |
static void | GetAllThreadNames (QStringList &list) |
static void | GetAllRunningThreadNames (QStringList &list) |
Protected Member Functions | |
Decoder (DecoderFactory *d, AudioOutput *o) | |
QMutex * | getMutex (void) |
void | error (const QString &e) |
![]() | |
virtual void | run (void) |
Runs the Qt event loop unless we have a QRunnable, in which case we run the runnable run instead. More... | |
int | exec (void) |
Enters the qt event loop. call exit or quit to exit thread. More... | |
Protected Attributes | |
QString | m_url |
![]() | |
MThreadInternal * | m_thread {nullptr} |
QRunnable * | m_runnable {nullptr} |
bool | m_prologExecuted {true} |
bool | m_epilogExecuted {true} |
![]() | |
QMutex * | m_lock {nullptr} |
QSet< QObject * > | m_listeners |
Private Attributes | |
DecoderFactory * | m_fctry {nullptr} |
AudioOutput * | m_out {nullptr} |
QMutex | m_mtx |
QWaitCondition | m_cnd |
Additional Inherited Members | |
![]() | |
static void | setTerminationEnabled (bool enabled=true) |
static void | usleep (std::chrono::microseconds time) |
template<typename R , typename P > | |
static std::enable_if_t< std::chrono::treat_as_floating_point< R >::value, void > | usleep (std::chrono::duration< R, P > time) |
|
override |
Definition at line 31 of file decoder.cpp.
|
inlineprotected |
|
pure virtual |
Implemented in CdDecoder, and avfDecoder.
Referenced by MusicPlayer::decoderHandlerReady().
|
pure virtual |
Implemented in CdDecoder, and avfDecoder.
Referenced by MusicCommon::seek(), and MusicPlayer::seek().
|
pure virtual |
Implemented in CdDecoder, and avfDecoder.
Referenced by MusicPlayer::decoderHandlerReady(), and DecoderHandler::stop().
|
inline |
Definition at line 79 of file decoder.h.
Referenced by all(), create(), DecoderHandler::doConnectDecoder(), and supports().
|
inline |
Definition at line 81 of file decoder.h.
Referenced by create(), avfDecoder::initialize(), CdDecoder::initialize(), avfDecoder::run(), CdDecoder::run(), CdDecoder::seek(), and CdDecoder::writeBlock().
void Decoder::setOutput | ( | AudioOutput * | o | ) |
Definition at line 44 of file decoder.cpp.
Referenced by CdDecoderFactory::create(), avfDecoderFactory::create(), MusicPlayer::decoderHandlerReady(), avfDecoder::deinit(), and CdDecoder::deinit().
|
inline |
Definition at line 83 of file decoder.h.
Referenced by avfDecoder::avfDecoder(), CdDecoder::CdDecoder(), CdDecoderFactory::create(), DecoderHandler::doConnectDecoder(), and CdDecoder::getMetadata().
|
inlinevirtual |
Definition at line 85 of file decoder.h.
Referenced by CdDecoder::deinit(), CdDecoder::getMetadata(), CdDecoder::getNumCDAudioTracks(), CdDecoder::getNumTracks(), CdDecoder::initialize(), MusicPlayer::pause(), CdDecoder::run(), MusicCommon::seek(), CdDecoder::setCDSpeed(), setOutput(), and DecoderHandler::stop().
|
inlinevirtual |
Definition at line 86 of file decoder.h.
Referenced by MusicPlayer::pause(), MusicCommon::seek(), setOutput(), and DecoderHandler::stop().
|
inline |
Definition at line 89 of file decoder.h.
Referenced by MusicPlayer::pause(), and DecoderHandler::stop().
|
inline |
Definition at line 91 of file decoder.h.
Referenced by MusicPlayer::decoderHandlerReady(), CdDecoder::getMetadata(), avfDecoder::initialize(), and CdDecoder::initialize().
|
static |
Definition at line 74 of file decoder.cpp.
|
static |
Definition at line 84 of file decoder.cpp.
|
static |
Definition at line 93 of file decoder.cpp.
Referenced by checkFactories().
|
static |
Definition at line 98 of file decoder.cpp.
Referenced by DecoderHandler::doConnectDecoder().
|
protected |
Definition at line 51 of file decoder.cpp.
Referenced by avfDecoder::initialize().
|
protected |
Definition at line 105 of file decoder.h.
Referenced by getURL(), avfDecoder::initialize(), avfDecoder::run(), and setURL().
|
private |
Definition at line 108 of file decoder.h.
Referenced by factory(), and ~Decoder().
|
private |
Definition at line 110 of file decoder.h.
Referenced by output(), setOutput(), and ~Decoder().
|
private |
|
private |