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

A class which describes a Program Chain (PGC) in a DVD Video Title Set (VTS). More...

Public Member Functions

 QtsDvdProgramChain (const QtlByteBlock &ifo=QtlByteBlock(), int index=-1, int titleNumber=0, const QtsDvdOriginalCellList &originalCells=QtsDvdOriginalCellList(), QtlLogger *log=0)
 Constructor. More...
 
int angleCount () const
 Get the number of specific angles. More...
 
int cellCount () const
 Get the number of cells in this program chain. More...
 
QtsDvdProgramCellList cells () const
 Get the list of cells in this program chain. More...
 
int chapterCount () const
 Get the number of chapters in this program chain. More...
 
QtsDvdProgramChapterList chapters () const
 Get the list of chapters in this program chain. More...
 
int durationInSeconds () const
 Get the title set playback duration in seconds. More...
 
bool isValid () const
 Check if the Program Chain data was correctly analyzed. More...
 
int nextTitleNumber () const
 Get the title number of the next PCG to play after this one inside the VTS. More...
 
int parentTitleNumber () const
 Get the title number of the parent PCG of this one inside the VTS. More...
 
int previousTitleNumber () const
 Get the title number of the previous PCG to play before this one inside the VTS. More...
 
QtlByteBlock rgbPalette () const
 Get the color palette of the title set in RGB format. More...
 
int titleNumber () const
 Get the title number of this PCG inside the VTS. More...
 
int totalSectorCount () const
 Get the total number of sectors in all cells. More...
 
QtlByteBlock yuvPalette () const
 Get the color palette of the title set in YUV format. More...
 

Static Public Member Functions

static void convertPaletteYuvToRgb (QtlByteBlock &palette, QtlLogger *log)
 Convert a YUV palette into RGB. More...
 
static QString paletteToString (const QtlByteBlock &palette)
 Convert a YUV or RBG palette into a string. More...
 

Static Private Member Functions

static int toPlaybackDuration (quint32 value)
 Decode a 32-bit value as a playback duration. More...
 

Private Attributes

int _angleCount
 Number of angles. More...
 
QtsDvdProgramCellList _cells
 List of cells in this program chain. More...
 
QtsDvdProgramChapterList _chapters
 List of chapters in this program chain. More...
 
int _duration
 Playback duration in seconds. More...
 
QtlLogger_log
 Where to log errors. More...
 
int _nextPgc
 Next PGC to play. More...
 
QtlNullLogger _nullLog
 Dummy null logger if none specified by caller. More...
 
QtlByteBlock _palette
 VTS color palette in YUV format. More...
 
int _parentPgc
 Parent PGC. More...
 
int _previousPgc
 Previous PGC to play. More...
 
int _titleNumber
 Title number in VTS. More...
 
bool _valid
 Object is valid. More...
 

Detailed Description

A class which describes a Program Chain (PGC) in a DVD Video Title Set (VTS).

Note that a Program Chain is also named a "Title", a VTS being a set of PGC's.

Constructor & Destructor Documentation

◆ QtsDvdProgramChain()

QtsDvdProgramChain::QtsDvdProgramChain ( const QtlByteBlock ifo = QtlByteBlock(),
int  index = -1,
int  titleNumber = 0,
const QtsDvdOriginalCellList originalCells = QtsDvdOriginalCellList(),
QtlLogger log = 0 
)

Constructor.

Parameters
[in]ifoContent of the IFO file.
[in]indexStarting index of the PGC data in ifo.
[in]titleNumberTitle number in VTS. First title is #1.
[in]originalCellsList of cells in original input files.
[in]logWhere to log errors.

Member Function Documentation

◆ isValid()

bool QtsDvdProgramChain::isValid ( ) const
inline

Check if the Program Chain data was correctly analyzed.

Returns
True when this object is valid, false when it is incorrect.

◆ titleNumber()

int QtsDvdProgramChain::titleNumber ( ) const
inline

Get the title number of this PCG inside the VTS.

Returns
The title number of this PCG inside the VTS. The first title number in the VTS is 1.

◆ nextTitleNumber()

int QtsDvdProgramChain::nextTitleNumber ( ) const
inline

Get the title number of the next PCG to play after this one inside the VTS.

Returns
The title number of next PCG to play or zero if there is none.

◆ previousTitleNumber()

int QtsDvdProgramChain::previousTitleNumber ( ) const
inline

Get the title number of the previous PCG to play before this one inside the VTS.

Returns
The title number of previous PCG to play or zero if there is none.

◆ parentTitleNumber()

int QtsDvdProgramChain::parentTitleNumber ( ) const
inline

Get the title number of the parent PCG of this one inside the VTS.

Returns
The title number of parent PCG or zero if there is none.

◆ durationInSeconds()

int QtsDvdProgramChain::durationInSeconds ( ) const
inline

Get the title set playback duration in seconds.

Returns
The title set playback duration in seconds.

◆ angleCount()

int QtsDvdProgramChain::angleCount ( ) const
inline

Get the number of specific angles.

Returns
The number of specific angles. If there is no specific angle, only common content as in most cases, return 0.

◆ yuvPalette()

QtlByteBlock QtsDvdProgramChain::yuvPalette ( ) const
inline

Get the color palette of the title set in YUV format.

Typically used to render subtitles.

Returns
The palette in YUV format. Each entry contains 4 bytes: (0, Y, Cr, Cb).

◆ rgbPalette()

QtlByteBlock QtsDvdProgramChain::rgbPalette ( ) const

Get the color palette of the title set in RGB format.

Typically used to render subtitles.

Returns
The palette in RGB format. Each entry contains 4 bytes: (0, R, G, B).

◆ chapterCount()

int QtsDvdProgramChain::chapterCount ( ) const
inline

Get the number of chapters in this program chain.

Returns
The number of chapters in this program chain.

◆ chapters()

QtsDvdProgramChapterList QtsDvdProgramChain::chapters ( ) const
inline

Get the list of chapters in this program chain.

Note that a chapter is also named a "program" or a "part of a title" (PTT), a program chain (PGC) being a chain of chapters.

Returns
The list of chapters in this program chain.

◆ cellCount()

int QtsDvdProgramChain::cellCount ( ) const
inline

Get the number of cells in this program chain.

Returns
The number of cells in this program chain.

◆ cells()

QtsDvdProgramCellList QtsDvdProgramChain::cells ( ) const
inline

Get the list of cells in this program chain.

Returns
The list of cells in this program chain.

◆ totalSectorCount()

int QtsDvdProgramChain::totalSectorCount ( ) const

Get the total number of sectors in all cells.

Note that the actual number of sectors can be a bit smaller (see QtsDvdProgramCell::sectors()).

Returns
The total number of sectors in all cells.

◆ convertPaletteYuvToRgb()

void QtsDvdProgramChain::convertPaletteYuvToRgb ( QtlByteBlock palette,
QtlLogger log 
)
static

Convert a YUV palette into RGB.

Parameters
[in,out]palettePalette to modify. On input, each entry contains 4 bytes: (0, Y, Cr, Cb). On output, each entry contains 4 bytes: (0, R, G, B).
[in]logWhere to log errors.

◆ paletteToString()

QString QtsDvdProgramChain::paletteToString ( const QtlByteBlock palette)
static

Convert a YUV or RBG palette into a string.

Parameters
[in]palettePalette convert.
Returns
A string in the form "nnnnnn,nnnnnn,...".

◆ toPlaybackDuration()

int QtsDvdProgramChain::toPlaybackDuration ( quint32  value)
staticprivate

Decode a 32-bit value as a playback duration.

Parameters
[in]value32-bit value from the IFO file.
Returns
Decoded duration in seconds.

Member Data Documentation

◆ _nullLog

QtlNullLogger QtsDvdProgramChain::_nullLog
private

Dummy null logger if none specified by caller.

◆ _log

QtlLogger* QtsDvdProgramChain::_log
private

Where to log errors.

◆ _valid

bool QtsDvdProgramChain::_valid
private

Object is valid.

◆ _titleNumber

int QtsDvdProgramChain::_titleNumber
private

Title number in VTS.

◆ _duration

int QtsDvdProgramChain::_duration
private

Playback duration in seconds.

◆ _nextPgc

int QtsDvdProgramChain::_nextPgc
private

Next PGC to play.

◆ _previousPgc

int QtsDvdProgramChain::_previousPgc
private

Previous PGC to play.

◆ _parentPgc

int QtsDvdProgramChain::_parentPgc
private

Parent PGC.

◆ _angleCount

int QtsDvdProgramChain::_angleCount
private

Number of angles.

◆ _palette

QtlByteBlock QtsDvdProgramChain::_palette
private

VTS color palette in YUV format.

◆ _cells

QtsDvdProgramCellList QtsDvdProgramChain::_cells
private

List of cells in this program chain.

◆ _chapters

QtsDvdProgramChapterList QtsDvdProgramChain::_chapters
private

List of chapters in this program chain.


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