![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
\inmodule QtMultimedia More...
#include <qmediametadata.h>
Public Types | |
enum | Key { Title , Author , Comment , Description , Genre , Date , Language , Publisher , Copyright , Url , Duration , MediaType , FileFormat , AudioBitRate , AudioCodec , VideoBitRate , VideoCodec , VideoFrameRate , AlbumTitle , AlbumArtist , ContributingArtist , TrackNumber , Composer , LeadPerformer , ThumbnailImage , CoverArtImage , Orientation , Resolution , HasHdrContent } |
Provides meta-data for media files. More... |
Public Member Functions | |
Q_INVOKABLE QVariant | value (Key k) const |
\variable QMediaMetaData::NumMetaData | |
Q_INVOKABLE void | insert (Key k, const QVariant &value) |
\qmlmethod void QtMultimedia::mediaMetaData::insert(Key k, variant value) Inserts a value into a Key: {k}. | |
Q_INVOKABLE void | remove (Key k) |
\qmlmethod void QtMultimedia::mediaMetaData::remove(Key k) Removes meta data from a Key: {k}. | |
Q_INVOKABLE QList< Key > | keys () const |
\qmlmethod list<Key> QtMultimedia::mediaMetaData::keys() Returns a list of MediaMetaData.Keys. | |
QVariant & | operator[] (Key k) |
Returns data stored at the Key {k}. | |
Q_INVOKABLE void | clear () |
\qmlmethod void QtMultimedia::mediaMetaData::clear() Removes all data from the MediaMetaData object. | |
Q_INVOKABLE bool | isEmpty () const |
\qmlmethod bool QtMultimedia::mediaMetaData::isEmpty() Returns true if the meta data contains no items: otherwise returns {false}. | |
Q_INVOKABLE QString | stringValue (Key k) const |
\qmlmethod string QtMultimedia::mediaMetaData::stringValue(Key key) Returns the meta data for key key as a QString. | |
QT_POST_CXX17_API_IN_EXPORTED_CLASS auto | asKeyValueRange () const |
\variable QMediaMetaData::data |
Static Public Member Functions | |
static Q_INVOKABLE QString | metaDataKeyToString (Key k) |
\qmlmethod string QtMultimedia::mediaMetaData::metaDataKeyToString(Key key) returns a string representation of key that can be used when presenting meta data to users. |
Static Public Attributes | |
static constexpr int | NumMetaData = HasHdrContent + 1 |
Static Protected Member Functions | |
static QMetaType | keyType (Key key) |
Returns the meta type used to store data for Key key. |
Protected Attributes | |
QHash< Key, QVariant > | data |
Friends | |
Q_MULTIMEDIA_EXPORT friend QDebug | operator<< (QDebug dbg, const QMediaMetaData &metaData) |
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. | |
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. |
\inmodule QtMultimedia
Provides meta-data for media files.
\table 60% \header
\row
\header
\header
\header
\header
\row
\header
\endtable
Definition at line 18 of file qmediametadata.h.
enum QMediaMetaData::Key |
Provides meta-data for media files.
\qmlvaluetype mediaMetaData \ingroup qmlvaluetypes \inqmlmodule QtMultimedia \since 6.2
! \nativetype QMediaMetaData
Meta-data is supplementary data describing media. See QMediaMetaData for available meta data attributes.
The following meta data keys can be used:
\value Title Media title \value Author Media author \value Comment Comment \value Description Brief desripttion \value Genre Genre the media belongs to \value Date Creation date \value Language Media language \value Publisher Media publisher info. \value Copyright Media copyright info. \value Url Publisher's website URL \value Duration Media playback duration \value MediaType Type of the media \value FileFormat File format \value AudioBitRate \value AudioCodec \value VideoBitRate \value VideoCodec \value VideoFrameRate \value AlbumTitle Album's title \value AlbumArtist Artist's info. \value ContributingArtist \value TrackNumber \value Composer Media composer's info. \value LeadPerformer \value ThumbnailImage Media thumbnail image (if embedded in metadata) \value CoverArtImage Media cover art \value Orientation \value Resolution \value [since 6.8] HasHdrContent Video may have HDR content (read only, FFmpeg and Darwin media backends only)
Definition at line 22 of file qmediametadata.h.
|
inline |
\variable QMediaMetaData::data
the meta data.
protected
member of its class.Returns a range object that allows iteration over this hash as key/value pairs.
Definition at line 79 of file qmediametadata.h.
|
inline |
\qmlmethod void QtMultimedia::mediaMetaData::clear() Removes all data from the MediaMetaData object.
Removes all data from the meta data object.
Definition at line 71 of file qmediametadata.h.
|
inline |
\qmlmethod void QtMultimedia::mediaMetaData::insert(Key k, variant value) Inserts a value into a Key: {k}.
Inserts a value into a Key: {k}.
Definition at line 66 of file qmediametadata.h.
|
inline |
\qmlmethod bool QtMultimedia::mediaMetaData::isEmpty() Returns true
if the meta data contains no items: otherwise returns {false}.
Returns true
if the meta data contains no items: otherwise returns {false}.
Definition at line 73 of file qmediametadata.h.
|
inline |
\qmlmethod list<Key> QtMultimedia::mediaMetaData::keys() Returns a list of MediaMetaData.Keys.
Returns a QList of QMediaMetaData::Keys.
Definition at line 68 of file qmediametadata.h.
Returns the meta type used to store data for Key key.
Definition at line 83 of file qmediametadata.cpp.
|
static |
\qmlmethod string QtMultimedia::mediaMetaData::metaDataKeyToString(Key key) returns a string representation of key that can be used when presenting meta data to users.
returns a string representation of key that can be used when presenting meta data to users.
Definition at line 431 of file qmediametadata.cpp.
|
inline |
Returns data stored at the Key {k}.
Definition at line 70 of file qmediametadata.h.
|
inline |
\qmlmethod void QtMultimedia::mediaMetaData::remove(Key k) Removes meta data from a Key: {k}.
Removes meta data from a Key: {k}.
Definition at line 67 of file qmediametadata.h.
QString QMediaMetaData::stringValue | ( | QMediaMetaData::Key | key | ) | const |
\qmlmethod string QtMultimedia::mediaMetaData::stringValue(Key key) Returns the meta data for key key as a QString.
This is mainly meant to simplify presenting the meta data to a user.
Returns the meta data for key key as a QString.
This is mainly meant to simplify presenting the meta data to a user.
Definition at line 367 of file qmediametadata.cpp.
|
inline |
\variable QMediaMetaData::NumMetaData
\qmlmethod variant QtMultimedia::mediaMetaData::value(Key key)
Returns the meta data value for Key key, or a null QVariant if no meta-data for the key is available.
Returns the meta data value for Key key, or a null QVariant if no meta data for the key is available.
Definition at line 65 of file qmediametadata.h.
|
friend |
Compares two meta data objects a and b, and returns false
if they are identical or true
if they differ.
Definition at line 86 of file qmediametadata.h.
|
friend |
Definition at line 496 of file qmediametadata.cpp.
|
friend |
Compares two meta data objects a and b, and returns true
if they are identical or false
if they differ.
Definition at line 84 of file qmediametadata.h.
Definition at line 91 of file qmediametadata.h.
|
staticconstexpr |
Definition at line 62 of file qmediametadata.h.