A class implementing one transcoding task. More...
Public Types | |
enum | State { Queued, Running, Success, Failed } |
Define the state of the task. More... | |
Public Slots | |
void | setCompleted (bool success) |
Invoked when the task completes. More... | |
void | setRequeue () |
Invoked to requeue a completed task. More... | |
void | setStarted () |
Invoked when the task starts. More... | |
Signals | |
void | stateChanged (QtlMovieTask *task) |
Emitted when the state of the task changes. More... | |
void | taskChanged (QtlMovieTask *task) |
Emitted when the input file name, output file name or output type changes. More... | |
Public Member Functions | |
QtlMovieTask (const QtlMovieSettings *settings, QtlLogger *log, QObject *parent=0) | |
Constructor. More... | |
bool | askOverwriteOutput () |
Ask the user if the output file may be overwritten. More... | |
QtlMovieInputFile * | inputFile () const |
Get the input file for the task. More... | |
QtlMovieOutputFile * | outputFile () const |
Get the output file for the task. More... | |
State | state () const |
Get the current state of the task (queued, running, etc). More... | |
Private Slots | |
void | emitTaskChanged () |
Used as relay to emit the signal taskChanged(). More... | |
Private Member Functions | |
QtlMovieTask () Q_DECL_EQ_DELETE | |
void | setState (State state) |
Set the current state of the task (queued, running, etc). More... | |
Private Attributes | |
QtlMovieInputFile * | _inFile |
Input file description. More... | |
QtlMovieOutputFile * | _outFile |
Output file description. More... | |
const QtlMovieSettings * | _settings |
Global settings. More... | |
State | _state |
State of the task (queued, running, etc.) More... | |
A class implementing one transcoding task.
enum QtlMovieTask::State |
QtlMovieTask::QtlMovieTask | ( | const QtlMovieSettings * | settings, |
QtlLogger * | log, | ||
QObject * | parent = 0 |
||
) |
Constructor.
[in] | settings | Application settings. |
[in] | log | Message logger. |
[in] | parent | Optional parent object. |
|
private |
|
inline |
Get the input file for the task.
|
inline |
Get the output file for the task.
bool QtlMovieTask::askOverwriteOutput | ( | ) |
Ask the user if the output file may be overwritten.
If the output file does not already exist, ask nothing. If the output file already exists and the user is OK to overwrite it, the previous output file is deleted.
|
inline |
Get the current state of the task (queued, running, etc).
|
signal |
Emitted when the input file name, output file name or output type changes.
[in] | task | The changed task (ie. signal emitter). |
|
signal |
Emitted when the state of the task changes.
[in] | task | The changed task (ie. signal emitter). |
|
slot |
Invoked when the task starts.
|
slot |
Invoked when the task completes.
[in] | success | True when the task completed successfully, false otherwise. |
|
slot |
Invoked to requeue a completed task.
|
privateslot |
Used as relay to emit the signal taskChanged().
|
private |
Set the current state of the task (queued, running, etc).
[in] | state | The current state of the task. |
|
private |
Global settings.
|
private |
Input file description.
|
private |
Output file description.
|
private |
State of the task (queued, running, etc.)