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

A complete DVD extraction session. More...

Inheritance diagram for QtlMovieDvdExtractionSession:
QtlMovieAction QtlLogger

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...
 
- Public Member Functions inherited from QtlMovieAction
 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 QtlMovieSettingssettings () const
 Get the application settings. More...
 
virtual void text (const QString &text) Q_DECL_OVERRIDE
 Log text. More...
 

Private Types

typedef QList< OutputFilePtrOutputFileList
 
typedef QtlSmartPointer< OutputFile, QtlNullMutexLockerOutputFilePtr
 

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

- Signals inherited from QtlMovieAction
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...
 
- Protected Member Functions inherited from QtlMovieAction
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...
 

Detailed Description

A complete DVD extraction session.

Member Typedef Documentation

◆ OutputFilePtr

◆ OutputFileList

Constructor & Destructor Documentation

◆ QtlMovieDvdExtractionSession() [1/2]

QtlMovieDvdExtractionSession::QtlMovieDvdExtractionSession ( const QString &  dvdDeviceName,
const QtlMovieSettings settings,
QtlLogger log,
QObject *  parent = 0 
)

Constructor.

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

◆ QtlMovieDvdExtractionSession() [2/2]

QtlMovieDvdExtractionSession::QtlMovieDvdExtractionSession ( )
private

Member Function Documentation

◆ addFile()

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().

Parameters
[in]outputFileNameOutput file name.
[in]startSectorFirst sector to read.
[in]sectorCountTotal number of sectors to read.
[in]badSectorPolicyHow to handle bad sectors.
See also
QtsDvdMedia::BadSectorPolicy

◆ remainingTransferCount()

int QtlMovieDvdExtractionSession::remainingTransferCount ( ) const
inline

Get the number of remaining transfers, including the current one.

Returns
The number of remaining transfers, including the current one.

◆ askOverwriteOutput()

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.

Returns
True if the output files do not exist or can be overwritten, false otherwise.

◆ start()

bool QtlMovieDvdExtractionSession::start ( )
virtual

Start the extraction.

Returns
False if already started. True otherwise.

Reimplemented from QtlMovieAction.

◆ abort()

void QtlMovieDvdExtractionSession::abort ( )
virtual

Abort the extraction.

If the extraction was started, the signal completed() will be emitted when it actually terminates.

Reimplemented from QtlMovieAction.

◆ dataPullProgressed

void QtlMovieDvdExtractionSession::dataPullProgressed ( qint64  current,
qint64  maximum 
)
privateslot

Invoked when some progress in the current data transfer is available.

Parameters
[in]currentCurrent number of input bytes.
[in]maximumTotal size of the data transfer.

◆ dataPullCompleted

void QtlMovieDvdExtractionSession::dataPullCompleted ( bool  success)
privateslot

Invoked each time a transfer completes.

Parameters
[in]successIndicates whether the action succeeded or failed.

◆ startNextExtraction()

bool QtlMovieDvdExtractionSession::startNextExtraction ( )
private

Start the next extraction in the list.

Returns
True on success, false on error (not started).

Member Data Documentation

◆ _dvdDeviceName

QString QtlMovieDvdExtractionSession::_dvdDeviceName
private

DVD device name.

◆ _totalSectors

int QtlMovieDvdExtractionSession::_totalSectors
private

Total size in DVD sectors of the transfer.

◆ _completedSectors

int QtlMovieDvdExtractionSession::_completedSectors
private

Transfered sectors in previous completed transfered.

◆ _totalFiles

int QtlMovieDvdExtractionSession::_totalFiles
private

Total file count.

◆ _completedFiles

int QtlMovieDvdExtractionSession::_completedFiles
private

Completed file count.

◆ _transferList

OutputFileList QtlMovieDvdExtractionSession::_transferList
private

List of transfers.


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