QtlMovie 1.12 (A specialized FFmpeg front-end)
QtlMovieTask Class Reference

A class implementing one transcoding task. More...

Inheritance diagram for QtlMovieTask:

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...
 
QtlMovieInputFileinputFile () const
 Get the input file for the task. More...
 
QtlMovieOutputFileoutputFile () 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...
 

Detailed Description

A class implementing one transcoding task.

Member Enumeration Documentation

◆ State

Define the state of the task.

Enumerator
Queued 

Waiting to start.

Running 

Transcoding in progress.

Success 

Completed successfully.

Failed 

Completed with failure.

Constructor & Destructor Documentation

◆ QtlMovieTask() [1/2]

QtlMovieTask::QtlMovieTask ( const QtlMovieSettings settings,
QtlLogger log,
QObject *  parent = 0 
)

Constructor.

Parameters
[in]settingsApplication settings.
[in]logMessage logger.
[in]parentOptional parent object.

◆ QtlMovieTask() [2/2]

QtlMovieTask::QtlMovieTask ( )
private

Member Function Documentation

◆ inputFile()

QtlMovieInputFile* QtlMovieTask::inputFile ( ) const
inline

Get the input file for the task.

Returns
A pointer to the input file for the task.

◆ outputFile()

QtlMovieOutputFile* QtlMovieTask::outputFile ( ) const
inline

Get the output file for the task.

Returns
A pointer to the output file for the task.

◆ askOverwriteOutput()

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.

Returns
True if the output file does not exist or can be overwritten, false otherwise.

◆ state()

State QtlMovieTask::state ( ) const
inline

Get the current state of the task (queued, running, etc).

Returns
The current state of the task.

◆ taskChanged

void QtlMovieTask::taskChanged ( QtlMovieTask task)
signal

Emitted when the input file name, output file name or output type changes.

Parameters
[in]taskThe changed task (ie. signal emitter).

◆ stateChanged

void QtlMovieTask::stateChanged ( QtlMovieTask task)
signal

Emitted when the state of the task changes.

Parameters
[in]taskThe changed task (ie. signal emitter).

◆ setStarted

void QtlMovieTask::setStarted ( )
slot

Invoked when the task starts.

◆ setCompleted

void QtlMovieTask::setCompleted ( bool  success)
slot

Invoked when the task completes.

Parameters
[in]successTrue when the task completed successfully, false otherwise.

◆ setRequeue

void QtlMovieTask::setRequeue ( )
slot

Invoked to requeue a completed task.

◆ emitTaskChanged

void QtlMovieTask::emitTaskChanged ( )
privateslot

Used as relay to emit the signal taskChanged().

◆ setState()

void QtlMovieTask::setState ( State  state)
private

Set the current state of the task (queued, running, etc).

Parameters
[in]stateThe current state of the task.

Member Data Documentation

◆ _settings

const QtlMovieSettings* QtlMovieTask::_settings
private

Global settings.

◆ _inFile

QtlMovieInputFile* QtlMovieTask::_inFile
private

Input file description.

◆ _outFile

QtlMovieOutputFile* QtlMovieTask::_outFile
private

Output file description.

◆ _state

State QtlMovieTask::_state
private

State of the task (queued, running, etc.)


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