A complete DVD extraction session. More...
Classes | |
class | OutputFile |
Inner private class describing one transfer. More... | |
Public Member Functions | |
QtlMovieDvdExtractionSession (const QString &dvdDeviceName, const QtlMovieSettings *settings, QtlLogger *log, QObject *parent=0) | |
Constructor. More... | |
virtual void | abort () Q_DECL_OVERRIDE |
Abort the extraction. More... | |
void | addFile (const QString &outputFileName, int startSector, int sectorCount, Qts::BadSectorPolicy badSectorPolicy) |
Add a slice of DVD to extract in a file. More... | |
bool | askOverwriteOutput () |
Ask the user if the output files may be overwritten. More... | |
int | remainingTransferCount () const |
Get the number of remaining transfers, including the current one. More... | |
virtual bool | start () Q_DECL_OVERRIDE |
Start the extraction. More... | |
![]() | |
QtlMovieAction (const QtlMovieSettings *settings, QtlLogger *log, QObject *parent=0) | |
Constructor. More... | |
virtual | ~QtlMovieAction () |
Virtual destructor. More... | |
virtual void | debug (const QString &line, const QColor &color=QColor()) Q_DECL_OVERRIDE |
Log a line of debug text. More... | |
QString | description () const |
Get the description of the action. More... | |
int | elapsedSeconds () const |
Get the number of seconds since the action started. More... | |
bool | isCompleted () const |
Check if the action is completed. More... | |
bool | isSilent () const |
Check if unimportant messages are skipped. More... | |
bool | isStarted () const |
Check if the action was started (and possibly completed in the meantime). More... | |
virtual void | line (const QString &line, const QColor &color=QColor()) Q_DECL_OVERRIDE |
Log a line of text. More... | |
void | setDescription (const QString &description) |
Set the description of the action. More... | |
void | setSilent (bool silent) |
Set if unimportant messages are skipped. More... | |
const QtlMovieSettings * | settings () const |
Get the application settings. More... | |
virtual void | text (const QString &text) Q_DECL_OVERRIDE |
Log text. More... | |
Private Types | |
typedef QList< OutputFilePtr > | OutputFileList |
typedef QtlSmartPointer< OutputFile, QtlNullMutexLocker > | OutputFilePtr |
Private Slots | |
void | dataPullCompleted (bool success) |
Invoked each time a transfer completes. More... | |
void | dataPullProgressed (qint64 current, qint64 maximum) |
Invoked when some progress in the current data transfer is available. More... | |
Private Member Functions | |
QtlMovieDvdExtractionSession () Q_DECL_EQ_DELETE | |
bool | startNextExtraction () |
Start the next extraction in the list. More... | |
Private Attributes | |
int | _completedFiles |
Completed file count. More... | |
int | _completedSectors |
Transfered sectors in previous completed transfered. More... | |
QString | _dvdDeviceName |
DVD device name. More... | |
int | _totalFiles |
Total file count. More... | |
int | _totalSectors |
Total size in DVD sectors of the transfer. More... | |
OutputFileList | _transferList |
List of transfers. More... | |
Additional Inherited Members | |
![]() | |
void | completed (bool success) |
Emitted when the action completes. More... | |
void | progress (const QString &description, int current, int maximum, int elapsedSeconds, int remainingSeconds) |
Emitted when some progress in the reporting is available. More... | |
void | started () |
Emitted when the action starts. More... | |
![]() | |
virtual void | emitCompleted (bool success, const QString &message=QString()) |
Emit the completed() signal. More... | |
virtual void | emitProgress (int current, int maximum, int remainingSeconds=-1) |
Emit the progress() signal. More... | |
A complete DVD extraction session.
|
private |
|
private |
QtlMovieDvdExtractionSession::QtlMovieDvdExtractionSession | ( | const QString & | dvdDeviceName, |
const QtlMovieSettings * | settings, | ||
QtlLogger * | log, | ||
QObject * | parent = 0 |
||
) |
Constructor.
[in] | dvdDeviceName | DVD device name. |
[in] | settings | Application settings. |
[in] | log | Message logger. |
[in] | parent | Optional parent object. |
|
private |
void QtlMovieDvdExtractionSession::addFile | ( | const QString & | outputFileName, |
int | startSector, | ||
int | sectorCount, | ||
Qts::BadSectorPolicy | badSectorPolicy | ||
) |
Add a slice of DVD to extract in a file.
Must be done before start().
[in] | outputFileName | Output file name. |
[in] | startSector | First sector to read. |
[in] | sectorCount | Total number of sectors to read. |
[in] | badSectorPolicy | How to handle bad sectors. |
|
inline |
Get the number of remaining transfers, including the current one.
bool QtlMovieDvdExtractionSession::askOverwriteOutput | ( | ) |
Ask the user if the output files may be overwritten.
If no output file already exists, ask nothing. If some output files already exist and the user is OK to overwrite them, the previous output files are deleted.
|
virtual |
Start the extraction.
Reimplemented from QtlMovieAction.
|
virtual |
Abort the extraction.
If the extraction was started, the signal completed() will be emitted when it actually terminates.
Reimplemented from QtlMovieAction.
|
privateslot |
Invoked when some progress in the current data transfer is available.
[in] | current | Current number of input bytes. |
[in] | maximum | Total size of the data transfer. |
|
privateslot |
Invoked each time a transfer completes.
[in] | success | Indicates whether the action succeeded or failed. |
|
private |
Start the next extraction in the list.
|
private |
DVD device name.
|
private |
Total size in DVD sectors of the transfer.
|
private |
Transfered sectors in previous completed transfered.
|
private |
Total file count.
|
private |
Completed file count.
|
private |
List of transfers.