A class to demultiplex a Program Chain (PGC) from a DVD Video Title Set (VTS). More...
Classes | |
class | InputSectors |
A class to compute ranges in contiguous input sectors. More... | |
class | VobFileSet |
A class which is used to read from VOB files. More... | |
Public Member Functions | |
QtsDvdProgramChainDemux (const QtsDvdTitleSet &vts, int pgcNumber, int angleNumber, int fallbackPgcNumber=0, int transferSize=QTS_DEFAULT_DVD_TRANSFER_SIZE, int minBufferSize=DEFAULT_MIN_BUFFER_SIZE, Qts::DvdDemuxPolicy demuxPolicy=Qts::NavPacksFixed, 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... | |
Protected Member Functions | |
virtual void | cleanupTransfer (bool clean) Q_DECL_OVERRIDE |
Cleanup the transfer. More... | |
virtual bool | initializeTransfer () Q_DECL_OVERRIDE |
Initialize the transfer. More... | |
virtual bool | needTransfer (qint64 maxSize) Q_DECL_OVERRIDE |
Invoked when more data is needed. More... | |
![]() | |
void | close () |
Properly terminate the transfer. More... | |
bool | write (const void *data, int dataSize) |
Write data to all devices. More... | |
Private Member Functions | |
QtsDvdProgramChainDemux () Q_DECL_EQ_DELETE | |
bool | demuxBuffer (int sectorCount) |
Demux the sectors in the buffer, write demuxed sectors to superclass. More... | |
Private Attributes | |
const int | _angleNumber |
Angle to demux. More... | |
QtlByteBlock | _buffer |
Transfer buffer. More... | |
Qts::DvdDemuxPolicy | _demuxPolicy |
Management policy for navigation packs. More... | |
QtsDvdMedia | _dvd |
Access through DVD media. More... | |
bool | _inPgcContent |
True if current sectors are part of the PGC content. More... | |
InputSectors | _inputSectors |
Computation of input sectors to read. More... | |
const bool | _maxReadSpeed |
Set the DVD reader to maximum speed. More... | |
QtsDvdProgramChainPtr | _pgc |
PGC to demux. More... | |
QtsDvdBandwidthReport | _report |
To report transfer bandwidth. More... | |
const int | _sectorChunk |
Number of sectors per transfer. More... | |
VobFileSet | _vobs |
Access through VOB files. More... | |
int | _vobStartSector |
First sector of VOB files on DVD media. More... | |
const QtsDvdTitleSet | _vts |
Title set to demux. More... | |
int | _writtenSectors |
Number of written sectors. More... | |
Additional Inherited Members | |
![]() | |
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 demultiplex a Program Chain (PGC) from a DVD Video Title Set (VTS).
This class pulls data from either an encrypted DVD or regular VTS files into asynchronous devices such as QProcess.
QtsDvdProgramChainDemux::QtsDvdProgramChainDemux | ( | const QtsDvdTitleSet & | vts, |
int | pgcNumber, | ||
int | angleNumber, | ||
int | fallbackPgcNumber = 0 , |
||
int | transferSize = QTS_DEFAULT_DVD_TRANSFER_SIZE , |
||
int | minBufferSize = DEFAULT_MIN_BUFFER_SIZE , |
||
Qts::DvdDemuxPolicy | demuxPolicy = Qts::NavPacksFixed , |
||
QtlLogger * | log = 0 , |
||
QObject * | parent = 0 , |
||
bool | useMaxReadSpeed = false |
||
) |
Constructor.
Progress reporting is automatically enabled.
[in] | vts | Video title set to demux. |
[in] | pgcNumber | Program chain number to demux. Starting at 1. |
[in] | angleNumber | Angle number. Starting at 1. |
[in] | fallbackPgcNumber | Program chain number if pgcNumber does not exist in the title set. If negative or zero, no fallback is used and an error is generated if pgcNumber does not exist. |
[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] | demuxPolicy | Management policy for navigation packs. |
[in] | log | Optional message logger. |
[in] | parent | Optional parent object. |
[in] | useMaxReadSpeed | If true, try to set the DVD reader to maximum speed. |
|
private |
|
protectedvirtual |
Initialize the transfer.
Reimplemented from QtlDataPull.
Reimplemented from QtlDataPull.
|
protectedvirtual |
Invoked when more data is needed.
Reimplemented from QtlDataPull.
[in] | maxSize | Maximum size in bytes of the requested transfer. |
Implements QtlDataPull.
|
protectedvirtual |
Cleanup the transfer.
Reimplemented from QtlDataPull.
[in] | clean | If true, this is a clean termination. |
Reimplemented from QtlDataPull.
|
private |
Demux the sectors in the buffer, write demuxed sectors to superclass.
[in] | sectorCount | Number of sectors to demux in buffer. |
|
private |
Title set to demux.
|
private |
PGC to demux.
|
private |
Angle to demux.
|
private |
Management policy for navigation packs.
|
private |
Number of sectors per transfer.
|
private |
Set the DVD reader to maximum speed.
|
private |
First sector of VOB files on DVD media.
|
private |
Transfer buffer.
|
private |
Computation of input sectors to read.
|
private |
Access through DVD media.
|
private |
Access through VOB files.
|
private |
To report transfer bandwidth.
|
private |
True if current sectors are part of the PGC content.
|
private |
Number of written sectors.