JS8Call-Improved master
Loading...
Searching...
No Matches
Decoder Class Reference

Qt-friendly controller that runs the decoder Worker in a thread. More...

#include <Decoder.h>

Inheritance diagram for Decoder:
Collaboration diagram for Decoder:

Public Slots

void start (QThread::Priority priority)
void quit ()
bool wait ()
 Wait for the worker to finish shutdown.
void processStart (QString path, QStringList args)
void processReady (QByteArray t)
void processQuit ()
void processError (int errorCode, QString errorString)
void processFinished (int exitCode, int statusCode, QString errorString)

Signals

void startWorker (QString path, QStringList args)
void quitWorker ()
void ready (QByteArray t)
void error (int errorCode, QString errorString)
void finished (int exitCode, int statusCode, QString errorString)

Public Member Functions

 Decoder (QObject *parent=nullptr)
 ~Decoder ()
void lock ()
void unlock ()
QString program () const
 Return the program path of the managed decoder process.
QStringList arguments () const
 Return the argument list configured for the decoder process.

Detailed Description

Qt-friendly controller that runs the decoder Worker in a thread.

Decoder creates and runs a Worker in a dedicated QThread, exposing slots to start/stop the worker and signals forwarding worker events. The class also provides convenience accessors for the currently configured program and arguments.

Constructor & Destructor Documentation

◆ Decoder()

Decoder::Decoder ( QObject * parent = nullptr)

Construct a Decoder controller.

◆ ~Decoder()

Decoder::~Decoder ( )

Destroy and tear down the worker/thread.

Member Function Documentation

◆ arguments()

QStringList Decoder::arguments ( ) const
inline

Return the argument list configured for the decoder process.

Returns
Argument list or empty if not available.

◆ error

void Decoder::error ( int errorCode,
QString errorString )
signal

Forwarded worker signals: error.

◆ finished

void Decoder::finished ( int exitCode,
int statusCode,
QString errorString )
signal

Forwarded worker signals: finished.

◆ lock()

void Decoder::lock ( )

Lock internal synchronization primitive used by the decoder.

◆ program()

QString Decoder::program ( ) const
inline

Return the program path of the managed decoder process.

Returns
Program path or empty string if not available.

◆ quit

void Decoder::quit ( )
slot

Request worker shutdown.

◆ quitWorker

void Decoder::quitWorker ( )
signal

Request the worker to quit.

◆ ready

void Decoder::ready ( QByteArray t)
signal

Forwarded worker signals: stdout data ready.

◆ start

void Decoder::start ( QThread::Priority priority)
slot

Start the decoder worker with given thread priority.

◆ startWorker

void Decoder::startWorker ( QString path,
QStringList args )
signal

Request the worker to start with given path and args.

◆ unlock()

void Decoder::unlock ( )

Unlock the internal synchronization primitive.

◆ wait

bool Decoder::wait ( )
slot

Wait for the worker to finish shutdown.

Returns
true if the worker finished successfully.

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