QMediaMetaData Class▲
- 
					Header: QMediaMetaData 
- 
					CMake: find_package(Qt6 REQUIRED COMPONENTS Multimedia) target_link_libraries(mytarget PRIVATE Qt6::Multimedia) 
- 
					qmake: QT += multimedia 
Detailed Description▲
Not all identifiers are supported on all platforms.
| Common attributes | ||
|---|---|---|
| Value | Description | Type | 
| Title | The title of the media. | |
| Author | The authors of the media. | |
| Comment | A user comment about the media. | |
| Description | A description of the media. | |
| Genre | The genre of the media. | |
| Date | The date of the media. | |
| Language | The language of media. | |
| Publisher | The publisher of the media. | |
| Copyright | The media's copyright notice. | |
| Url | A Url pointing to the origin of the media. | 
| Media attributes | ||
|---|---|---|
| The type of the media (audio, video, etc). | ||
| The file format of the media. | ||
| Duration | The duration in millseconds of the media. | qint64 | 
| Audio attributes | ||
|---|---|---|
| The bit rate of the media's audio stream in bits per second. | int | |
| The codec of the media's audio stream. | 
| Video attributes | ||
|---|---|---|
| The frame rate of the media's video stream. | qreal | |
| The bit rate of the media's video stream in bits per second. | int | |
| The codec of the media's video stream. | 
| Music attributes | ||
|---|---|---|
| The title of the album the media belongs to. | ||
| The principal artist of the album the media belongs to. | ||
| The artists contributing to the media. | ||
| The track number of the media. | int | |
| Composer | The composer of the media. | |
| The lead performer in the media. | ||
| An embedded thumbnail image. | ||
| An embedded cover art image. | 
| Image and video attributes | ||
|---|---|---|
| Orientation | The rotation angle of an image or video. | int | 
| Resolution | The dimensions of an image or video. | 
Member Type Documentation▲
enum QMediaMetaData::Key▲
The following meta data keys can be used:
| Constant | Value | Description | 
|---|---|---|
| QMediaMetaData::Title | 0 | Media title | 
| QMediaMetaData::Author | 1 | Media author | 
| QMediaMetaData::Comment | 2 | Comment | 
| QMediaMetaData::Description | 3 | Brief desripttion | 
| QMediaMetaData::Genre | 4 | Genre the media belongs to | 
| QMediaMetaData::Date | 5 | Creation date | 
| QMediaMetaData::Language | 6 | Media language | 
| QMediaMetaData::Publisher | 7 | Media publisher info. | 
| QMediaMetaData::Copyright | 8 | Media copyright info. | 
| QMediaMetaData::Url | 9 | Publisher's website URL | 
| QMediaMetaData::Duration | 10 | Media playback duration | 
| QMediaMetaData::MediaType | 11 | Type of the media | 
| QMediaMetaData::FileFormat | 12 | File format | 
| QMediaMetaData::AudioBitRate | 13 | |
| QMediaMetaData::AudioCodec | 14 | |
| QMediaMetaData::VideoBitRate | 15 | |
| QMediaMetaData::VideoCodec | 16 | |
| QMediaMetaData::VideoFrameRate | 17 | |
| QMediaMetaData::AlbumTitle | 18 | Album's title | 
| QMediaMetaData::AlbumArtist | 19 | Artist's info. | 
| QMediaMetaData::ContributingArtist | 20 | |
| QMediaMetaData::TrackNumber | 21 | |
| QMediaMetaData::Composer | 22 | Media composer's info. | 
| QMediaMetaData::LeadPerformer | 23 | |
| QMediaMetaData::ThumbnailImage | 24 | Media thumbnail image | 
| QMediaMetaData::CoverArtImage | 25 | Media cover art | 
| QMediaMetaData::Orientation | 26 | |
| QMediaMetaData::Resolution | 27 | 
Member Function Documentation▲
void QMediaMetaData::clear()▲
Removes all data from the meta data object.
void QMediaMetaData::insert(QMediaMetaData::Key k, const QVariant &value)▲
Inserts a value into a Key: k.
bool QMediaMetaData::isEmpty() const▲
Returns true if the meta data contains no items: otherwise returns false.
[static protected] QMetaType QMediaMetaData::keyType(QMediaMetaData::Key key)▲
Returns the meta type used to store data for Key key.
QList<QMediaMetaData::Key> QMediaMetaData::keys() const▲
Returns a QList of QMediaMetaData::Keys.
[static] QString QMediaMetaData::metaDataKeyToString(QMediaMetaData::Key key)▲
returns a string representation of key that can be used when presenting meta data to users.
void QMediaMetaData::remove(QMediaMetaData::Key k)▲
Removes meta data from a Key: k.
QString QMediaMetaData::stringValue(QMediaMetaData::Key key) const▲
Returns the meta data for key key as a QString.
This is mainly meant to simplify presenting the meta data to a user.
QVariant QMediaMetaData::value(QMediaMetaData::Key key) const▲
Returns the meta data value for Key key, or a null QVariant if no meta data for the key is available.
QVariant &QMediaMetaData::operator[](QMediaMetaData::Key k)▲
Returns data stored at the Key k.
QMediaMetaData rockBallad1;
rockBalad[QMediaMetaData::Genre]="Rock"Member Variable Documentation▲
QHash<QMediaMetaData::Key, QVariant> QMediaMetaData::data▲
This variable holds the meta data.
this is a protected member of its class.
Related Non-Members▲
bool operator!=(const QMediaMetaData &a, const QMediaMetaData &b)▲
Compares two meta data objects a and b, and returns false if they are identical or true if they differ.
bool operator==(const QMediaMetaData &a, const QMediaMetaData &b)▲
Compares two meta data objects a and b, and returns true if they are identical or false if they differ.




