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... | |
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.
QtsDvdProgramChain::QtsDvdProgramChain | ( | const QtlByteBlock & | ifo = QtlByteBlock() , |
int | index = -1 , |
||
int | titleNumber = 0 , |
||
const QtsDvdOriginalCellList & | originalCells = QtsDvdOriginalCellList() , |
||
QtlLogger * | log = 0 |
||
) |
Constructor.
[in] | ifo | Content of the IFO file. |
[in] | index | Starting index of the PGC data in ifo. |
[in] | titleNumber | Title number in VTS. First title is #1. |
[in] | originalCells | List of cells in original input files. |
[in] | log | Where to log errors. |
|
inline |
Check if the Program Chain data was correctly analyzed.
|
inline |
Get the title number of this PCG inside the VTS.
|
inline |
Get the title number of the next PCG to play after this one inside the VTS.
|
inline |
Get the title number of the previous PCG to play before this one inside the VTS.
|
inline |
Get the title number of the parent PCG of this one inside the VTS.
|
inline |
Get the title set playback duration in seconds.
|
inline |
Get the number of specific angles.
|
inline |
Get the color palette of the title set in YUV format.
Typically used to render subtitles.
QtlByteBlock QtsDvdProgramChain::rgbPalette | ( | ) | const |
Get the color palette of the title set in RGB format.
Typically used to render subtitles.
|
inline |
Get the number of chapters in this program chain.
|
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.
|
inline |
Get the number of cells in this program chain.
|
inline |
Get the list of cells in this program chain.
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()).
|
static |
Convert a YUV palette into RGB.
[in,out] | palette | Palette 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] | log | Where to log errors. |
|
static |
Convert a YUV or RBG palette into a string.
[in] | palette | Palette convert. |
|
staticprivate |
Decode a 32-bit value as a playback duration.
[in] | value | 32-bit value from the IFO file. |
|
private |
Dummy null logger if none specified by caller.
|
private |
Where to log errors.
|
private |
Object is valid.
|
private |
Title number in VTS.
|
private |
Playback duration in seconds.
|
private |
Next PGC to play.
|
private |
Previous PGC to play.
|
private |
Parent PGC.
|
private |
Number of angles.
|
private |
VTS color palette in YUV format.
|
private |
List of cells in this program chain.
|
private |
List of chapters in this program chain.