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

Manage an external decoder process and forward its I/O. More...

#include <Decoder.h>

Inheritance diagram for Worker:
Collaboration diagram for Worker:

Public Slots

void start (QString path, QStringList args)
 Launch the external decoder process.
void quit ()
 Request the running process to quit.
QProcess * process () const
 Return the underlying QProcess instance, if any.

Signals

void ready (QByteArray t)
void error (int errorCode, QString errorString)
void finished (int exitCode, int statusCode, QString errorString)

Public Member Functions

 ~Worker ()

Detailed Description

Manage an external decoder process and forward its I/O.

Worker encapsulates the lifetime and I/O of an external decoder process. It exposes slots to start and stop the process and emits signals when data is ready on stdout, when an error occurs, and when the process finishes.

Constructor & Destructor Documentation

◆ ~Worker()

Worker::~Worker ( )

Destroy the worker and ensure the subprocess is cleaned up.

Member Function Documentation

◆ error

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

Emitted when the process reports an error.

Here is the caller graph for this function:

◆ finished

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

Emitted when the process exits.

Here is the caller graph for this function:

◆ process

QProcess * Worker::process ( ) const
inlineslot

Return the underlying QProcess instance, if any.

Returns
Pointer to the managed QProcess or nullptr.

◆ ready

void Worker::ready ( QByteArray t)
signal

Emitted when the process has produced stdout data.

Here is the caller graph for this function:

◆ start

void Worker::start ( QString path,
QStringList args )
slot

Launch the external decoder process.

Parameters
pathPath to the decoder executable.
argsArguments passed to the process.
Here is the call graph for this function:

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