Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
\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 } |
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. | |
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 = Resolution + 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 | |
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 22 of file qmediametadata.h.
enum QMediaMetaData::Key |
Provides meta-data for media files.
\qmlvaluetype mediaMetaData \ingroup qmlvaluetypes \inqmlmodule QtMultimedia \since 6.2
! \instantiates 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
Definition at line 26 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 73 of file qmediametadata.h.
Referenced by QGstreamerMediaPlayer::setMedia(), and AVFMediaPlayer::setMedia().
|
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 68 of file qmediametadata.h.
Referenced by QAndroidMetaData::QAndroidMetaData(), QT_BEGIN_NAMESPACE::addTagsFromExtendedComment(), QT_BEGIN_NAMESPACE::addTagToMetaData(), QAndroidMetaData::extractMetadata(), AVFMetaData::fromAsset(), AVFMetaData::fromAssetTrack(), fromAVMetadata(), MFMetaData::fromNative(), QGstreamerImageCapture::probeBuffer(), QGstreamerMediaPlayer::processBusMessage(), and Q_LOGGING_CATEGORY().
|
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 75 of file qmediametadata.h.
Referenced by QGstreamerMediaPlayer::setMedia(), and AVFMediaPlayer::setMedia().
|
inline |
\qmlmethod list<Key> QtMultimedia::mediaMetaData::keys() Returns a list of MediaMetaData.Keys.
Returns a QList of QMediaMetaData::Keys.
Definition at line 70 of file qmediametadata.h.
Referenced by QImageCapture::addMetaData(), QMediaRecorder::addMetaData(), QT_BEGIN_NAMESPACE::addTagToMetaData(), applyMetaDataToTagSetter(), QGstreamerMediaPlayer::processBusMessage(), QFFmpegMetaData::toAVMetaData(), AVFMetaData::toAVMetadataForFormat(), and MFMetaData::toNative().
Returns the meta type used to store data for Key key.
Definition at line 81 of file qmediametadata.cpp.
References AlbumArtist, AlbumTitle, AudioBitRate, AudioCodec, Author, Comment, Composer, ContributingArtist, Copyright, CoverArtImage, Date, Description, Duration, FileFormat, Genre, Language, LeadPerformer, MediaType, Orientation, Publisher, Resolution, ThumbnailImage, Title, TrackNumber, Url, VideoBitRate, VideoCodec, and VideoFrameRate.
Referenced by QFFmpegMetaData::addEntry(), and QFFmpegMetaData::value().
|
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 423 of file qmediametadata.cpp.
References AlbumArtist, AlbumTitle, AudioBitRate, AudioCodec, Author, Comment, Composer, ContributingArtist, Copyright, CoverArtImage, Date, Description, Duration, FileFormat, Genre, Language, LeadPerformer, MediaType, Orientation, Publisher, Resolution, ThumbnailImage, Title, TrackNumber, QCoreApplication::translate(), Url, VideoBitRate, VideoCodec, and VideoFrameRate.
|
inline |
Returns data stored at the Key {k}.
Definition at line 72 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 69 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 360 of file qmediametadata.cpp.
References AlbumArtist, AlbumTitle, AudioBitRate, AudioCodec, QMediaFormat::audioCodecName(), Author, Comment, Composer, ContributingArtist, Copyright, CoverArtImage, Date, Description, Duration, FileFormat, QMediaFormat::fileFormatName(), QTime::fromMSecsSinceStartOfDay(), Genre, Language, QLocale::languageToString(), LeadPerformer, MediaType, Orientation, Publisher, QStringLiteral, Resolution, ThumbnailImage, time, Title, TrackNumber, Url, QVariant::value(), VideoBitRate, VideoCodec, QMediaFormat::videoCodecName(), and VideoFrameRate.
Referenced by MFMetaData::toNative().
|
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 67 of file qmediametadata.h.
References QVariant::value().
Referenced by QImageCapture::addMetaData(), QMediaRecorder::addMetaData(), applyMetaDataToTagSetter(), AVFMetaData::fromAssetTrack(), QGstreamerMediaPlayer::processBusMessage(), AVFMetaData::toAVMetadataForFormat(), MFMetaData::toNative(), and QFFmpegMetaData::value().
|
friend |
Compares two meta data objects a and b, and returns false
if they are identical or true
if they differ.
Definition at line 83 of file qmediametadata.h.
|
friend |
Compares two meta data objects a and b, and returns true
if they are identical or false
if they differ.
Definition at line 81 of file qmediametadata.h.
Definition at line 88 of file qmediametadata.h.
|
staticconstexpr |
Definition at line 64 of file qmediametadata.h.