Qt-friendly controller that runs the decoder Worker in a thread.
More...
#include <Decoder.h>
|
| 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) |
|
| 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) |
|
| | 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.
|
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.
◆ Decoder()
| Decoder::Decoder |
( |
QObject * | parent = nullptr | ) |
|
◆ ~Decoder()
Destroy and tear down the worker/thread.
◆ 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()
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
◆ 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()
Unlock the internal synchronization primitive.
◆ wait
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: