A class to pull data from an encrypted DVD into an asynchronous device such as QProcess.
More...
|
| QtsDvdDataPull (const QString &deviceName, int startSector, int sectorCount, Qts::BadSectorPolicy badSectorPolicy=Qts::SkipBadSectors, int transferSize=QTS_DEFAULT_DVD_TRANSFER_SIZE, int minBufferSize=DEFAULT_MIN_BUFFER_SIZE, QtlLogger *log=0, QObject *parent=0, bool useMaxReadSpeed=false) |
| Constructor. More...
|
|
| QtsDvdDataPull (const QString &deviceName, const QtlRangeList sectorList, Qts::BadSectorPolicy badSectorPolicy=Qts::SkipBadSectors, int transferSize=QTS_DEFAULT_DVD_TRANSFER_SIZE, int minBufferSize=DEFAULT_MIN_BUFFER_SIZE, QtlLogger *log=0, QObject *parent=0, bool useMaxReadSpeed=false) |
| Constructor. More...
|
|
| QtlDataPull (int minBufferSize=DEFAULT_MIN_BUFFER_SIZE, QtlLogger *log=0, QObject *parent=0) |
| Constructor. More...
|
|
virtual | ~QtlDataPull () |
| Destructor. More...
|
|
bool | isStarted () const |
| Check if the data transfer is started. More...
|
|
QtlLogger * | log () const |
| Get the message logger. More...
|
|
bool | progressAvailable () const |
| Check if progress report is meaningful. More...
|
|
qint64 | pulledSize () const |
| Get the total size of all pulled data. More...
|
|
void | setAutoDelete (bool on) |
| Set automatic object deletion on transfer completion. More...
|
|
void | setMaxPulledSize (qint64 size) |
| Set the maximum number of bytes to pull. More...
|
|
void | setProgressIntervalInBytes (qint64 size) |
| Set the interval between two emissions of progress(). More...
|
|
void | setProgressMaxHint (qint64 size) |
| Set the probable ("hint") total size of the transfer. More...
|
|
|
bool | start (QIODevice *device) |
| Start to transfer data into the specified device. More...
|
|
bool | start (const QList< QIODevice *> &devices) |
| Start to transfer data into the several devices in parallel. More...
|
|
void | stop () |
| Force a premature stop of the data transfer. More...
|
|
void | stopCaller () |
| This slot stops the transfer on the device which sent the signal. More...
|
|
void | stopDevice (QIODevice *device) |
| Stop the transfer on the specified device. More...
|
|
void | completed (bool success) |
| Emitted when the transfer is completed on all devices. More...
|
|
void | deviceCompleted (QIODevice *device, bool success) |
| Emitted when the transfer is completed on one device. More...
|
|
void | progress (qint64 current, qint64 maximum) |
| Emitted when some progress in the data transfer is available. More...
|
|
void | started () |
| Emitted when the transfer is started. More...
|
|
static const int | DEFAULT_MIN_BUFFER_SIZE = 128 * 1024 |
| Default minimum buffer size in bytes (128 kB). More...
|
|
A class to pull data from an encrypted DVD into an asynchronous device such as QProcess.
- See also
- QtlDataPull
◆ QtsDvdDataPull() [1/3]
Constructor.
Progress reporting is automatically enabled.
- Parameters
-
[in] | deviceName | DVD device name. |
[in] | startSector | First sector to read. |
[in] | sectorCount | Total number of sectors to read. |
[in] | badSectorPolicy | How to handle bad sectors. |
[in] | transferSize | Data transfer size in bytes. |
[in] | minBufferSize | The minimum buffer size is the lower limit of the buffered data. When the amount of data not yet written to the device is lower than this size, new data is pulled from the DVD. |
[in] | log | Optional message logger. |
[in] | parent | Optional parent object. |
[in] | useMaxReadSpeed | If true, try to set the DVD reader to maximum speed. |
- See also
- QtsDvdMedia::BadSectorPolicy
◆ QtsDvdDataPull() [2/3]
Constructor.
Progress reporting is automatically enabled.
- Parameters
-
[in] | deviceName | DVD device name. |
[in] | sectorList | List of sectors to read. |
[in] | badSectorPolicy | How to handle bad sectors. |
[in] | transferSize | Data transfer size in bytes. |
[in] | minBufferSize | The minimum buffer size is the lower limit of the buffered data. When the amount of data not yet written to the device is lower than this size, new data is pulled from the DVD. |
[in] | log | Optional message logger. |
[in] | parent | Optional parent object. |
[in] | useMaxReadSpeed | If true, try to set the DVD reader to maximum speed. |
- See also
- QtsDvdMedia::BadSectorPolicy
◆ QtsDvdDataPull() [3/3]
QtsDvdDataPull::QtsDvdDataPull |
( |
| ) |
|
|
private |
◆ initializeTransfer()
bool QtsDvdDataPull::initializeTransfer |
( |
| ) |
|
|
protectedvirtual |
Initialize the transfer.
Reimplemented from QtlDataPull.
- Returns
- True on success, false on error.
Reimplemented from QtlDataPull.
◆ needTransfer()
bool QtsDvdDataPull::needTransfer |
( |
qint64 |
maxSize | ) |
|
|
protectedvirtual |
Invoked when more data is needed.
Reimplemented from QtlDataPull.
- Parameters
-
[in] | maxSize | Maximum size in bytes of the requested transfer. |
- Returns
- True on success, false on error.
Implements QtlDataPull.
◆ cleanupTransfer()
void QtsDvdDataPull::cleanupTransfer |
( |
bool |
clean | ) |
|
|
protectedvirtual |
Cleanup the transfer.
Reimplemented from QtlDataPull.
- Parameters
-
[in] | clean | If true, this is a clean termination. |
Reimplemented from QtlDataPull.
◆ _deviceName
const QString QtsDvdDataPull::_deviceName |
|
private |
◆ _sectorList
◆ _badSectorPolicy
How to handle bad sectors.
◆ _sectorChunk
const int QtsDvdDataPull::_sectorChunk |
|
private |
Number of sectors per transfer.
◆ _maxReadSpeed
const bool QtsDvdDataPull::_maxReadSpeed |
|
private |
Set the DVD reader to maximum speed.
◆ _currentRange
QtlRangeList::ConstIterator QtsDvdDataPull::_currentRange |
|
private |
Current pointer in _sectorList.
◆ _nextSector
int QtsDvdDataPull::_nextSector |
|
private |
Next sector in _currentRange, -1 means at beginning.
◆ _buffer
◆ _dvd
◆ _report
To report transfer bandwidth.
The documentation for this class was generated from the following files: