MythTV
master
|
#include <mythplugins/mythmusic/mythmusic/avfdecoder.h>
Public Member Functions | |
avfDecoder (const QString &file, DecoderFactory *d, AudioOutput *o) | |
~avfDecoder (void) override | |
bool | initialize () override |
double | lengthInSeconds () |
void | seek (double pos) override |
void | stop () override |
![]() | |
~Decoder () override | |
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) |
Protected Slots | |
void | checkMetatdata (void) |
Private Member Functions | |
void | run () override |
Runs the Qt event loop unless we have a QRunnable, in which case we run the runnable run instead. More... | |
void | deinit () |
Private Attributes | |
bool | m_inited {false} |
bool | m_userStop {false} |
int | m_stat {0} |
uint8_t * | m_outputBuffer {nullptr} |
bool | m_finish {false} |
long | m_freq {0} |
long | m_bitrate {0} |
int | m_channels {0} |
double | m_seekTime {-1.0} |
QString | m_devicename |
const AVInputFormat * | m_inputFormat {nullptr} |
class RemoteAVFormatContext * | m_inputContext {nullptr} |
AVCodecContext * | m_audioDec {nullptr} |
MythCodecMap | m_codecMap |
bool | m_inputIsFile {false} |
QTimer * | m_mdataTimer {nullptr} |
QString | m_lastMetadata |
QString | m_lastMetadataParsed |
int | m_errCode {0} |
Additional Inherited Members | |
![]() | |
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) |
![]() | |
Decoder (DecoderFactory *d, AudioOutput *o) | |
QMutex * | getMutex (void) |
void | error (const QString &e) |
![]() | |
int | exec (void) |
Enters the qt event loop. call exit or quit to exit thread. More... | |
![]() | |
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) |
![]() | |
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 |
Definition at line 23 of file avfdecoder.h.
avfDecoder::avfDecoder | ( | const QString & | file, |
DecoderFactory * | d, | ||
AudioOutput * | o | ||
) |
Definition at line 230 of file avfdecoder.cpp.
|
override |
Definition at line 242 of file avfdecoder.cpp.
|
overridevirtual |
Implements Decoder.
Definition at line 260 of file avfdecoder.cpp.
double avfDecoder::lengthInSeconds | ( | ) |
|
overridevirtual |
Implements Decoder.
Definition at line 392 of file avfdecoder.cpp.
|
overridevirtual |
Implements Decoder.
Definition at line 255 of file avfdecoder.cpp.
|
protectedslot |
Definition at line 549 of file avfdecoder.cpp.
Referenced by initialize().
|
overrideprivatevirtual |
Runs the Qt event loop unless we have a QRunnable, in which case we run the runnable run instead.
Reimplemented from MThread.
Definition at line 422 of file avfdecoder.cpp.
|
private |
Definition at line 401 of file avfdecoder.cpp.
Referenced by initialize(), run(), and ~avfDecoder().
Definition at line 44 of file avfdecoder.h.
Referenced by deinit(), initialize(), run(), and ~avfDecoder().
Definition at line 45 of file avfdecoder.h.
Referenced by deinit(), initialize(), run(), and stop().
|
private |
Definition at line 46 of file avfdecoder.h.
Referenced by deinit(), initialize(), and run().
|
private |
Definition at line 47 of file avfdecoder.h.
Referenced by initialize(), run(), and ~avfDecoder().
Definition at line 49 of file avfdecoder.h.
Referenced by deinit(), initialize(), and run().
|
private |
Definition at line 50 of file avfdecoder.h.
Referenced by deinit(), and initialize().
|
private |
Definition at line 51 of file avfdecoder.h.
Referenced by deinit(), and initialize().
|
private |
Definition at line 52 of file avfdecoder.h.
Referenced by deinit(), and initialize().
|
private |
Definition at line 53 of file avfdecoder.h.
Referenced by initialize(), run(), and seek().
|
private |
Definition at line 55 of file avfdecoder.h.
|
private |
Definition at line 57 of file avfdecoder.h.
Referenced by deinit(), and initialize().
|
private |
Definition at line 58 of file avfdecoder.h.
Referenced by checkMetatdata(), deinit(), initialize(), run(), seek(), and ~avfDecoder().
|
private |
Definition at line 59 of file avfdecoder.h.
Referenced by deinit(), initialize(), and run().
|
private |
Definition at line 60 of file avfdecoder.h.
Referenced by deinit(), and initialize().
Definition at line 62 of file avfdecoder.h.
|
private |
Definition at line 64 of file avfdecoder.h.
Referenced by initialize(), and ~avfDecoder().
|
private |
Definition at line 65 of file avfdecoder.h.
Referenced by checkMetatdata().
|
private |
Definition at line 66 of file avfdecoder.h.
Referenced by checkMetatdata().
|
private |
Definition at line 68 of file avfdecoder.h.