DragonCdToc Class

The table of contents of an audio CD. More...

Header: #include <DragonCdToc>
CMake: find_package(DragonMediaBackend REQUIRED COMPONENTS DragonMediaBackend)
target_link_libraries(mytarget PRIVATE DragonMediaBackend::DragonMediaBackend)
In QML: dragonCdToc

Properties

Public Functions

DragonCdToc()
DragonCdToc(const DragonCdToc &other)
DragonCdToc(DragonCdToc &&other)
QList<quint32> cddbTrackOffsetList() const
QString device() const
std::chrono::milliseconds discDuration() const
int leadOutFrame() const
QList<DragonCdTrack> tracks() const
DragonCdToc &operator=(DragonCdToc &&other)
DragonCdToc &operator=(const DragonCdToc &other)
bool operator==(const DragonCdToc &other) const

Detailed Description

DragonCdToc contains the 'table of contents' of the audio CD. The table of contents is essential metadata necessary to play the CD. It's located at the very start of the CD. Learn more at the {https://en.wikipedia.org/wiki/Compact_Disc_Digital_Audio#Technical_specifications} {Wikipedia article on Audio CD spec}.

Using this metadata you can look up album, artist and track titles from the Internet, with a library like KCDDB.

Obtain a DragonCdToc from the DragonCdTocReader::tocReady() signal.

See also DragonCdTrack and DragonCdTocReader.

Property Documentation

[read-only] device : const QString

The device this TOC was read from.

Access functions:

QString device() const

[read-only] discDuration : const DragonDuration

The total playable duration of the disc.

Access functions:

std::chrono::milliseconds discDuration() const

[read-only] leadOutFrame : const int

The lead-out position of the disc in audio frames (also called sectors), the end of the program portion of the disc.

In CDDB terms, it is the disc length.

Learn more at the Wikipedia article on optical disc tracks.

Access functions:

int leadOutFrame() const

[read-only] tracks : const QList<DragonCdTrack>

All tracks of the disc in TOC order.

Access functions:

QList<DragonCdTrack> tracks() const

Member Function Documentation

DragonCdToc::DragonCdToc()

Constructs a placeholder TOC with no tracks and a zero duration. Real TOCs arrive via DragonCdTocReader::tocReady().

DragonCdToc::DragonCdToc(const DragonCdToc &other)

Copies other. The underlying data is implicitly shared.

[noexcept] DragonCdToc::DragonCdToc(DragonCdToc &&other)

Move-constructs the TOC of other, which is left as a placeholder.

QList<quint32> DragonCdToc::cddbTrackOffsetList() const

Returns the CDDB signature of this disc: every track's start frame in TOC order, followed by the lead-out frame. The list matches KCDDB::TrackOffsetList and can be passed to KCDDB::Client::lookup() unchanged.

QString DragonCdToc::device() const

The device this TOC was read from.

Note: Getter function for property device.

std::chrono::milliseconds DragonCdToc::discDuration() const

Returns the total playable duration.

Note: Getter function for property discDuration.

int DragonCdToc::leadOutFrame() const

The lead-out position of the disc in audio frames (also called sectors), the end of the program portion of the disc.

In CDDB terms, it is the disc length.

Learn more at the Wikipedia article on optical disc tracks.

Note: Getter function for property leadOutFrame.

QList<DragonCdTrack> DragonCdToc::tracks() const

Returns all tracks in TOC order.

Note: Getter function for property tracks.

[noexcept] DragonCdToc &DragonCdToc::operator=(DragonCdToc &&other)

Move-assigns the TOC of other, which is left as a placeholder.

DragonCdToc &DragonCdToc::operator=(const DragonCdToc &other)

Assigns other to this object. The underlying data is implicitly shared.

bool DragonCdToc::operator==(const DragonCdToc &other) const

Returns true if other describes the same disc.