MythTV  master
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
Decoder Class Referenceabstract

#include <decoder.h>

Inheritance diagram for Decoder:
Inheritance graph
[legend]
Collaboration diagram for Decoder:
Collaboration graph
[legend]

Public Member Functions

virtual ~Decoder ()
 
virtual bool initialize ()=0
 
virtual void seek (double)=0
 
virtual void stop ()=0
 
DecoderFactoryfactory () const
 
AudioOutputoutput ()
 
void setOutput (AudioOutput *)
 
void setURL (const QString &url)
 
virtual void lock (void)
 
virtual void unlock (void)
 
virtual bool tryLock (void)
 
QWaitCondition * cond ()
 
QString getURL (void) const
 
- Public Member Functions inherited from MThread
 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 ()
 
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=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 (unsigned long time=ULONG_MAX)
 Wait for the MThread to exit, with a maximum timeout. More...
 
- Public Member Functions inherited from MythObservable
 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 &)
 
static void registerFactory (DecoderFactory *)
 
static Decodercreate (const QString &, AudioOutput *, bool=false)
 
- Static Public Member Functions inherited from MThread
static void ThreadSetup (const QString &)
 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 &)
 
- Protected Member Functions inherited from MThread
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
 
- Protected Attributes inherited from MThread
MThreadInternalm_thread {nullptr}
 
QRunnable * m_runnable {nullptr}
 
bool m_prolog_executed {true}
 
bool m_epilog_executed {true}
 
- Protected Attributes inherited from MythObservable
QMutex * m_lock {nullptr}
 
QSet< QObject * > m_listeners
 

Private Attributes

DecoderFactorym_fctry {nullptr}
 
AudioOutputm_out {nullptr}
 
QMutex m_mtx
 
QWaitCondition m_cnd
 

Additional Inherited Members

- Static Public Attributes inherited from MThread
static const int kDefaultStartTimeout
 
- Static Protected Member Functions inherited from MThread
static void setTerminationEnabled (bool enabled=true)
 
static void sleep (unsigned long time)
 
static void msleep (unsigned long time)
 
static void usleep (unsigned long time)
 

Detailed Description

Definition at line 66 of file decoder.h.

Constructor & Destructor Documentation

◆ ~Decoder()

Decoder::~Decoder ( )
virtual

Definition at line 33 of file decoder.cpp.

◆ Decoder()

Decoder::Decoder ( DecoderFactory d,
AudioOutput o 
)
inlineprotected

Definition at line 96 of file decoder.h.

Member Function Documentation

◆ initialize()

virtual bool Decoder::initialize ( )
pure virtual

Implemented in CdDecoder, and avfDecoder.

Referenced by MusicPlayer::decoderHandlerReady().

◆ seek()

virtual void Decoder::seek ( double  )
pure virtual

Implemented in CdDecoder, and avfDecoder.

Referenced by MusicCommon::seek(), and MusicPlayer::seek().

◆ stop()

virtual void Decoder::stop ( )
pure virtual

◆ factory()

DecoderFactory* Decoder::factory ( ) const
inline

Definition at line 75 of file decoder.h.

Referenced by DecoderHandler::doConnectDecoder().

◆ output()

AudioOutput* Decoder::output ( )
inline

◆ setOutput()

void Decoder::setOutput ( AudioOutput o)

◆ setURL()

void Decoder::setURL ( const QString &  url)
inline

◆ lock()

virtual void Decoder::lock ( void  )
inlinevirtual

◆ unlock()

virtual void Decoder::unlock ( void  )
inlinevirtual

Definition at line 82 of file decoder.h.

Referenced by MusicPlayer::pause(), MusicCommon::seek(), setOutput(), and DecoderHandler::stop().

◆ tryLock()

virtual bool Decoder::tryLock ( void  )
inlinevirtual

Definition at line 83 of file decoder.h.

◆ cond()

QWaitCondition* Decoder::cond ( )
inline

Definition at line 85 of file decoder.h.

Referenced by MusicPlayer::pause(), and DecoderHandler::stop().

◆ getURL()

QString Decoder::getURL ( void  ) const
inline

Definition at line 87 of file decoder.h.

Referenced by CdDecoder::getMetadata(), avfDecoder::initialize(), and CdDecoder::initialize().

◆ all()

QStringList Decoder::all ( )
static

Definition at line 76 of file decoder.cpp.

◆ supports()

bool Decoder::supports ( const QString &  source)
static

Definition at line 89 of file decoder.cpp.

◆ registerFactory()

void Decoder::registerFactory ( DecoderFactory fact)
static

Definition at line 103 of file decoder.cpp.

Referenced by checkFactories().

◆ create()

Decoder * Decoder::create ( const QString &  source,
AudioOutput output,
bool  deletable = false 
)
static

Definition at line 108 of file decoder.cpp.

Referenced by DecoderHandler::doConnectDecoder().

◆ getMutex()

QMutex* Decoder::getMutex ( void  )
inlineprotected

Definition at line 98 of file decoder.h.

◆ error()

void Decoder::error ( const QString &  e)
protected

Definition at line 53 of file decoder.cpp.

Referenced by avfDecoder::initialize().

Member Data Documentation

◆ m_url

QString Decoder::m_url
protected

Definition at line 101 of file decoder.h.

Referenced by getURL(), avfDecoder::initialize(), avfDecoder::run(), and setURL().

◆ m_fctry

DecoderFactory* Decoder::m_fctry {nullptr}
private

Definition at line 104 of file decoder.h.

Referenced by factory(), and ~Decoder().

◆ m_out

AudioOutput* Decoder::m_out {nullptr}
private

Definition at line 106 of file decoder.h.

Referenced by output(), setOutput(), and ~Decoder().

◆ m_mtx

QMutex Decoder::m_mtx
private

Definition at line 108 of file decoder.h.

Referenced by getMutex(), lock(), tryLock(), and unlock().

◆ m_cnd

QWaitCondition Decoder::m_cnd
private

Definition at line 109 of file decoder.h.

Referenced by cond().


The documentation for this class was generated from the following files: