Media information data types

The data types defined in types.h store information about accessible media files, the active tracksession, the currently selected track, supported metadata fields, and playback state. These data types are used in QPlayer function calls to specify media commands and store their outcomes.

The PlayerState class defines fields for a player's shuffle and repeat settings as well as its playback status (e.g., PLAYING, STOPPED) and current playback rate (speed). When one of these playback settings changes for an active player, the QPlayer API emits a signal containing a PlayerState object that stores the player's latest state.

The QPlayer API also allows you to retrieve a list of accessible media sources. The MediaSource objects in this list each contain the unique ID, name, hardware type, and other information describing a particular media source. The API function that searches a media source for playable content returns a list of MediaNode objects, each of which stores the properties of an element found within the media source. These properties include the media node's type, its unique ID, its URL, and more.

A TrackSession object stores only its tracksession ID and length (i.e., number of tracks). Each Track object references its related TrackSession, MediaNode, and Metadata object. This last object stores the track's metadata fields, such as the artist name, album title, year of release, the URL of a coverart file, and video dimensions.