16#include "JS8_Main/ProcessThread.h"
19#include <QLoggingCategory>
44 void start(QString path, QStringList args);
53 QProcess *
process()
const {
return m_proc.data(); }
61 void setProcess(QProcess *proc,
int msecs = 1000);
68 void error(
int errorCode, QString errorString);
71 void finished(
int exitCode,
int statusCode, QString errorString);
74 QScopedPointer<QProcess> m_proc;
106 if (!m_worker.isNull() && m_worker->process() !=
nullptr) {
107 return m_worker->process()->program();
117 if (!m_worker.isNull() && m_worker->process() !=
nullptr) {
118 return m_worker->process()->arguments();
129 void start(QThread::Priority priority);
141 void processStart(QString path, QStringList args);
142 void processReady(QByteArray t);
145 void processError(
int errorCode, QString errorString);
146 void processFinished(
int exitCode,
int statusCode, QString errorString);
157 void error(
int errorCode, QString errorString);
159 void finished(
int exitCode,
int statusCode, QString errorString);
162 QPointer<Worker> m_worker;
166Q_DECLARE_LOGGING_CATEGORY(decoder_js8)
void finished(int exitCode, int statusCode, QString errorString)
bool wait()
Wait for the worker to finish shutdown.
Definition Decoder.cpp:53
QString program() const
Return the program path of the managed decoder process.
Definition Decoder.h:105
void quit()
Definition Decoder.cpp:50
void start(QThread::Priority priority)
Definition Decoder.cpp:47
Decoder(QObject *parent=nullptr)
void startWorker(QString path, QStringList args)
void error(int errorCode, QString errorString)
QStringList arguments() const
Return the argument list configured for the decoder process.
Definition Decoder.h:116
Manage an external decoder process and forward its I/O.
Definition Decoder.h:32
QProcess * process() const
Return the underlying QProcess instance, if any.
Definition Decoder.h:53
void error(int errorCode, QString errorString)
~Worker()
Definition Decoder.cpp:89
void start(QString path, QStringList args)
Launch the external decoder process.
Definition Decoder.cpp:106
void finished(int exitCode, int statusCode, QString errorString)
void quit()
Request the running process to quit.
Definition Decoder.cpp:137