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

A class to demultiplex a Program Chain (PGC) from a DVD Video Title Set (VTS). More...

Inheritance diagram for QtsDvdProgramChainDemux:
QtlDataPull

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...
 
- Public Member Functions inherited from QtlDataPull
 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...
 
QtlLoggerlog () 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...
 
- Protected Member Functions inherited from QtlDataPull
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

- Public Slots inherited from QtlDataPull
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...
 
- Signals inherited from QtlDataPull
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 Public Attributes inherited from QtlDataPull
static const int DEFAULT_MIN_BUFFER_SIZE = 128 * 1024
 Default minimum buffer size in bytes (128 kB). More...
 

Detailed Description

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.

See also
QtlDataPull

Constructor & Destructor Documentation

◆ QtsDvdProgramChainDemux() [1/2]

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.

Parameters
[in]vtsVideo title set to demux.
[in]pgcNumberProgram chain number to demux. Starting at 1.
[in]angleNumberAngle number. Starting at 1.
[in]fallbackPgcNumberProgram 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]transferSizeData transfer size in bytes.
[in]minBufferSizeThe 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]demuxPolicyManagement policy for navigation packs.
[in]logOptional message logger.
[in]parentOptional parent object.
[in]useMaxReadSpeedIf true, try to set the DVD reader to maximum speed.

◆ QtsDvdProgramChainDemux() [2/2]

QtsDvdProgramChainDemux::QtsDvdProgramChainDemux ( )
private

Member Function Documentation

◆ initializeTransfer()

bool QtsDvdProgramChainDemux::initializeTransfer ( )
protectedvirtual

Initialize the transfer.

Reimplemented from QtlDataPull.

Returns
True on success, false on error.

Reimplemented from QtlDataPull.

◆ needTransfer()

bool QtsDvdProgramChainDemux::needTransfer ( qint64  maxSize)
protectedvirtual

Invoked when more data is needed.

Reimplemented from QtlDataPull.

Parameters
[in]maxSizeMaximum size in bytes of the requested transfer.
Returns
True on success, false on error.

Implements QtlDataPull.

◆ cleanupTransfer()

void QtsDvdProgramChainDemux::cleanupTransfer ( bool  clean)
protectedvirtual

Cleanup the transfer.

Reimplemented from QtlDataPull.

Parameters
[in]cleanIf true, this is a clean termination.

Reimplemented from QtlDataPull.

◆ demuxBuffer()

bool QtsDvdProgramChainDemux::demuxBuffer ( int  sectorCount)
private

Demux the sectors in the buffer, write demuxed sectors to superclass.

Parameters
[in]sectorCountNumber of sectors to demux in buffer.
Returns
True on success, false on error.

Member Data Documentation

◆ _vts

const QtsDvdTitleSet QtsDvdProgramChainDemux::_vts
private

Title set to demux.

◆ _pgc

QtsDvdProgramChainPtr QtsDvdProgramChainDemux::_pgc
private

PGC to demux.

◆ _angleNumber

const int QtsDvdProgramChainDemux::_angleNumber
private

Angle to demux.

◆ _demuxPolicy

Qts::DvdDemuxPolicy QtsDvdProgramChainDemux::_demuxPolicy
private

Management policy for navigation packs.

◆ _sectorChunk

const int QtsDvdProgramChainDemux::_sectorChunk
private

Number of sectors per transfer.

◆ _maxReadSpeed

const bool QtsDvdProgramChainDemux::_maxReadSpeed
private

Set the DVD reader to maximum speed.

◆ _vobStartSector

int QtsDvdProgramChainDemux::_vobStartSector
private

First sector of VOB files on DVD media.

◆ _buffer

QtlByteBlock QtsDvdProgramChainDemux::_buffer
private

Transfer buffer.

◆ _inputSectors

InputSectors QtsDvdProgramChainDemux::_inputSectors
private

Computation of input sectors to read.

◆ _dvd

QtsDvdMedia QtsDvdProgramChainDemux::_dvd
private

Access through DVD media.

◆ _vobs

VobFileSet QtsDvdProgramChainDemux::_vobs
private

Access through VOB files.

◆ _report

QtsDvdBandwidthReport QtsDvdProgramChainDemux::_report
private

To report transfer bandwidth.

◆ _inPgcContent

bool QtsDvdProgramChainDemux::_inPgcContent
private

True if current sectors are part of the PGC content.

◆ _writtenSectors

int QtsDvdProgramChainDemux::_writtenSectors
private

Number of written sectors.


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