Description of a "Title Set" in a DVD. More...
Public Member Functions | |
| QtsDvdTitleSet (const QString &fileName=QString(), QtlLogger *log=0) | |
| Constructor. More... | |
| QtsDvdTitleSet (const QtsDvdTitleSet &other) | |
| Copy constructor. More... | |
| QtsDvdProgramChainList | allTitles (int titleNumber) const |
| Get the description of all sequential titles (or program chain, or PGC) in the title set. More... | |
| int | allTitlesDurationInSeconds (int titleNumber) const |
| Get the duration of all sequential titles (or program chain, or PGC) in the title set. More... | |
| void | clear () |
| Clear object content. More... | |
| QString | deviceName () const |
| Get the device name of the DVD reader containing the title set. More... | |
| QString | ifoFileName () const |
| Get the full absolute file name of the IFO file for the title set. More... | |
| bool | isEncrypted () const |
| Check if the title set is on an encrypted DVD media. More... | |
| bool | isLoaded () const |
| Check if a title set was successfully loaded. More... | |
| bool | load (const QString &fileName=QString(), const QtsDvdMedia *dvd=0) |
| Load the description of a title set. More... | |
| int | longestDurationInSeconds () const |
| Get the longest duration of all sets of sequential titles in the title set. More... | |
| int | maximumAngleCount () const |
| Get the maximum number of specific angles in all titles. More... | |
| QtsDvdOriginalCellList | originalCells () const |
| Get the list of cells in original VOB files, before DVD production. More... | |
| int | originalVobCount () const |
| Get the number of original input VOB's, before DVD production. More... | |
| int | streamCount () const |
| Get the number of video, audio and subtitle streams in the title set. More... | |
| QtlMediaStreamInfoList | streams () const |
| Get the description of all video, audio and subtitle streams in the title set. More... | |
| QtsDvdProgramChainPtr | title (int titleNumber) const |
| Get the description of a given title (or program chain, or PGC) in the title set. More... | |
| int | titleCount () const |
| Get the number of titles (or program chains, or PGC) in the title set. More... | |
| int | vobCount () const |
| Get the number of VOB files for the title set. More... | |
| QStringList | vobFileNames () const |
| Get the list of VOB files for the title set. More... | |
| int | vobSectorCount () const |
| Get the total size in sectors of the MPEG content of the VTS. More... | |
| qint64 | vobSizeInBytes () const |
| Get the total size in bytes of all VOB's. More... | |
| int | vobStartSector () const |
| Get the first sector of the MPEG content of the VTS on DVD media. More... | |
| QString | volumeId () const |
| Get the volume identifier of the DVD. More... | |
| int | volumeSizeInSectors () const |
| Get the volume size (in sectors) of the DVD. More... | |
| int | vtsNumber () const |
| Get the "title set number", ie the "nn" in "VTS_nn_0.IFO". More... | |
Static Public Member Functions | |
| static bool | isDvdTitleSetFileName (const QString &fileName) |
| Check if a file is a .IFO or .VOB. More... | |
| static bool | lessThan (const QtlMediaStreamInfoPtr &p1, const QtlMediaStreamInfoPtr &p2) |
| Compare two QtlMediaStreamInfoPtr for DVD stream ordering. More... | |
Private Member Functions | |
| bool | buildFileNames (const QString &fileName) |
| Build the IFO and VOB file names for the VTS. More... | |
| bool | readVtsIfo () |
| Read the content of the VTS IFO. More... | |
Private Attributes | |
| QString | _deviceName |
| DVD device name. More... | |
| QString | _ifoFileName |
| IFO file name. More... | |
| bool | _isEncrypted |
| DVD is encrypted, need libdvdcss. More... | |
| QtlLogger * | _log |
| Where to log errors. More... | |
| QtlNullLogger | _nullLog |
| Dummy null logger if none specified by caller. More... | |
| QtsDvdOriginalCellList | _originalCells |
| List of cells in original input files. More... | |
| int | _originalVobCount |
| Number of original input VOB's, before DVD production. More... | |
| QtsDvdProgramChainList | _pgcs |
| List program chains in the VTS. More... | |
| QtlMediaStreamInfoList | _streams |
| List of streams in the VTS. More... | |
| QStringList | _vobFileNames |
| List of VOB files. More... | |
| qint64 | _vobSizeInBytes |
| Total size in bytes of all VOB's. More... | |
| int | _vobStartSector |
| First sector of VOB files on DVD media. More... | |
| QString | _volumeId |
| Volume identifier. More... | |
| int | _volumeSectors |
| Volume size in sectors. More... | |
| int | _vtsNumber |
| Title set number. More... | |
Description of a "Title Set" in a DVD.
A "standard" DVD structure contains one or more "video title set" (VTS). Each VTS is a movie, documentary, bonus, etc. The VTS are numbered on two digits "nn" (01, 02, etc.) Each VTS contains the following files:
The complete MPEG-PS content of the movie is simply the concatenation of all .VOB file. There are at most 9 VOB files per VTS (1GB per VOB).
The content of a VTS is physically contiguous on the DVD, starting from VTS_nn_0.VOB, VTS_nn_1.VOB, etc., ending with the VTS_nn_0.BUP.
| QtsDvdTitleSet::QtsDvdTitleSet | ( | const QString & | fileName = QString(), |
| QtlLogger * | log = 0 |
||
| ) |
Constructor.
| [in] | fileName | Name of the IFO file or name of one of the VOB files in the title set. |
| [in] | log | Where to log errors. |
|
explicit |
Copy constructor.
| [in] | other | Other instance to copy (except parent). |
| bool QtsDvdTitleSet::load | ( | const QString & | fileName = QString(), |
| const QtsDvdMedia * | dvd = 0 |
||
| ) |
Load the description of a title set.
| [in] | fileName | Name of the IFO file or name of one of the VOB files in the title set. |
| [in] | dvd | If the caller already knows that the file is on a DVD media and this DVD media is already open, pass it as an optimization. This is optional, using 0 always works. |
| void QtsDvdTitleSet::clear | ( | ) |
Clear object content.
|
inline |
Check if a title set was successfully loaded.
|
inline |
Get the "title set number", ie the "nn" in "VTS_nn_0.IFO".
|
inline |
Get the number of titles (or program chains, or PGC) in the title set.
|
inline |
Get the description of a given title (or program chain, or PGC) in the title set.
| [in] | titleNumber | The title number to get. The first title in the VTS is #1. |
| QtsDvdProgramChainList QtsDvdTitleSet::allTitles | ( | int | titleNumber | ) | const |
Get the description of all sequential titles (or program chain, or PGC) in the title set.
Sometimes, a PGC is not viewed alone, it can have a previous or next PCG to play in sequence. While title() returns only the description of a given title, allTitles() returns the list of all PGC's that should be played in sequence.
| [in] | titleNumber | A title number to get. The first title in the VTS is #1. |
| int QtsDvdTitleSet::allTitlesDurationInSeconds | ( | int | titleNumber | ) | const |
Get the duration of all sequential titles (or program chain, or PGC) in the title set.
| [in] | titleNumber | A title number to get. The first title in the VTS is #1. |
| int QtsDvdTitleSet::longestDurationInSeconds | ( | ) | const |
Get the longest duration of all sets of sequential titles in the title set.
For each title, we consider the full sequence, using its previous and next title.
| int QtsDvdTitleSet::maximumAngleCount | ( | ) | const |
Get the maximum number of specific angles in all titles.
|
inline |
Get the full absolute file name of the IFO file for the title set.
|
inline |
Get the number of VOB files for the title set.
|
inline |
Get the list of VOB files for the title set.
|
inline |
Get the total size in bytes of all VOB's.
|
inline |
Check if the title set is on an encrypted DVD media.
|
inline |
Get the device name of the DVD reader containing the title set.
The returned device name can be used by libdvdcss.
|
inline |
Get the volume identifier of the DVD.
|
inline |
Get the volume size (in sectors) of the DVD.
|
inline |
Get the first sector of the MPEG content of the VTS on DVD media.
All VOB's of a given title set are always contiguous on a DVD media.
|
inline |
Get the total size in sectors of the MPEG content of the VTS.
|
inline |
Get the number of video, audio and subtitle streams in the title set.
|
inline |
Get the description of all video, audio and subtitle streams in the title set.
|
inline |
Get the number of original input VOB's, before DVD production.
|
inline |
Get the list of cells in original VOB files, before DVD production.
This is different from the cells inside a Program Chain which describe a cell inside the VOB files of the DVD.
|
static |
Check if a file is a .IFO or .VOB.
| [in] | fileName | Name of a file. |
|
static |
Compare two QtlMediaStreamInfoPtr for DVD stream ordering.
We reorder stream in "DVD order" for user convenience.
| [in] | p1 | First pointer. |
| [in] | p2 | Second pointer. |
|
private |
Build the IFO and VOB file names for the VTS.
Also compute the total VOB size.
| [in] | fileName | Name of the IFO file or name of one of the VOB files in the title set. |
|
private |
Read the content of the VTS IFO.
|
private |
Dummy null logger if none specified by caller.
|
private |
Where to log errors.
|
private |
DVD device name.
|
private |
Volume identifier.
|
private |
Volume size in sectors.
|
private |
DVD is encrypted, need libdvdcss.
|
private |
Title set number.
|
private |
IFO file name.
|
private |
List of VOB files.
|
private |
Total size in bytes of all VOB's.
|
private |
First sector of VOB files on DVD media.
|
private |
Number of original input VOB's, before DVD production.
|
private |
List of streams in the VTS.
|
private |
List program chains in the VTS.
|
private |
List of cells in original input files.