Changed metadata keys type from enum to QString.
This allows to combine metaData and extendedMetaData and simplify metadata handling on both backend and application sides. Change-Id: I136eedc86c215be3485db101c43069ca7c82101b Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
This commit is contained in:
committed by
Qt by Nokia
parent
382ba7d4f4
commit
8ff5b88b27
@@ -177,14 +177,14 @@ void Player::positionChanged(qint64 progress)
|
|||||||
|
|
||||||
void Player::metaDataChanged()
|
void Player::metaDataChanged()
|
||||||
{
|
{
|
||||||
//qDebug() << "update metadata" << player->metaData(QtMultimedia::Title).toString();
|
//qDebug() << "update metadata" << player->metaData(QtMultimedia::MetaData::Title).toString();
|
||||||
if (player->isMetaDataAvailable()) {
|
if (player->isMetaDataAvailable()) {
|
||||||
setTrackInfo(QString("%1 - %2")
|
setTrackInfo(QString("%1 - %2")
|
||||||
.arg(player->metaData(QtMultimedia::AlbumArtist).toString())
|
.arg(player->metaData(QtMultimedia::MetaData::AlbumArtist).toString())
|
||||||
.arg(player->metaData(QtMultimedia::Title).toString()));
|
.arg(player->metaData(QtMultimedia::MetaData::Title).toString()));
|
||||||
|
|
||||||
if (coverLabel) {
|
if (coverLabel) {
|
||||||
QUrl url = player->metaData(QtMultimedia::CoverArtUrlLarge).value<QUrl>();
|
QUrl url = player->metaData(QtMultimedia::MetaData::CoverArtUrlLarge).value<QUrl>();
|
||||||
|
|
||||||
coverLabel->setPixmap(!url.isEmpty()
|
coverLabel->setPixmap(!url.isEmpty()
|
||||||
? QPixmap(url.toString())
|
? QPixmap(url.toString())
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ void Camera::setCamera(const QByteArray &cameraDevice)
|
|||||||
connect(mediaRecorder, SIGNAL(durationChanged(qint64)), this, SLOT(updateRecordTime()));
|
connect(mediaRecorder, SIGNAL(durationChanged(qint64)), this, SLOT(updateRecordTime()));
|
||||||
connect(mediaRecorder, SIGNAL(error(QMediaRecorder::Error)), this, SLOT(displayRecorderError()));
|
connect(mediaRecorder, SIGNAL(error(QMediaRecorder::Error)), this, SLOT(displayRecorderError()));
|
||||||
|
|
||||||
mediaRecorder->setMetaData(QtMultimedia::Title, QVariant(QLatin1String("Test Title")));
|
mediaRecorder->setMetaData(QtMultimedia::MetaData::Title, QVariant(QLatin1String("Test Title")));
|
||||||
|
|
||||||
connect(ui->exposureCompensation, SIGNAL(valueChanged(int)), SLOT(setExposureCompensation(int)));
|
connect(ui->exposureCompensation, SIGNAL(valueChanged(int)), SLOT(setExposureCompensation(int)));
|
||||||
|
|
||||||
|
|||||||
@@ -221,14 +221,13 @@ void Player::positionChanged(qint64 progress)
|
|||||||
|
|
||||||
void Player::metaDataChanged()
|
void Player::metaDataChanged()
|
||||||
{
|
{
|
||||||
//qDebug() << "update metadata" << player->metaData(QtMultimedia::Title).toString();
|
|
||||||
if (player->isMetaDataAvailable()) {
|
if (player->isMetaDataAvailable()) {
|
||||||
setTrackInfo(QString("%1 - %2")
|
setTrackInfo(QString("%1 - %2")
|
||||||
.arg(player->metaData(QtMultimedia::AlbumArtist).toString())
|
.arg(player->metaData(QtMultimedia::MetaData::AlbumArtist).toString())
|
||||||
.arg(player->metaData(QtMultimedia::Title).toString()));
|
.arg(player->metaData(QtMultimedia::MetaData::Title).toString()));
|
||||||
|
|
||||||
if (coverLabel) {
|
if (coverLabel) {
|
||||||
QUrl url = player->metaData(QtMultimedia::CoverArtUrlLarge).value<QUrl>();
|
QUrl url = player->metaData(QtMultimedia::MetaData::CoverArtUrlLarge).value<QUrl>();
|
||||||
|
|
||||||
coverLabel->setPixmap(!url.isEmpty()
|
coverLabel->setPixmap(!url.isEmpty()
|
||||||
? QPixmap(url.toString())
|
? QPixmap(url.toString())
|
||||||
|
|||||||
@@ -346,7 +346,7 @@ Item {
|
|||||||
|
|
||||||
This property holds the title of the media.
|
This property holds the title of the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::Title}
|
\sa {QtMultimedia::MetaData::Title}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -354,7 +354,7 @@ Item {
|
|||||||
|
|
||||||
This property holds the sub-title of the media.
|
This property holds the sub-title of the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::SubTitle}
|
\sa {QtMultimedia::MetaData::SubTitle}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -362,7 +362,7 @@ Item {
|
|||||||
|
|
||||||
This property holds the author of the media.
|
This property holds the author of the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::Author}
|
\sa {QtMultimedia::MetaData::Author}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -370,7 +370,7 @@ Item {
|
|||||||
|
|
||||||
This property holds a user comment about the media.
|
This property holds a user comment about the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::Comment}
|
\sa {QtMultimedia::MetaData::Comment}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -378,7 +378,7 @@ Item {
|
|||||||
|
|
||||||
This property holds a description of the media.
|
This property holds a description of the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::Description}
|
\sa {QtMultimedia::MetaData::Description}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -386,7 +386,7 @@ Item {
|
|||||||
|
|
||||||
This property holds the category of the media
|
This property holds the category of the media
|
||||||
|
|
||||||
\sa {QtMultimedia::Category}
|
\sa {QtMultimedia::MetaData::Category}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -394,7 +394,7 @@ Item {
|
|||||||
|
|
||||||
This property holds the genre of the media.
|
This property holds the genre of the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::Genre}
|
\sa {QtMultimedia::MetaData::Genre}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -402,7 +402,7 @@ Item {
|
|||||||
|
|
||||||
This property holds the year of release of the media.
|
This property holds the year of release of the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::Year}
|
\sa {QtMultimedia::MetaData::Year}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -410,7 +410,7 @@ Item {
|
|||||||
|
|
||||||
This property holds the date of the media.
|
This property holds the date of the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::Date}
|
\sa {QtMultimedia::MetaData::Date}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -418,7 +418,7 @@ Item {
|
|||||||
|
|
||||||
This property holds a user rating of the media in the range of 0 to 100.
|
This property holds a user rating of the media in the range of 0 to 100.
|
||||||
|
|
||||||
\sa {QtMultimedia::UserRating}
|
\sa {QtMultimedia::MetaData::UserRating}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -426,7 +426,7 @@ Item {
|
|||||||
|
|
||||||
This property holds a list of keywords describing the media.
|
This property holds a list of keywords describing the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::Keywords}
|
\sa {QtMultimedia::MetaData::Keywords}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -434,7 +434,7 @@ Item {
|
|||||||
|
|
||||||
This property holds the language of the media, as an ISO 639-2 code.
|
This property holds the language of the media, as an ISO 639-2 code.
|
||||||
|
|
||||||
\sa {QtMultimedia::Language}
|
\sa {QtMultimedia::MetaData::Language}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -442,7 +442,7 @@ Item {
|
|||||||
|
|
||||||
This property holds the publisher of the media.
|
This property holds the publisher of the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::Publisher}
|
\sa {QtMultimedia::MetaData::Publisher}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -450,7 +450,7 @@ Item {
|
|||||||
|
|
||||||
This property holds the media's copyright notice.
|
This property holds the media's copyright notice.
|
||||||
|
|
||||||
\sa {QtMultimedia::Copyright}
|
\sa {QtMultimedia::MetaData::Copyright}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -458,7 +458,7 @@ Item {
|
|||||||
|
|
||||||
This property holds the parental rating of the media.
|
This property holds the parental rating of the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::ParentalRating}
|
\sa {QtMultimedia::MetaData::ParentalRating}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -467,7 +467,7 @@ Item {
|
|||||||
This property holds the name of the rating organization responsible for the
|
This property holds the name of the rating organization responsible for the
|
||||||
parental rating of the media.
|
parental rating of the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::RatingOrganization}
|
\sa {QtMultimedia::MetaData::RatingOrganization}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -475,7 +475,7 @@ Item {
|
|||||||
|
|
||||||
This property property holds the size of the media in bytes.
|
This property property holds the size of the media in bytes.
|
||||||
|
|
||||||
\sa {QtMultimedia::Size}
|
\sa {QtMultimedia::MetaData::Size}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -483,7 +483,7 @@ Item {
|
|||||||
|
|
||||||
This property holds the type of the media.
|
This property holds the type of the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::MediaType}
|
\sa {QtMultimedia::MetaData::MediaType}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -492,7 +492,7 @@ Item {
|
|||||||
This property holds the bit rate of the media's audio stream in bits per
|
This property holds the bit rate of the media's audio stream in bits per
|
||||||
second.
|
second.
|
||||||
|
|
||||||
\sa {QtMultimedia::AudioBitRate}
|
\sa {QtMultimedia::MetaData::AudioBitRate}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -500,7 +500,7 @@ Item {
|
|||||||
|
|
||||||
This property holds the encoding of the media audio stream.
|
This property holds the encoding of the media audio stream.
|
||||||
|
|
||||||
\sa {QtMultimedia::AudioCodec}
|
\sa {QtMultimedia::MetaData::AudioCodec}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -508,7 +508,7 @@ Item {
|
|||||||
|
|
||||||
This property holds the average volume level of the media.
|
This property holds the average volume level of the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::AverageLevel}
|
\sa {QtMultimedia::MetaData::AverageLevel}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -516,7 +516,7 @@ Item {
|
|||||||
|
|
||||||
This property holds the number of channels in the media's audio stream.
|
This property holds the number of channels in the media's audio stream.
|
||||||
|
|
||||||
\sa {QtMultimedia::ChannelCount}
|
\sa {QtMultimedia::MetaData::ChannelCount}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -524,7 +524,7 @@ Item {
|
|||||||
|
|
||||||
This property holds the peak volume of the media's audio stream.
|
This property holds the peak volume of the media's audio stream.
|
||||||
|
|
||||||
\sa {QtMultimedia::PeakValue}
|
\sa {QtMultimedia::MetaData::PeakValue}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -532,7 +532,7 @@ Item {
|
|||||||
|
|
||||||
This property holds the sample rate of the media's audio stream in Hertz.
|
This property holds the sample rate of the media's audio stream in Hertz.
|
||||||
|
|
||||||
\sa {QtMultimedia::SampleRate}
|
\sa {QtMultimedia::MetaData::SampleRate}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -540,7 +540,7 @@ Item {
|
|||||||
|
|
||||||
This property holds the title of the album the media belongs to.
|
This property holds the title of the album the media belongs to.
|
||||||
|
|
||||||
\sa {QtMultimedia::AlbumTitle}
|
\sa {QtMultimedia::MetaData::AlbumTitle}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -549,7 +549,7 @@ Item {
|
|||||||
This property holds the name of the principal artist of the album the media
|
This property holds the name of the principal artist of the album the media
|
||||||
belongs to.
|
belongs to.
|
||||||
|
|
||||||
\sa {QtMultimedia::AlbumArtist}
|
\sa {QtMultimedia::MetaData::AlbumArtist}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -557,7 +557,7 @@ Item {
|
|||||||
|
|
||||||
This property holds the names of artists contributing to the media.
|
This property holds the names of artists contributing to the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::ContributingArtist}
|
\sa {QtMultimedia::MetaData::ContributingArtist}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -565,7 +565,7 @@ Item {
|
|||||||
|
|
||||||
This property holds the composer of the media.
|
This property holds the composer of the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::Composer}
|
\sa {QtMultimedia::MetaData::Composer}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -573,7 +573,7 @@ Item {
|
|||||||
|
|
||||||
This property holds the conductor of the media.
|
This property holds the conductor of the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::Conductor}
|
\sa {QtMultimedia::MetaData::Conductor}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -581,7 +581,7 @@ Item {
|
|||||||
|
|
||||||
This property holds the lyrics to the media.
|
This property holds the lyrics to the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::Lyrics}
|
\sa {QtMultimedia::MetaData::Lyrics}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -589,7 +589,7 @@ Item {
|
|||||||
|
|
||||||
This property holds the mood of the media.
|
This property holds the mood of the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::Mood}
|
\sa {QtMultimedia::MetaData::Mood}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -597,7 +597,7 @@ Item {
|
|||||||
|
|
||||||
This property holds the track number of the media.
|
This property holds the track number of the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::TrackNumber}
|
\sa {QtMultimedia::MetaData::TrackNumber}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -605,7 +605,7 @@ Item {
|
|||||||
|
|
||||||
This property holds the number of track on the album containing the media.
|
This property holds the number of track on the album containing the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::TrackNumber}
|
\sa {QtMultimedia::MetaData::TrackNumber}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -613,7 +613,7 @@ Item {
|
|||||||
|
|
||||||
This property holds the URL of a small cover art image.
|
This property holds the URL of a small cover art image.
|
||||||
|
|
||||||
\sa {QtMultimedia::CoverArtUrlSmall}
|
\sa {QtMultimedia::MetaData::CoverArtUrlSmall}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -621,7 +621,7 @@ Item {
|
|||||||
|
|
||||||
This property holds the URL of a large cover art image.
|
This property holds the URL of a large cover art image.
|
||||||
|
|
||||||
\sa {QtMultimedia::CoverArtUrlLarge}
|
\sa {QtMultimedia::MetaData::CoverArtUrlLarge}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -629,7 +629,7 @@ Item {
|
|||||||
|
|
||||||
This property holds the dimension of an image or video.
|
This property holds the dimension of an image or video.
|
||||||
|
|
||||||
\sa {QtMultimedia::Resolution}
|
\sa {QtMultimedia::MetaData::Resolution}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -637,7 +637,7 @@ Item {
|
|||||||
|
|
||||||
This property holds the pixel aspect ratio of an image or video.
|
This property holds the pixel aspect ratio of an image or video.
|
||||||
|
|
||||||
\sa {QtMultimedia::PixelAspectRatio}
|
\sa {QtMultimedia::MetaData::PixelAspectRatio}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -645,7 +645,7 @@ Item {
|
|||||||
|
|
||||||
This property holds the frame rate of the media's video stream.
|
This property holds the frame rate of the media's video stream.
|
||||||
|
|
||||||
\sa {QtMultimedia::VideoFrameRate}
|
\sa {QtMultimedia::MetaData::VideoFrameRate}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -654,7 +654,7 @@ Item {
|
|||||||
This property holds the bit rate of the media's video stream in bits per
|
This property holds the bit rate of the media's video stream in bits per
|
||||||
second.
|
second.
|
||||||
|
|
||||||
\sa {QtMultimedia::VideoBitRate}
|
\sa {QtMultimedia::MetaData::VideoBitRate}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -662,7 +662,7 @@ Item {
|
|||||||
|
|
||||||
This property holds the encoding of the media's video stream.
|
This property holds the encoding of the media's video stream.
|
||||||
|
|
||||||
\sa {QtMultimedia::VideoCodec}
|
\sa {QtMultimedia::MetaData::VideoCodec}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -670,7 +670,7 @@ Item {
|
|||||||
|
|
||||||
This property holds the URL of a poster image.
|
This property holds the URL of a poster image.
|
||||||
|
|
||||||
\sa {QtMultimedia::PosterUrl}
|
\sa {QtMultimedia::MetaData::PosterUrl}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -678,7 +678,7 @@ Item {
|
|||||||
|
|
||||||
This property holds the chapter number of the media.
|
This property holds the chapter number of the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::ChapterNumber}
|
\sa {QtMultimedia::MetaData::ChapterNumber}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -686,7 +686,7 @@ Item {
|
|||||||
|
|
||||||
This property holds the director of the media.
|
This property holds the director of the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::Director}
|
\sa {QtMultimedia::MetaData::Director}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -694,7 +694,7 @@ Item {
|
|||||||
|
|
||||||
This property holds the lead performer in the media.
|
This property holds the lead performer in the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::LeadPerformer}
|
\sa {QtMultimedia::MetaData::LeadPerformer}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -702,7 +702,7 @@ Item {
|
|||||||
|
|
||||||
This property holds the writer of the media.
|
This property holds the writer of the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::Writer}
|
\sa {QtMultimedia::MetaData::Writer}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// The remaining properties are related to photos, and are technically
|
// The remaining properties are related to photos, and are technically
|
||||||
@@ -711,156 +711,156 @@ Item {
|
|||||||
/*!
|
/*!
|
||||||
\qmlproperty variant Video::metaData.cameraManufacturer
|
\qmlproperty variant Video::metaData.cameraManufacturer
|
||||||
|
|
||||||
\sa {QtMultimedia::CameraManufacturer}
|
\sa {QtMultimedia::MetaData::CameraManufacturer}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\qmlproperty variant Video::metaData.cameraModel
|
\qmlproperty variant Video::metaData.cameraModel
|
||||||
|
|
||||||
\sa {QtMultimedia::CameraModel}
|
\sa {QtMultimedia::MetaData::CameraModel}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\qmlproperty variant Video::metaData.event
|
\qmlproperty variant Video::metaData.event
|
||||||
|
|
||||||
\sa {QtMultimedia::Event}
|
\sa {QtMultimedia::MetaData::Event}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\qmlproperty variant Video::metaData.subject
|
\qmlproperty variant Video::metaData.subject
|
||||||
|
|
||||||
\sa {QtMultimedia::Subject}
|
\sa {QtMultimedia::MetaData::Subject}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\qmlproperty variant Video::metaData.orientation
|
\qmlproperty variant Video::metaData.orientation
|
||||||
|
|
||||||
\sa {QtMultimedia::Orientation}
|
\sa {QtMultimedia::MetaData::Orientation}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\qmlproperty variant Video::metaData.exposureTime
|
\qmlproperty variant Video::metaData.exposureTime
|
||||||
|
|
||||||
\sa {QtMultimedia::ExposureTime}
|
\sa {QtMultimedia::MetaData::ExposureTime}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\qmlproperty variant Video::metaData.fNumber
|
\qmlproperty variant Video::metaData.fNumber
|
||||||
|
|
||||||
\sa {QtMultimedia::FNumber}
|
\sa {QtMultimedia::MetaData::FNumber}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\qmlproperty variant Video::metaData.exposureProgram
|
\qmlproperty variant Video::metaData.exposureProgram
|
||||||
|
|
||||||
\sa {QtMultimedia::ExposureProgram}
|
\sa {QtMultimedia::MetaData::ExposureProgram}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\qmlproperty variant Video::metaData.isoSpeedRatings
|
\qmlproperty variant Video::metaData.isoSpeedRatings
|
||||||
|
|
||||||
\sa {QtMultimedia::ISOSpeedRatings}
|
\sa {QtMultimedia::MetaData::ISOSpeedRatings}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\qmlproperty variant Video::metaData.exposureBiasValue
|
\qmlproperty variant Video::metaData.exposureBiasValue
|
||||||
|
|
||||||
\sa {QtMultimedia::ExposureBiasValue}
|
\sa {QtMultimedia::MetaData::ExposureBiasValue}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\qmlproperty variant Video::metaData.dateTimeDigitized
|
\qmlproperty variant Video::metaData.dateTimeDigitized
|
||||||
|
|
||||||
\sa {QtMultimedia::DateTimeDigitized}
|
\sa {QtMultimedia::MetaData::DateTimeDigitized}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\qmlproperty variant Video::metaData.subjectDistance
|
\qmlproperty variant Video::metaData.subjectDistance
|
||||||
|
|
||||||
\sa {QtMultimedia::SubjectDistance}
|
\sa {QtMultimedia::MetaData::SubjectDistance}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\qmlproperty variant Video::metaData.meteringMode
|
\qmlproperty variant Video::metaData.meteringMode
|
||||||
|
|
||||||
\sa {QtMultimedia::MeteringMode}
|
\sa {QtMultimedia::MetaData::MeteringMode}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\qmlproperty variant Video::metaData.lightSource
|
\qmlproperty variant Video::metaData.lightSource
|
||||||
|
|
||||||
\sa {QtMultimedia::LightSource}
|
\sa {QtMultimedia::MetaData::LightSource}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\qmlproperty variant Video::metaData.flash
|
\qmlproperty variant Video::metaData.flash
|
||||||
|
|
||||||
\sa {QtMultimedia::Flash}
|
\sa {QtMultimedia::MetaData::Flash}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\qmlproperty variant Video::metaData.focalLength
|
\qmlproperty variant Video::metaData.focalLength
|
||||||
|
|
||||||
\sa {QtMultimedia::FocalLength}
|
\sa {QtMultimedia::MetaData::FocalLength}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\qmlproperty variant Video::metaData.exposureMode
|
\qmlproperty variant Video::metaData.exposureMode
|
||||||
|
|
||||||
\sa {QtMultimedia::ExposureMode}
|
\sa {QtMultimedia::MetaData::ExposureMode}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\qmlproperty variant Video::metaData.whiteBalance
|
\qmlproperty variant Video::metaData.whiteBalance
|
||||||
|
|
||||||
\sa {QtMultimedia::WhiteBalance}
|
\sa {QtMultimedia::MetaData::WhiteBalance}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\qmlproperty variant Video::metaData.DigitalZoomRatio
|
\qmlproperty variant Video::metaData.DigitalZoomRatio
|
||||||
|
|
||||||
\sa {QtMultimedia::DigitalZoomRatio}
|
\sa {QtMultimedia::MetaData::DigitalZoomRatio}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\qmlproperty variant Video::metaData.focalLengthIn35mmFilm
|
\qmlproperty variant Video::metaData.focalLengthIn35mmFilm
|
||||||
|
|
||||||
\sa {QtMultimedia::FocalLengthIn35mmFile}
|
\sa {QtMultimedia::MetaData::FocalLengthIn35mmFile}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\qmlproperty variant Video::metaData.sceneCaptureType
|
\qmlproperty variant Video::metaData.sceneCaptureType
|
||||||
|
|
||||||
\sa {QtMultimedia::SceneCaptureType}
|
\sa {QtMultimedia::MetaData::SceneCaptureType}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\qmlproperty variant Video::metaData.gainControl
|
\qmlproperty variant Video::metaData.gainControl
|
||||||
|
|
||||||
\sa {QtMultimedia::GainControl}
|
\sa {QtMultimedia::MetaData::GainControl}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\qmlproperty variant Video::metaData.contrast
|
\qmlproperty variant Video::metaData.contrast
|
||||||
|
|
||||||
\sa {QtMultimedia::contrast}
|
\sa {QtMultimedia::MetaData::contrast}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\qmlproperty variant Video::metaData.saturation
|
\qmlproperty variant Video::metaData.saturation
|
||||||
|
|
||||||
\sa {QtMultimedia::Saturation}
|
\sa {QtMultimedia::MetaData::Saturation}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\qmlproperty variant Video::metaData.sharpness
|
\qmlproperty variant Video::metaData.sharpness
|
||||||
|
|
||||||
\sa {QtMultimedia::Sharpness}
|
\sa {QtMultimedia::MetaData::Sharpness}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\qmlproperty variant Video::metaData.deviceSettingDescription
|
\qmlproperty variant Video::metaData.deviceSettingDescription
|
||||||
|
|
||||||
\sa {QtMultimedia::DeviceSettingDescription}
|
\sa {QtMultimedia::MetaData::DeviceSettingDescription}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -363,7 +363,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
|
|
||||||
This property holds the tile of the media.
|
This property holds the tile of the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::Title}
|
\sa {QtMultimedia::MetaData::Title}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -371,7 +371,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
|
|
||||||
This property holds the sub-title of the media.
|
This property holds the sub-title of the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::SubTitle}
|
\sa {QtMultimedia::MetaData::SubTitle}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -379,7 +379,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
|
|
||||||
This property holds the author of the media.
|
This property holds the author of the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::Author}
|
\sa {QtMultimedia::MetaData::Author}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -387,7 +387,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
|
|
||||||
This property holds a user comment about the media.
|
This property holds a user comment about the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::Comment}
|
\sa {QtMultimedia::MetaData::Comment}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -395,7 +395,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
|
|
||||||
This property holds a description of the media.
|
This property holds a description of the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::Description}
|
\sa {QtMultimedia::MetaData::Description}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -403,7 +403,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
|
|
||||||
This property holds the category of the media
|
This property holds the category of the media
|
||||||
|
|
||||||
\sa {QtMultimedia::Category}
|
\sa {QtMultimedia::MetaData::Category}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -411,7 +411,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
|
|
||||||
This property holds the genre of the media.
|
This property holds the genre of the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::Genre}
|
\sa {QtMultimedia::MetaData::Genre}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -419,7 +419,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
|
|
||||||
This property holds the year of release of the media.
|
This property holds the year of release of the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::Year}
|
\sa {QtMultimedia::MetaData::Year}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -427,7 +427,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
|
|
||||||
This property holds the date of the media.
|
This property holds the date of the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::Date}
|
\sa {QtMultimedia::MetaData::Date}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -435,7 +435,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
|
|
||||||
This property holds a user rating of the media in the range of 0 to 100.
|
This property holds a user rating of the media in the range of 0 to 100.
|
||||||
|
|
||||||
\sa {QtMultimedia::UserRating}
|
\sa {QtMultimedia::MetaData::UserRating}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -443,7 +443,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
|
|
||||||
This property holds a list of keywords describing the media.
|
This property holds a list of keywords describing the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::Keywords}
|
\sa {QtMultimedia::MetaData::Keywords}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -451,7 +451,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
|
|
||||||
This property holds the language of the media, as an ISO 639-2 code.
|
This property holds the language of the media, as an ISO 639-2 code.
|
||||||
|
|
||||||
\sa {QtMultimedia::Language}
|
\sa {QtMultimedia::MetaData::Language}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -459,7 +459,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
|
|
||||||
This property holds the publisher of the media.
|
This property holds the publisher of the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::Publisher}
|
\sa {QtMultimedia::MetaData::Publisher}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -467,7 +467,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
|
|
||||||
This property holds the media's copyright notice.
|
This property holds the media's copyright notice.
|
||||||
|
|
||||||
\sa {QtMultimedia::Copyright}
|
\sa {QtMultimedia::MetaData::Copyright}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -475,7 +475,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
|
|
||||||
This property holds the parental rating of the media.
|
This property holds the parental rating of the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::ParentalRating}
|
\sa {QtMultimedia::MetaData::ParentalRating}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -484,7 +484,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
This property holds the name of the rating organization responsible for the
|
This property holds the name of the rating organization responsible for the
|
||||||
parental rating of the media.
|
parental rating of the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::RatingOrganization}
|
\sa {QtMultimedia::MetaData::RatingOrganization}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -492,7 +492,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
|
|
||||||
This property property holds the size of the media in bytes.
|
This property property holds the size of the media in bytes.
|
||||||
|
|
||||||
\sa {QtMultimedia::Size}
|
\sa {QtMultimedia::MetaData::Size}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -500,7 +500,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
|
|
||||||
This property holds the type of the media.
|
This property holds the type of the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::MediaType}
|
\sa {QtMultimedia::MetaData::MediaType}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -509,7 +509,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
This property holds the bit rate of the media's audio stream ni bits per
|
This property holds the bit rate of the media's audio stream ni bits per
|
||||||
second.
|
second.
|
||||||
|
|
||||||
\sa {QtMultimedia::AudioBitRate}
|
\sa {QtMultimedia::MetaData::AudioBitRate}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -517,7 +517,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
|
|
||||||
This property holds the encoding of the media audio stream.
|
This property holds the encoding of the media audio stream.
|
||||||
|
|
||||||
\sa {QtMultimedia::AudioCodec}
|
\sa {QtMultimedia::MetaData::AudioCodec}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -525,7 +525,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
|
|
||||||
This property holds the average volume level of the media.
|
This property holds the average volume level of the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::AverageLevel}
|
\sa {QtMultimedia::MetaData::AverageLevel}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -533,7 +533,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
|
|
||||||
This property holds the number of channels in the media's audio stream.
|
This property holds the number of channels in the media's audio stream.
|
||||||
|
|
||||||
\sa {QtMultimedia::ChannelCount}
|
\sa {QtMultimedia::MetaData::ChannelCount}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -541,7 +541,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
|
|
||||||
This property holds the peak volume of media's audio stream.
|
This property holds the peak volume of media's audio stream.
|
||||||
|
|
||||||
\sa {QtMultimedia::PeakValue}
|
\sa {QtMultimedia::MetaData::PeakValue}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -549,7 +549,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
|
|
||||||
This property holds the sample rate of the media's audio stream in hertz.
|
This property holds the sample rate of the media's audio stream in hertz.
|
||||||
|
|
||||||
\sa {QtMultimedia::SampleRate}
|
\sa {QtMultimedia::MetaData::SampleRate}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -557,7 +557,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
|
|
||||||
This property holds the title of the album the media belongs to.
|
This property holds the title of the album the media belongs to.
|
||||||
|
|
||||||
\sa {QtMultimedia::AlbumTitle}
|
\sa {QtMultimedia::MetaData::AlbumTitle}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -566,7 +566,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
This property holds the name of the principal artist of the album the media
|
This property holds the name of the principal artist of the album the media
|
||||||
belongs to.
|
belongs to.
|
||||||
|
|
||||||
\sa {QtMultimedia::AlbumArtist}
|
\sa {QtMultimedia::MetaData::AlbumArtist}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -574,7 +574,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
|
|
||||||
This property holds the names of artists contributing to the media.
|
This property holds the names of artists contributing to the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::ContributingArtist}
|
\sa {QtMultimedia::MetaData::ContributingArtist}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -582,7 +582,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
|
|
||||||
This property holds the composer of the media.
|
This property holds the composer of the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::Composer}
|
\sa {QtMultimedia::MetaData::Composer}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -590,7 +590,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
|
|
||||||
This property holds the conductor of the media.
|
This property holds the conductor of the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::Conductor}
|
\sa {QtMultimedia::MetaData::Conductor}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -598,7 +598,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
|
|
||||||
This property holds the lyrics to the media.
|
This property holds the lyrics to the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::Lyrics}
|
\sa {QtMultimedia::MetaData::Lyrics}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -606,7 +606,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
|
|
||||||
This property holds the mood of the media.
|
This property holds the mood of the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::Mood}
|
\sa {QtMultimedia::MetaData::Mood}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -614,7 +614,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
|
|
||||||
This property holds the track number of the media.
|
This property holds the track number of the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::TrackNumber}
|
\sa {QtMultimedia::MetaData::TrackNumber}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -622,7 +622,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
|
|
||||||
This property holds the number of track on the album containing the media.
|
This property holds the number of track on the album containing the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::TrackNumber}
|
\sa {QtMultimedia::MetaData::TrackNumber}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -630,7 +630,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
|
|
||||||
This property holds the URL of a small cover art image.
|
This property holds the URL of a small cover art image.
|
||||||
|
|
||||||
\sa {QtMultimedia::CoverArtUrlSmall}
|
\sa {QtMultimedia::MetaData::CoverArtUrlSmall}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -638,7 +638,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
|
|
||||||
This property holds the URL of a large cover art image.
|
This property holds the URL of a large cover art image.
|
||||||
|
|
||||||
\sa {QtMultimedia::CoverArtUrlLarge}
|
\sa {QtMultimedia::MetaData::CoverArtUrlLarge}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -646,7 +646,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
|
|
||||||
This property holds the dimension of an image or video.
|
This property holds the dimension of an image or video.
|
||||||
|
|
||||||
\sa {QtMultimedia::Resolution}
|
\sa {QtMultimedia::MetaData::Resolution}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -654,7 +654,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
|
|
||||||
This property holds the pixel aspect ratio of an image or video.
|
This property holds the pixel aspect ratio of an image or video.
|
||||||
|
|
||||||
\sa {QtMultimedia::PixelAspectRatio}
|
\sa {QtMultimedia::MetaData::PixelAspectRatio}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -662,7 +662,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
|
|
||||||
This property holds the frame rate of the media's video stream.
|
This property holds the frame rate of the media's video stream.
|
||||||
|
|
||||||
\sa {QtMultimedia::VideoFrameRate}
|
\sa {QtMultimedia::MetaData::VideoFrameRate}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -671,7 +671,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
This property holds the bit rate of the media's video stream in bits per
|
This property holds the bit rate of the media's video stream in bits per
|
||||||
second.
|
second.
|
||||||
|
|
||||||
\sa {QtMultimedia::VideoBitRate}
|
\sa {QtMultimedia::MetaData::VideoBitRate}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -679,7 +679,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
|
|
||||||
This property holds the encoding of the media's video stream.
|
This property holds the encoding of the media's video stream.
|
||||||
|
|
||||||
\sa {QtMultimedia::VideoCodec}
|
\sa {QtMultimedia::MetaData::VideoCodec}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -687,7 +687,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
|
|
||||||
This property holds the URL of a poster image.
|
This property holds the URL of a poster image.
|
||||||
|
|
||||||
\sa {QtMultimedia::PosterUrl}
|
\sa {QtMultimedia::MetaData::PosterUrl}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -695,7 +695,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
|
|
||||||
This property holds the chapter number of the media.
|
This property holds the chapter number of the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::ChapterNumber}
|
\sa {QtMultimedia::MetaData::ChapterNumber}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -703,7 +703,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
|
|
||||||
This property holds the director of the media.
|
This property holds the director of the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::Director}
|
\sa {QtMultimedia::MetaData::Director}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -711,7 +711,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
|
|
||||||
This property holds the lead performer in the media.
|
This property holds the lead performer in the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::LeadPerformer}
|
\sa {QtMultimedia::MetaData::LeadPerformer}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -719,7 +719,7 @@ void QDeclarativeAudio::componentComplete()
|
|||||||
|
|
||||||
This property holds the writer of the media.
|
This property holds the writer of the media.
|
||||||
|
|
||||||
\sa {QtMultimedia::Writer}
|
\sa {QtMultimedia::MetaData::Writer}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ QString QDeclarativeCameraCapture::errorString() const
|
|||||||
void QDeclarativeCameraCapture::setMetadata(const QString &key, const QVariant &value)
|
void QDeclarativeCameraCapture::setMetadata(const QString &key, const QVariant &value)
|
||||||
{
|
{
|
||||||
if (m_metadataWriterControl)
|
if (m_metadataWriterControl)
|
||||||
m_metadataWriterControl->setExtendedMetaData(key, value);
|
m_metadataWriterControl->setMetaData(key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|||||||
@@ -206,7 +206,7 @@ void QDeclarativeCameraRecorder::setMuted(bool muted)
|
|||||||
|
|
||||||
void QDeclarativeCameraRecorder::setMetadata(const QString &key, const QVariant &value)
|
void QDeclarativeCameraRecorder::setMetadata(const QString &key, const QVariant &value)
|
||||||
{
|
{
|
||||||
m_recorder->setExtendedMetaData(key, value);
|
m_recorder->setMetaData(key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QDeclarativeCameraRecorder::updateRecorderState(QMediaRecorder::State state)
|
void QDeclarativeCameraRecorder::updateRecorderState(QMediaRecorder::State state)
|
||||||
|
|||||||
@@ -109,12 +109,8 @@ public:
|
|||||||
|
|
||||||
bool isMetaDataAvailable() const { return false; }
|
bool isMetaDataAvailable() const { return false; }
|
||||||
|
|
||||||
QVariant metaData(QtMultimedia::MetaData) const { return QVariant(); }
|
QVariant metaData(const QString &) const { return QVariant(); }
|
||||||
QList<QtMultimedia::MetaData> availableMetaData() const {
|
QStringList availableMetaData() const { return QStringList(); }
|
||||||
return QList<QtMultimedia::MetaData>(); }
|
|
||||||
|
|
||||||
QVariant extendedMetaData(const QString &) const { return QVariant(); }
|
|
||||||
QStringList availableExtendedMetaData() const { return QStringList(); }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class QDeclarativeMediaBaseAnimation : public QObject
|
class QDeclarativeMediaBaseAnimation : public QObject
|
||||||
|
|||||||
@@ -117,57 +117,57 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant title() const { return m_control->metaData(QtMultimedia::Title); }
|
QVariant title() const { return m_control->metaData(QtMultimedia::MetaData::Title); }
|
||||||
QVariant subTitle() const { return m_control->metaData(QtMultimedia::SubTitle); }
|
QVariant subTitle() const { return m_control->metaData(QtMultimedia::MetaData::SubTitle); }
|
||||||
QVariant author() const { return m_control->metaData(QtMultimedia::Author); }
|
QVariant author() const { return m_control->metaData(QtMultimedia::MetaData::Author); }
|
||||||
QVariant comment() const { return m_control->metaData(QtMultimedia::Comment); }
|
QVariant comment() const { return m_control->metaData(QtMultimedia::MetaData::Comment); }
|
||||||
QVariant description() const { return m_control->metaData(QtMultimedia::Description); }
|
QVariant description() const { return m_control->metaData(QtMultimedia::MetaData::Description); }
|
||||||
QVariant category() const { return m_control->metaData(QtMultimedia::Category); }
|
QVariant category() const { return m_control->metaData(QtMultimedia::MetaData::Category); }
|
||||||
QVariant genre() const { return m_control->metaData(QtMultimedia::Genre); }
|
QVariant genre() const { return m_control->metaData(QtMultimedia::MetaData::Genre); }
|
||||||
QVariant year() const { return m_control->metaData(QtMultimedia::Year); }
|
QVariant year() const { return m_control->metaData(QtMultimedia::MetaData::Year); }
|
||||||
QVariant date() const { return m_control->metaData(QtMultimedia::Date); }
|
QVariant date() const { return m_control->metaData(QtMultimedia::MetaData::Date); }
|
||||||
QVariant userRating() const { return m_control->metaData(QtMultimedia::UserRating); }
|
QVariant userRating() const { return m_control->metaData(QtMultimedia::MetaData::UserRating); }
|
||||||
QVariant keywords() const { return m_control->metaData(QtMultimedia::Keywords); }
|
QVariant keywords() const { return m_control->metaData(QtMultimedia::MetaData::Keywords); }
|
||||||
QVariant language() const { return m_control->metaData(QtMultimedia::Language); }
|
QVariant language() const { return m_control->metaData(QtMultimedia::MetaData::Language); }
|
||||||
QVariant publisher() const { return m_control->metaData(QtMultimedia::Publisher); }
|
QVariant publisher() const { return m_control->metaData(QtMultimedia::MetaData::Publisher); }
|
||||||
QVariant copyright() const { return m_control->metaData(QtMultimedia::Copyright); }
|
QVariant copyright() const { return m_control->metaData(QtMultimedia::MetaData::Copyright); }
|
||||||
QVariant parentalRating() const { return m_control->metaData(QtMultimedia::ParentalRating); }
|
QVariant parentalRating() const { return m_control->metaData(QtMultimedia::MetaData::ParentalRating); }
|
||||||
QVariant ratingOrganization() const {
|
QVariant ratingOrganization() const {
|
||||||
return m_control->metaData(QtMultimedia::RatingOrganization); }
|
return m_control->metaData(QtMultimedia::MetaData::RatingOrganization); }
|
||||||
QVariant size() const { return m_control->metaData(QtMultimedia::Size); }
|
QVariant size() const { return m_control->metaData(QtMultimedia::MetaData::Size); }
|
||||||
QVariant mediaType() const { return m_control->metaData(QtMultimedia::MediaType); }
|
QVariant mediaType() const { return m_control->metaData(QtMultimedia::MetaData::MediaType); }
|
||||||
QVariant duration() const { return m_control->metaData(QtMultimedia::Duration); }
|
QVariant duration() const { return m_control->metaData(QtMultimedia::MetaData::Duration); }
|
||||||
QVariant audioBitRate() const { return m_control->metaData(QtMultimedia::AudioBitRate); }
|
QVariant audioBitRate() const { return m_control->metaData(QtMultimedia::MetaData::AudioBitRate); }
|
||||||
QVariant audioCodec() const { return m_control->metaData(QtMultimedia::AudioCodec); }
|
QVariant audioCodec() const { return m_control->metaData(QtMultimedia::MetaData::AudioCodec); }
|
||||||
QVariant averageLevel() const { return m_control->metaData(QtMultimedia::AverageLevel); }
|
QVariant averageLevel() const { return m_control->metaData(QtMultimedia::MetaData::AverageLevel); }
|
||||||
QVariant channelCount() const { return m_control->metaData(QtMultimedia::ChannelCount); }
|
QVariant channelCount() const { return m_control->metaData(QtMultimedia::MetaData::ChannelCount); }
|
||||||
QVariant peakValue() const { return m_control->metaData(QtMultimedia::PeakValue); }
|
QVariant peakValue() const { return m_control->metaData(QtMultimedia::MetaData::PeakValue); }
|
||||||
QVariant sampleRate() const { return m_control->metaData(QtMultimedia::SampleRate); }
|
QVariant sampleRate() const { return m_control->metaData(QtMultimedia::MetaData::SampleRate); }
|
||||||
QVariant albumTitle() const { return m_control->metaData(QtMultimedia::AlbumTitle); }
|
QVariant albumTitle() const { return m_control->metaData(QtMultimedia::MetaData::AlbumTitle); }
|
||||||
QVariant albumArtist() const { return m_control->metaData(QtMultimedia::AlbumArtist); }
|
QVariant albumArtist() const { return m_control->metaData(QtMultimedia::MetaData::AlbumArtist); }
|
||||||
QVariant contributingArtist() const {
|
QVariant contributingArtist() const {
|
||||||
return m_control->metaData(QtMultimedia::ContributingArtist); }
|
return m_control->metaData(QtMultimedia::MetaData::ContributingArtist); }
|
||||||
QVariant composer() const { return m_control->metaData(QtMultimedia::Composer); }
|
QVariant composer() const { return m_control->metaData(QtMultimedia::MetaData::Composer); }
|
||||||
QVariant conductor() const { return m_control->metaData(QtMultimedia::Conductor); }
|
QVariant conductor() const { return m_control->metaData(QtMultimedia::MetaData::Conductor); }
|
||||||
QVariant lyrics() const { return m_control->metaData(QtMultimedia::Lyrics); }
|
QVariant lyrics() const { return m_control->metaData(QtMultimedia::MetaData::Lyrics); }
|
||||||
QVariant mood() const { return m_control->metaData(QtMultimedia::Mood); }
|
QVariant mood() const { return m_control->metaData(QtMultimedia::MetaData::Mood); }
|
||||||
QVariant trackNumber() const { return m_control->metaData(QtMultimedia::TrackNumber); }
|
QVariant trackNumber() const { return m_control->metaData(QtMultimedia::MetaData::TrackNumber); }
|
||||||
QVariant trackCount() const { return m_control->metaData(QtMultimedia::TrackCount); }
|
QVariant trackCount() const { return m_control->metaData(QtMultimedia::MetaData::TrackCount); }
|
||||||
QVariant coverArtUrlSmall() const {
|
QVariant coverArtUrlSmall() const {
|
||||||
return m_control->metaData(QtMultimedia::CoverArtUrlSmall); }
|
return m_control->metaData(QtMultimedia::MetaData::CoverArtUrlSmall); }
|
||||||
QVariant coverArtUrlLarge() const {
|
QVariant coverArtUrlLarge() const {
|
||||||
return m_control->metaData(QtMultimedia::CoverArtUrlLarge); }
|
return m_control->metaData(QtMultimedia::MetaData::CoverArtUrlLarge); }
|
||||||
QVariant resolution() const { return m_control->metaData(QtMultimedia::Resolution); }
|
QVariant resolution() const { return m_control->metaData(QtMultimedia::MetaData::Resolution); }
|
||||||
QVariant pixelAspectRatio() const {
|
QVariant pixelAspectRatio() const {
|
||||||
return m_control->metaData(QtMultimedia::PixelAspectRatio); }
|
return m_control->metaData(QtMultimedia::MetaData::PixelAspectRatio); }
|
||||||
QVariant videoFrameRate() const { return m_control->metaData(QtMultimedia::VideoFrameRate); }
|
QVariant videoFrameRate() const { return m_control->metaData(QtMultimedia::MetaData::VideoFrameRate); }
|
||||||
QVariant videoBitRate() const { return m_control->metaData(QtMultimedia::VideoBitRate); }
|
QVariant videoBitRate() const { return m_control->metaData(QtMultimedia::MetaData::VideoBitRate); }
|
||||||
QVariant videoCodec() const { return m_control->metaData(QtMultimedia::VideoCodec); }
|
QVariant videoCodec() const { return m_control->metaData(QtMultimedia::MetaData::VideoCodec); }
|
||||||
QVariant posterUrl() const { return m_control->metaData(QtMultimedia::PosterUrl); }
|
QVariant posterUrl() const { return m_control->metaData(QtMultimedia::MetaData::PosterUrl); }
|
||||||
QVariant chapterNumber() const { return m_control->metaData(QtMultimedia::ChapterNumber); }
|
QVariant chapterNumber() const { return m_control->metaData(QtMultimedia::MetaData::ChapterNumber); }
|
||||||
QVariant director() const { return m_control->metaData(QtMultimedia::Director); }
|
QVariant director() const { return m_control->metaData(QtMultimedia::MetaData::Director); }
|
||||||
QVariant leadPerformer() const { return m_control->metaData(QtMultimedia::LeadPerformer); }
|
QVariant leadPerformer() const { return m_control->metaData(QtMultimedia::MetaData::LeadPerformer); }
|
||||||
QVariant writer() const { return m_control->metaData(QtMultimedia::Writer); }
|
QVariant writer() const { return m_control->metaData(QtMultimedia::MetaData::Writer); }
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void metaDataChanged();
|
void metaDataChanged();
|
||||||
|
|||||||
@@ -203,8 +203,6 @@ bool QCameraImageCapture::setMediaObject(QMediaObject *mediaObject)
|
|||||||
this, SIGNAL(imageCaptured(int,QImage)));
|
this, SIGNAL(imageCaptured(int,QImage)));
|
||||||
disconnect(d->control, SIGNAL(imageAvailable(int,QVideoFrame)),
|
disconnect(d->control, SIGNAL(imageAvailable(int,QVideoFrame)),
|
||||||
this, SIGNAL(imageAvailable(int,QVideoFrame)));
|
this, SIGNAL(imageAvailable(int,QVideoFrame)));
|
||||||
disconnect(d->control, SIGNAL(imageMetadataAvailable(int,QtMultimedia::MetaData,QVariant)),
|
|
||||||
this, SIGNAL(imageMetadataAvailable(int,QtMultimedia::MetaData,QVariant)));
|
|
||||||
disconnect(d->control, SIGNAL(imageMetadataAvailable(int,QString,QVariant)),
|
disconnect(d->control, SIGNAL(imageMetadataAvailable(int,QString,QVariant)),
|
||||||
this, SIGNAL(imageMetadataAvailable(int,QString,QVariant)));
|
this, SIGNAL(imageMetadataAvailable(int,QString,QVariant)));
|
||||||
disconnect(d->control, SIGNAL(imageSaved(int,QString)),
|
disconnect(d->control, SIGNAL(imageSaved(int,QString)),
|
||||||
@@ -255,8 +253,6 @@ bool QCameraImageCapture::setMediaObject(QMediaObject *mediaObject)
|
|||||||
this, SIGNAL(imageExposed(int)));
|
this, SIGNAL(imageExposed(int)));
|
||||||
connect(d->control, SIGNAL(imageCaptured(int,QImage)),
|
connect(d->control, SIGNAL(imageCaptured(int,QImage)),
|
||||||
this, SIGNAL(imageCaptured(int,QImage)));
|
this, SIGNAL(imageCaptured(int,QImage)));
|
||||||
connect(d->control, SIGNAL(imageMetadataAvailable(int,QtMultimedia::MetaData,QVariant)),
|
|
||||||
this, SIGNAL(imageMetadataAvailable(int,QtMultimedia::MetaData,QVariant)));
|
|
||||||
connect(d->control, SIGNAL(imageMetadataAvailable(int,QString,QVariant)),
|
connect(d->control, SIGNAL(imageMetadataAvailable(int,QString,QVariant)),
|
||||||
this, SIGNAL(imageMetadataAvailable(int,QString,QVariant)));
|
this, SIGNAL(imageMetadataAvailable(int,QString,QVariant)));
|
||||||
connect(d->control, SIGNAL(imageAvailable(int,QVideoFrame)),
|
connect(d->control, SIGNAL(imageAvailable(int,QVideoFrame)),
|
||||||
@@ -614,25 +610,14 @@ void QCameraImageCapture::cancelCapture()
|
|||||||
Frame \a preview can be displayed to user.
|
Frame \a preview can be displayed to user.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
|
||||||
\fn QCameraImageCapture::imageMetadataAvailable(int id, QtMultimedia::MetaData key, const QVariant &value)
|
|
||||||
|
|
||||||
Signals that a metadata for an image with request \a id is available.
|
|
||||||
This signal is emitted for metadata \a value with a \a key listed in QtMultimedia::MetaData enum.
|
|
||||||
|
|
||||||
This signal is emitted between imageExposed and imageSaved signals.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn QCameraImageCapture::imageMetadataAvailable(int id, const QString &key, const QVariant &value)
|
\fn QCameraImageCapture::imageMetadataAvailable(int id, const QString &key, const QVariant &value)
|
||||||
|
|
||||||
Signals that a metadata for an image with request \a id is available.
|
Signals that a metadata for an image with request \a id is available.
|
||||||
This signal is emitted for extended metadata \a value with a \a key not listed in QtMultimedia::MetaData enum.
|
|
||||||
|
|
||||||
This signal is emitted between imageExposed and imageSaved signals.
|
This signal is emitted between imageExposed and imageSaved signals.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn QCameraImageCapture::imageAvailable(int id, const QVideoFrame &buffer)
|
\fn QCameraImageCapture::imageAvailable(int id, const QVideoFrame &buffer)
|
||||||
|
|
||||||
|
|||||||
@@ -136,7 +136,6 @@ Q_SIGNALS:
|
|||||||
|
|
||||||
void imageExposed(int id);
|
void imageExposed(int id);
|
||||||
void imageCaptured(int id, const QImage &preview);
|
void imageCaptured(int id, const QImage &preview);
|
||||||
void imageMetadataAvailable(int id, QtMultimedia::MetaData key, const QVariant &value);
|
|
||||||
void imageMetadataAvailable(int id, const QString &key, const QVariant &value);
|
void imageMetadataAvailable(int id, const QString &key, const QVariant &value);
|
||||||
void imageAvailable(int id, const QVideoFrame &image);
|
void imageAvailable(int id, const QVideoFrame &image);
|
||||||
void imageSaved(int id, const QString &fileName);
|
void imageSaved(int id, const QString &fileName);
|
||||||
|
|||||||
@@ -136,21 +136,10 @@ QCameraImageCaptureControl::~QCameraImageCaptureControl()
|
|||||||
has been captured and a \a preview is available.
|
has been captured and a \a preview is available.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
|
||||||
\fn QCameraImageCaptureControl::imageMetadataAvailable(int id, QtMultimedia::MetaData key, const QVariant &value)
|
|
||||||
|
|
||||||
Signals that a metadata for an image with request \a id is available.
|
|
||||||
This signal is emitted for metadata \a value with a \a key listed in QtMultimedia::MetaData enum.
|
|
||||||
|
|
||||||
This signal should be emitted between imageExposed and imageSaved signals.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn QCameraImageCaptureControl::imageMetadataAvailable(int id, const QString &key, const QVariant &value)
|
\fn QCameraImageCaptureControl::imageMetadataAvailable(int id, const QString &key, const QVariant &value)
|
||||||
|
|
||||||
Signals that a metadata for an image with request \a id is available.
|
Signals that a metadata for an image with request \a id is available.
|
||||||
This signal is emitted for extended metadata \a value with a \a key not listed in QtMultimedia::MetaData enum.
|
|
||||||
|
|
||||||
This signal should be emitted between imageExposed and imageSaved signals.
|
This signal should be emitted between imageExposed and imageSaved signals.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -76,7 +76,6 @@ Q_SIGNALS:
|
|||||||
|
|
||||||
void imageExposed(int id);
|
void imageExposed(int id);
|
||||||
void imageCaptured(int id, const QImage &preview);
|
void imageCaptured(int id, const QImage &preview);
|
||||||
void imageMetadataAvailable(int id, QtMultimedia::MetaData key, const QVariant &value);
|
|
||||||
void imageMetadataAvailable(int id, const QString &key, const QVariant &value);
|
void imageMetadataAvailable(int id, const QString &key, const QVariant &value);
|
||||||
void imageAvailable(int id, const QVideoFrame &buffer);
|
void imageAvailable(int id, const QVideoFrame &buffer);
|
||||||
void imageSaved(int id, const QString &fileName);
|
void imageSaved(int id, const QString &fileName);
|
||||||
|
|||||||
@@ -125,11 +125,12 @@ QMediaStreamsControl::~QMediaStreamsControl()
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn QMediaStreamsControl::metaData(int stream, QtMultimedia::MetaData key)
|
\fn QMediaStreamsControl::metaData(int stream, const QString &key)
|
||||||
|
|
||||||
Returns the meta-data value of \a key for a given \a stream.
|
Returns the meta-data value of \a key for a given \a stream.
|
||||||
|
|
||||||
Useful metadata keya are QtMultimedia::Title, QtMultimedia::Description and QtMultimedia::Language.
|
Useful metadata keys are QtMultimedia::MetaData::Title,
|
||||||
|
QtMultimedia::MetaData::Description and QtMultimedia::MetaData::Language.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ public:
|
|||||||
virtual int streamCount() = 0;
|
virtual int streamCount() = 0;
|
||||||
virtual StreamType streamType(int streamNumber) = 0;
|
virtual StreamType streamType(int streamNumber) = 0;
|
||||||
|
|
||||||
virtual QVariant metaData(int streamNumber, QtMultimedia::MetaData key) = 0;
|
virtual QVariant metaData(int streamNumber, const QString &key) = 0;
|
||||||
|
|
||||||
virtual bool isActive(int streamNumber) = 0;
|
virtual bool isActive(int streamNumber) = 0;
|
||||||
virtual void setActive(int streamNumber, bool state) = 0;
|
virtual void setActive(int streamNumber, bool state) = 0;
|
||||||
|
|||||||
@@ -59,9 +59,8 @@ QT_BEGIN_NAMESPACE
|
|||||||
If a QMediaService can provide read or write access to the meta-data of
|
If a QMediaService can provide read or write access to the meta-data of
|
||||||
its current media it will implement QMetaDataReaderControl. This control
|
its current media it will implement QMetaDataReaderControl. This control
|
||||||
provides functions for both retrieving and setting meta-data values.
|
provides functions for both retrieving and setting meta-data values.
|
||||||
Meta-data may be addressed by the well defined keys in the
|
Meta-data may be addressed by the keys defined in the
|
||||||
QtMultimedia::MetaData enumeration using the metaData() functions, or by
|
QtMultimedia::MetaData namespace.
|
||||||
string keys using the extendedMetaData() functions.
|
|
||||||
|
|
||||||
The functionality provided by this control is exposed to application
|
The functionality provided by this control is exposed to application
|
||||||
code by the meta-data members of QMediaObject, and so meta-data access
|
code by the meta-data members of QMediaObject, and so meta-data access
|
||||||
@@ -112,7 +111,7 @@ QMetaDataReaderControl::~QMetaDataReaderControl()
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn QVariant QMetaDataReaderControl::metaData(QtMultimedia::MetaData key) const
|
\fn QVariant QMetaDataReaderControl::metaData(const QString &key) const
|
||||||
|
|
||||||
Returns the meta-data for the given \a key.
|
Returns the meta-data for the given \a key.
|
||||||
*/
|
*/
|
||||||
@@ -123,22 +122,6 @@ QMetaDataReaderControl::~QMetaDataReaderControl()
|
|||||||
Returns a list of keys there is meta-data available for.
|
Returns a list of keys there is meta-data available for.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
|
||||||
\fn QMetaDataReaderControl::extendedMetaData(const QString &key) const
|
|
||||||
|
|
||||||
Returns the metaData for an abitrary string \a key.
|
|
||||||
|
|
||||||
The valid selection of keys for extended meta-data is determined by the provider and the meaning
|
|
||||||
and type may differ between providers.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\fn QMetaDataReaderControl::availableExtendedMetaData() const
|
|
||||||
|
|
||||||
Returns a list of keys there is extended meta-data available for.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn void QMetaDataReaderControl::metaDataChanged()
|
\fn void QMetaDataReaderControl::metaDataChanged()
|
||||||
|
|
||||||
|
|||||||
@@ -66,11 +66,8 @@ public:
|
|||||||
|
|
||||||
virtual bool isMetaDataAvailable() const = 0;
|
virtual bool isMetaDataAvailable() const = 0;
|
||||||
|
|
||||||
virtual QVariant metaData(QtMultimedia::MetaData key) const = 0;
|
virtual QVariant metaData(const QString &key) const = 0;
|
||||||
virtual QList<QtMultimedia::MetaData> availableMetaData() const = 0;
|
virtual QStringList availableMetaData() const = 0;
|
||||||
|
|
||||||
virtual QVariant extendedMetaData(const QString &key) const = 0;
|
|
||||||
virtual QStringList availableExtendedMetaData() const = 0;
|
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void metaDataChanged();
|
void metaDataChanged();
|
||||||
|
|||||||
@@ -59,9 +59,8 @@ QT_BEGIN_NAMESPACE
|
|||||||
If a QMediaService can provide write access to the meta-data of its
|
If a QMediaService can provide write access to the meta-data of its
|
||||||
current media it will implement QMetaDataWriterControl. This control
|
current media it will implement QMetaDataWriterControl. This control
|
||||||
provides functions for both retrieving and setting meta-data values.
|
provides functions for both retrieving and setting meta-data values.
|
||||||
Meta-data may be addressed by the well defined keys in the
|
Meta-data may be addressed by the keys defined in the
|
||||||
QtMultimedia::MetaData enumeration using the metaData() functions, or
|
QtMultimedia::MetaData namespace.
|
||||||
by string keys using the extendedMetaData() functions.
|
|
||||||
|
|
||||||
The functionality provided by this control is exposed to application code
|
The functionality provided by this control is exposed to application code
|
||||||
by the meta-data members of QMediaObject, and so meta-data access is
|
by the meta-data members of QMediaObject, and so meta-data access is
|
||||||
@@ -119,13 +118,13 @@ QMetaDataWriterControl::~QMetaDataWriterControl()
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn QVariant QMetaDataWriterControl::metaData(QtMultimedia::MetaData key) const
|
\fn QVariant QMetaDataWriterControl::metaData(const QString &key) const
|
||||||
|
|
||||||
Returns the meta-data for the given \a key.
|
Returns the meta-data for the given \a key.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn void QMetaDataWriterControl::setMetaData(QtMultimedia::MetaData key, const QVariant &value)
|
\fn void QMetaDataWriterControl::setMetaData(const QString &key, const QVariant &value)
|
||||||
|
|
||||||
Sets the \a value of the meta-data element with the given \a key.
|
Sets the \a value of the meta-data element with the given \a key.
|
||||||
*/
|
*/
|
||||||
@@ -136,31 +135,6 @@ QMetaDataWriterControl::~QMetaDataWriterControl()
|
|||||||
Returns a list of keys there is meta-data available for.
|
Returns a list of keys there is meta-data available for.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
|
||||||
\fn QMetaDataWriterControl::extendedMetaData(const QString &key) const
|
|
||||||
|
|
||||||
Returns the meta-data for an abitrary string \a key.
|
|
||||||
|
|
||||||
The valid selection of keys for extended meta-data is determined by the provider and the meaning
|
|
||||||
and type may differ between providers.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\fn QMetaDataWriterControl::setExtendedMetaData(const QString &key, const QVariant &value)
|
|
||||||
|
|
||||||
Change the value of the meta-data element with an abitrary string \a key to \a value.
|
|
||||||
|
|
||||||
The valid selection of keys for extended meta-data is determined by the provider and the meaning
|
|
||||||
and type may differ between providers.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\fn QMetaDataWriterControl::availableExtendedMetaData() const
|
|
||||||
|
|
||||||
Returns a list of keys there is extended meta-data available for.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn void QMetaDataWriterControl::metaDataChanged()
|
\fn void QMetaDataWriterControl::metaDataChanged()
|
||||||
|
|
||||||
|
|||||||
@@ -67,14 +67,9 @@ public:
|
|||||||
virtual bool isWritable() const = 0;
|
virtual bool isWritable() const = 0;
|
||||||
virtual bool isMetaDataAvailable() const = 0;
|
virtual bool isMetaDataAvailable() const = 0;
|
||||||
|
|
||||||
virtual QVariant metaData(QtMultimedia::MetaData key) const = 0;
|
virtual QVariant metaData(const QString &key) const = 0;
|
||||||
virtual void setMetaData(QtMultimedia::MetaData key, const QVariant &value) = 0;
|
virtual void setMetaData(const QString &key, const QVariant &value) = 0;
|
||||||
virtual QList<QtMultimedia::MetaData> availableMetaData() const = 0;
|
virtual QStringList availableMetaData() const = 0;
|
||||||
|
|
||||||
virtual QVariant extendedMetaData(const QString &key) const = 0;
|
|
||||||
virtual void setExtendedMetaData(const QString &key, const QVariant &value) = 0;
|
|
||||||
virtual QStringList availableExtendedMetaData() const = 0;
|
|
||||||
|
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void metaDataChanged();
|
void metaDataChanged();
|
||||||
|
|||||||
@@ -322,7 +322,7 @@ bool QMediaObject::isMetaDataAvailable() const
|
|||||||
/*!
|
/*!
|
||||||
Returns the value associated with a meta-data \a key.
|
Returns the value associated with a meta-data \a key.
|
||||||
*/
|
*/
|
||||||
QVariant QMediaObject::metaData(QtMultimedia::MetaData key) const
|
QVariant QMediaObject::metaData(const QString &key) const
|
||||||
{
|
{
|
||||||
Q_D(const QMediaObject);
|
Q_D(const QMediaObject);
|
||||||
|
|
||||||
@@ -334,13 +334,13 @@ QVariant QMediaObject::metaData(QtMultimedia::MetaData key) const
|
|||||||
/*!
|
/*!
|
||||||
Returns a list of keys there is meta-data available for.
|
Returns a list of keys there is meta-data available for.
|
||||||
*/
|
*/
|
||||||
QList<QtMultimedia::MetaData> QMediaObject::availableMetaData() const
|
QStringList QMediaObject::availableMetaData() const
|
||||||
{
|
{
|
||||||
Q_D(const QMediaObject);
|
Q_D(const QMediaObject);
|
||||||
|
|
||||||
return d->metaDataControl
|
return d->metaDataControl
|
||||||
? d->metaDataControl->availableMetaData()
|
? d->metaDataControl->availableMetaData()
|
||||||
: QList<QtMultimedia::MetaData>();
|
: QStringList();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -349,34 +349,6 @@ QList<QtMultimedia::MetaData> QMediaObject::availableMetaData() const
|
|||||||
Signals that this media object's meta-data has changed.
|
Signals that this media object's meta-data has changed.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
|
||||||
Returns the value associated with a meta-data \a key.
|
|
||||||
|
|
||||||
The naming and type of extended meta-data is not standardized, so the values and meaning
|
|
||||||
of keys may vary between backends.
|
|
||||||
*/
|
|
||||||
QVariant QMediaObject::extendedMetaData(const QString &key) const
|
|
||||||
{
|
|
||||||
Q_D(const QMediaObject);
|
|
||||||
|
|
||||||
return d->metaDataControl
|
|
||||||
? d->metaDataControl->extendedMetaData(key)
|
|
||||||
: QVariant();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
Returns a list of keys there is extended meta-data available for.
|
|
||||||
*/
|
|
||||||
QStringList QMediaObject::availableExtendedMetaData() const
|
|
||||||
{
|
|
||||||
Q_D(const QMediaObject);
|
|
||||||
|
|
||||||
return d->metaDataControl
|
|
||||||
? d->metaDataControl->availableExtendedMetaData()
|
|
||||||
: QStringList();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void QMediaObject::setupMetaData()
|
void QMediaObject::setupMetaData()
|
||||||
{
|
{
|
||||||
Q_D(QMediaObject);
|
Q_D(QMediaObject);
|
||||||
|
|||||||
@@ -79,11 +79,8 @@ public:
|
|||||||
|
|
||||||
bool isMetaDataAvailable() const;
|
bool isMetaDataAvailable() const;
|
||||||
|
|
||||||
QVariant metaData(QtMultimedia::MetaData key) const;
|
QVariant metaData(const QString &key) const;
|
||||||
QList<QtMultimedia::MetaData> availableMetaData() const;
|
QStringList availableMetaData() const;
|
||||||
|
|
||||||
QVariant extendedMetaData(const QString &key) const;
|
|
||||||
QStringList availableExtendedMetaData() const;
|
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void notifyIntervalChanged(int milliSeconds);
|
void notifyIntervalChanged(int milliSeconds);
|
||||||
|
|||||||
@@ -54,17 +54,127 @@ namespace
|
|||||||
{
|
{
|
||||||
qRegisterMetaType<QtMultimedia::AvailabilityError>();
|
qRegisterMetaType<QtMultimedia::AvailabilityError>();
|
||||||
qRegisterMetaType<QtMultimedia::SupportEstimate>();
|
qRegisterMetaType<QtMultimedia::SupportEstimate>();
|
||||||
qRegisterMetaType<QtMultimedia::MetaData>();
|
|
||||||
qRegisterMetaType<QtMultimedia::EncodingMode>();
|
qRegisterMetaType<QtMultimedia::EncodingMode>();
|
||||||
qRegisterMetaType<QtMultimedia::EncodingQuality>();
|
qRegisterMetaType<QtMultimedia::EncodingQuality>();
|
||||||
}
|
}
|
||||||
} _registerMetaTypes;
|
} _registerMetaTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*
|
||||||
\enum QtMultimedia::MetaData
|
When these conditions are satisfied, QStringLiteral is implemented by
|
||||||
|
gcc's statement-expression extension. However, in this file it will
|
||||||
|
not work, because "statement-expressions are not allowed outside functions
|
||||||
|
nor in template-argument lists".
|
||||||
|
|
||||||
This enum provides identifiers for meta-data attributes.
|
Fall back to the less-performant QLatin1String in this case.
|
||||||
|
*/
|
||||||
|
#if defined(QStringLiteral) && defined(QT_UNICODE_LITERAL_II) && defined(Q_CC_GNU) && !defined(Q_COMPILER_LAMBDA)
|
||||||
|
# undef QStringLiteral
|
||||||
|
# define QStringLiteral QLatin1String
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define Q_DEFINE_METADATA(key) const QString QtMultimedia::MetaData::key(QStringLiteral(#key))
|
||||||
|
|
||||||
|
// Common
|
||||||
|
Q_DEFINE_METADATA(Title);
|
||||||
|
Q_DEFINE_METADATA(SubTitle);
|
||||||
|
Q_DEFINE_METADATA(Author);
|
||||||
|
Q_DEFINE_METADATA(Comment);
|
||||||
|
Q_DEFINE_METADATA(Description);
|
||||||
|
Q_DEFINE_METADATA(Category);
|
||||||
|
Q_DEFINE_METADATA(Genre);
|
||||||
|
Q_DEFINE_METADATA(Year);
|
||||||
|
Q_DEFINE_METADATA(Date);
|
||||||
|
Q_DEFINE_METADATA(UserRating);
|
||||||
|
Q_DEFINE_METADATA(Keywords);
|
||||||
|
Q_DEFINE_METADATA(Language);
|
||||||
|
Q_DEFINE_METADATA(Publisher);
|
||||||
|
Q_DEFINE_METADATA(Copyright);
|
||||||
|
Q_DEFINE_METADATA(ParentalRating);
|
||||||
|
Q_DEFINE_METADATA(RatingOrganization);
|
||||||
|
|
||||||
|
// Media
|
||||||
|
Q_DEFINE_METADATA(Size);
|
||||||
|
Q_DEFINE_METADATA(MediaType);
|
||||||
|
Q_DEFINE_METADATA(Duration);
|
||||||
|
|
||||||
|
// Audio
|
||||||
|
Q_DEFINE_METADATA(AudioBitRate);
|
||||||
|
Q_DEFINE_METADATA(AudioCodec);
|
||||||
|
Q_DEFINE_METADATA(AverageLevel);
|
||||||
|
Q_DEFINE_METADATA(ChannelCount);
|
||||||
|
Q_DEFINE_METADATA(PeakValue);
|
||||||
|
Q_DEFINE_METADATA(SampleRate);
|
||||||
|
|
||||||
|
// Music
|
||||||
|
Q_DEFINE_METADATA(AlbumTitle);
|
||||||
|
Q_DEFINE_METADATA(AlbumArtist);
|
||||||
|
Q_DEFINE_METADATA(ContributingArtist);
|
||||||
|
Q_DEFINE_METADATA(Composer);
|
||||||
|
Q_DEFINE_METADATA(Conductor);
|
||||||
|
Q_DEFINE_METADATA(Lyrics);
|
||||||
|
Q_DEFINE_METADATA(Mood);
|
||||||
|
Q_DEFINE_METADATA(TrackNumber);
|
||||||
|
Q_DEFINE_METADATA(TrackCount);
|
||||||
|
|
||||||
|
Q_DEFINE_METADATA(CoverArtUrlSmall);
|
||||||
|
Q_DEFINE_METADATA(CoverArtUrlLarge);
|
||||||
|
|
||||||
|
// Image/Video
|
||||||
|
Q_DEFINE_METADATA(Resolution);
|
||||||
|
Q_DEFINE_METADATA(PixelAspectRatio);
|
||||||
|
|
||||||
|
// Video
|
||||||
|
Q_DEFINE_METADATA(VideoFrameRate);
|
||||||
|
Q_DEFINE_METADATA(VideoBitRate);
|
||||||
|
Q_DEFINE_METADATA(VideoCodec);
|
||||||
|
|
||||||
|
Q_DEFINE_METADATA(PosterUrl);
|
||||||
|
|
||||||
|
// Movie
|
||||||
|
Q_DEFINE_METADATA(ChapterNumber);
|
||||||
|
Q_DEFINE_METADATA(Director);
|
||||||
|
Q_DEFINE_METADATA(LeadPerformer);
|
||||||
|
Q_DEFINE_METADATA(Writer);
|
||||||
|
|
||||||
|
// Photos
|
||||||
|
Q_DEFINE_METADATA(CameraManufacturer);
|
||||||
|
Q_DEFINE_METADATA(CameraModel);
|
||||||
|
Q_DEFINE_METADATA(Event);
|
||||||
|
Q_DEFINE_METADATA(Subject);
|
||||||
|
Q_DEFINE_METADATA(Orientation);
|
||||||
|
Q_DEFINE_METADATA(ExposureTime);
|
||||||
|
Q_DEFINE_METADATA(FNumber);
|
||||||
|
Q_DEFINE_METADATA(ExposureProgram);
|
||||||
|
Q_DEFINE_METADATA(ISOSpeedRatings);
|
||||||
|
Q_DEFINE_METADATA(ExposureBiasValue);
|
||||||
|
Q_DEFINE_METADATA(DateTimeOriginal);
|
||||||
|
Q_DEFINE_METADATA(DateTimeDigitized);
|
||||||
|
Q_DEFINE_METADATA(SubjectDistance);
|
||||||
|
Q_DEFINE_METADATA(MeteringMode);
|
||||||
|
Q_DEFINE_METADATA(LightSource);
|
||||||
|
Q_DEFINE_METADATA(Flash);
|
||||||
|
Q_DEFINE_METADATA(FocalLength);
|
||||||
|
Q_DEFINE_METADATA(ExposureMode);
|
||||||
|
Q_DEFINE_METADATA(WhiteBalance);
|
||||||
|
Q_DEFINE_METADATA(DigitalZoomRatio);
|
||||||
|
Q_DEFINE_METADATA(FocalLengthIn35mmFilm);
|
||||||
|
Q_DEFINE_METADATA(SceneCaptureType);
|
||||||
|
Q_DEFINE_METADATA(GainControl);
|
||||||
|
Q_DEFINE_METADATA(Contrast);
|
||||||
|
Q_DEFINE_METADATA(Saturation);
|
||||||
|
Q_DEFINE_METADATA(Sharpness);
|
||||||
|
Q_DEFINE_METADATA(DeviceSettingDescription);
|
||||||
|
|
||||||
|
Q_DEFINE_METADATA(PosterImage);
|
||||||
|
Q_DEFINE_METADATA(CoverArtImage);
|
||||||
|
Q_DEFINE_METADATA(ThumbnailImage);
|
||||||
|
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\namespace QtMultimedia::MetaData
|
||||||
|
|
||||||
|
This namespace provides identifiers for meta-data attributes.
|
||||||
|
|
||||||
\note Not all identifiers are supported on all platforms. Please consult vendor documentation for specific support
|
\note Not all identifiers are supported on all platforms. Please consult vendor documentation for specific support
|
||||||
on different platforms.
|
on different platforms.
|
||||||
|
|||||||
@@ -44,6 +44,7 @@
|
|||||||
|
|
||||||
#include <QtCore/qpair.h>
|
#include <QtCore/qpair.h>
|
||||||
#include <QtCore/qmetatype.h>
|
#include <QtCore/qmetatype.h>
|
||||||
|
#include <QtCore/qstring.h>
|
||||||
|
|
||||||
#include <qtmultimediadefs.h>
|
#include <qtmultimediadefs.h>
|
||||||
|
|
||||||
@@ -53,106 +54,106 @@ QT_BEGIN_NAMESPACE
|
|||||||
|
|
||||||
QT_MODULE(Multimedia)
|
QT_MODULE(Multimedia)
|
||||||
|
|
||||||
|
#define Q_DECLARE_METADATA(key) Q_MULTIMEDIA_EXPORT extern const QString key
|
||||||
|
|
||||||
namespace QtMultimedia
|
namespace QtMultimedia
|
||||||
{
|
{
|
||||||
enum MetaData
|
namespace MetaData {
|
||||||
{
|
|
||||||
// Common
|
// Common
|
||||||
Title,
|
Q_DECLARE_METADATA(Title);
|
||||||
SubTitle,
|
Q_DECLARE_METADATA(SubTitle);
|
||||||
Author,
|
Q_DECLARE_METADATA(Author);
|
||||||
Comment,
|
Q_DECLARE_METADATA(Comment);
|
||||||
Description,
|
Q_DECLARE_METADATA(Description);
|
||||||
Category,
|
Q_DECLARE_METADATA(Category);
|
||||||
Genre,
|
Q_DECLARE_METADATA(Genre);
|
||||||
Year,
|
Q_DECLARE_METADATA(Year);
|
||||||
Date,
|
Q_DECLARE_METADATA(Date);
|
||||||
UserRating,
|
Q_DECLARE_METADATA(UserRating);
|
||||||
Keywords,
|
Q_DECLARE_METADATA(Keywords);
|
||||||
Language,
|
Q_DECLARE_METADATA(Language);
|
||||||
Publisher,
|
Q_DECLARE_METADATA(Publisher);
|
||||||
Copyright,
|
Q_DECLARE_METADATA(Copyright);
|
||||||
ParentalRating,
|
Q_DECLARE_METADATA(ParentalRating);
|
||||||
RatingOrganization,
|
Q_DECLARE_METADATA(RatingOrganization);
|
||||||
|
|
||||||
// Media
|
// Media
|
||||||
Size,
|
Q_DECLARE_METADATA(Size);
|
||||||
MediaType,
|
Q_DECLARE_METADATA(MediaType);
|
||||||
Duration,
|
Q_DECLARE_METADATA(Duration);
|
||||||
|
|
||||||
// Audio
|
// Audio
|
||||||
AudioBitRate,
|
Q_DECLARE_METADATA(AudioBitRate);
|
||||||
AudioCodec,
|
Q_DECLARE_METADATA(AudioCodec);
|
||||||
AverageLevel,
|
Q_DECLARE_METADATA(AverageLevel);
|
||||||
ChannelCount,
|
Q_DECLARE_METADATA(ChannelCount);
|
||||||
PeakValue,
|
Q_DECLARE_METADATA(PeakValue);
|
||||||
SampleRate,
|
Q_DECLARE_METADATA(SampleRate);
|
||||||
|
|
||||||
// Music
|
// Music
|
||||||
AlbumTitle,
|
Q_DECLARE_METADATA(AlbumTitle);
|
||||||
AlbumArtist,
|
Q_DECLARE_METADATA(AlbumArtist);
|
||||||
ContributingArtist,
|
Q_DECLARE_METADATA(ContributingArtist);
|
||||||
Composer,
|
Q_DECLARE_METADATA(Composer);
|
||||||
Conductor,
|
Q_DECLARE_METADATA(Conductor);
|
||||||
Lyrics,
|
Q_DECLARE_METADATA(Lyrics);
|
||||||
Mood,
|
Q_DECLARE_METADATA(Mood);
|
||||||
TrackNumber,
|
Q_DECLARE_METADATA(TrackNumber);
|
||||||
TrackCount,
|
Q_DECLARE_METADATA(TrackCount);
|
||||||
|
|
||||||
CoverArtUrlSmall,
|
Q_DECLARE_METADATA(CoverArtUrlSmall);
|
||||||
CoverArtUrlLarge,
|
Q_DECLARE_METADATA(CoverArtUrlLarge);
|
||||||
|
|
||||||
// Image/Video
|
// Image/Video
|
||||||
Resolution,
|
Q_DECLARE_METADATA(Resolution);
|
||||||
PixelAspectRatio,
|
Q_DECLARE_METADATA(PixelAspectRatio);
|
||||||
|
|
||||||
// Video
|
// Video
|
||||||
VideoFrameRate,
|
Q_DECLARE_METADATA(VideoFrameRate);
|
||||||
VideoBitRate,
|
Q_DECLARE_METADATA(VideoBitRate);
|
||||||
VideoCodec,
|
Q_DECLARE_METADATA(VideoCodec);
|
||||||
|
|
||||||
PosterUrl,
|
Q_DECLARE_METADATA(PosterUrl);
|
||||||
|
|
||||||
// Movie
|
// Movie
|
||||||
ChapterNumber,
|
Q_DECLARE_METADATA(ChapterNumber);
|
||||||
Director,
|
Q_DECLARE_METADATA(Director);
|
||||||
LeadPerformer,
|
Q_DECLARE_METADATA(LeadPerformer);
|
||||||
Writer,
|
Q_DECLARE_METADATA(Writer);
|
||||||
|
|
||||||
// Photos
|
// Photos
|
||||||
CameraManufacturer,
|
Q_DECLARE_METADATA(CameraManufacturer);
|
||||||
CameraModel,
|
Q_DECLARE_METADATA(CameraModel);
|
||||||
Event,
|
Q_DECLARE_METADATA(Event);
|
||||||
Subject,
|
Q_DECLARE_METADATA(Subject);
|
||||||
Orientation,
|
Q_DECLARE_METADATA(Orientation);
|
||||||
ExposureTime,
|
Q_DECLARE_METADATA(ExposureTime);
|
||||||
FNumber,
|
Q_DECLARE_METADATA(FNumber);
|
||||||
ExposureProgram,
|
Q_DECLARE_METADATA(ExposureProgram);
|
||||||
ISOSpeedRatings,
|
Q_DECLARE_METADATA(ISOSpeedRatings);
|
||||||
ExposureBiasValue,
|
Q_DECLARE_METADATA(ExposureBiasValue);
|
||||||
DateTimeOriginal,
|
Q_DECLARE_METADATA(DateTimeOriginal);
|
||||||
DateTimeDigitized,
|
Q_DECLARE_METADATA(DateTimeDigitized);
|
||||||
SubjectDistance,
|
Q_DECLARE_METADATA(SubjectDistance);
|
||||||
MeteringMode,
|
Q_DECLARE_METADATA(MeteringMode);
|
||||||
LightSource,
|
Q_DECLARE_METADATA(LightSource);
|
||||||
Flash,
|
Q_DECLARE_METADATA(Flash);
|
||||||
FocalLength,
|
Q_DECLARE_METADATA(FocalLength);
|
||||||
ExposureMode,
|
Q_DECLARE_METADATA(ExposureMode);
|
||||||
WhiteBalance,
|
Q_DECLARE_METADATA(WhiteBalance);
|
||||||
DigitalZoomRatio,
|
Q_DECLARE_METADATA(DigitalZoomRatio);
|
||||||
FocalLengthIn35mmFilm,
|
Q_DECLARE_METADATA(FocalLengthIn35mmFilm);
|
||||||
SceneCaptureType,
|
Q_DECLARE_METADATA(SceneCaptureType);
|
||||||
GainControl,
|
Q_DECLARE_METADATA(GainControl);
|
||||||
Contrast,
|
Q_DECLARE_METADATA(Contrast);
|
||||||
Saturation,
|
Q_DECLARE_METADATA(Saturation);
|
||||||
Sharpness,
|
Q_DECLARE_METADATA(Sharpness);
|
||||||
DeviceSettingDescription,
|
Q_DECLARE_METADATA(DeviceSettingDescription);
|
||||||
|
|
||||||
PosterImage,
|
Q_DECLARE_METADATA(PosterImage);
|
||||||
CoverArtImage,
|
Q_DECLARE_METADATA(CoverArtImage);
|
||||||
ThumbnailImage
|
Q_DECLARE_METADATA(ThumbnailImage);
|
||||||
|
}
|
||||||
};
|
|
||||||
|
|
||||||
enum SupportEstimate
|
enum SupportEstimate
|
||||||
{
|
{
|
||||||
@@ -189,11 +190,12 @@ namespace QtMultimedia
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#undef Q_DECLARE_METADATA
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
Q_DECLARE_METATYPE(QtMultimedia::AvailabilityError)
|
Q_DECLARE_METATYPE(QtMultimedia::AvailabilityError)
|
||||||
Q_DECLARE_METATYPE(QtMultimedia::SupportEstimate)
|
Q_DECLARE_METATYPE(QtMultimedia::SupportEstimate)
|
||||||
Q_DECLARE_METATYPE(QtMultimedia::MetaData)
|
|
||||||
Q_DECLARE_METATYPE(QtMultimedia::EncodingMode)
|
Q_DECLARE_METATYPE(QtMultimedia::EncodingMode)
|
||||||
Q_DECLARE_METATYPE(QtMultimedia::EncodingQuality)
|
Q_DECLARE_METATYPE(QtMultimedia::EncodingQuality)
|
||||||
|
|
||||||
|
|||||||
@@ -764,7 +764,7 @@ bool QMediaRecorder::isMetaDataWritable() const
|
|||||||
/*!
|
/*!
|
||||||
Returns the value associated with a meta-data \a key.
|
Returns the value associated with a meta-data \a key.
|
||||||
*/
|
*/
|
||||||
QVariant QMediaRecorder::metaData(QtMultimedia::MetaData key) const
|
QVariant QMediaRecorder::metaData(const QString &key) const
|
||||||
{
|
{
|
||||||
Q_D(const QMediaRecorder);
|
Q_D(const QMediaRecorder);
|
||||||
|
|
||||||
@@ -779,7 +779,7 @@ QVariant QMediaRecorder::metaData(QtMultimedia::MetaData key) const
|
|||||||
\note To ensure that meta data is set corretly, it should be set before starting the recording.
|
\note To ensure that meta data is set corretly, it should be set before starting the recording.
|
||||||
Once the recording is stopped, any meta data set will be attached to the next recording.
|
Once the recording is stopped, any meta data set will be attached to the next recording.
|
||||||
*/
|
*/
|
||||||
void QMediaRecorder::setMetaData(QtMultimedia::MetaData key, const QVariant &value)
|
void QMediaRecorder::setMetaData(const QString &key, const QVariant &value)
|
||||||
{
|
{
|
||||||
Q_D(QMediaRecorder);
|
Q_D(QMediaRecorder);
|
||||||
|
|
||||||
@@ -790,13 +790,13 @@ void QMediaRecorder::setMetaData(QtMultimedia::MetaData key, const QVariant &val
|
|||||||
/*!
|
/*!
|
||||||
Returns a list of keys there is meta-data available for.
|
Returns a list of keys there is meta-data available for.
|
||||||
*/
|
*/
|
||||||
QList<QtMultimedia::MetaData> QMediaRecorder::availableMetaData() const
|
QStringList QMediaRecorder::availableMetaData() const
|
||||||
{
|
{
|
||||||
Q_D(const QMediaRecorder);
|
Q_D(const QMediaRecorder);
|
||||||
|
|
||||||
return d->metaDataControl
|
return d->metaDataControl
|
||||||
? d->metaDataControl->availableMetaData()
|
? d->metaDataControl->availableMetaData()
|
||||||
: QList<QtMultimedia::MetaData>();
|
: QStringList();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -805,47 +805,6 @@ QList<QtMultimedia::MetaData> QMediaRecorder::availableMetaData() const
|
|||||||
Signals that a media object's meta-data has changed.
|
Signals that a media object's meta-data has changed.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
|
||||||
Returns the value associated with a meta-data \a key.
|
|
||||||
|
|
||||||
The naming and type of extended meta-data is not standardized, so the values and meaning
|
|
||||||
of keys may vary between backends.
|
|
||||||
*/
|
|
||||||
QVariant QMediaRecorder::extendedMetaData(const QString &key) const
|
|
||||||
{
|
|
||||||
Q_D(const QMediaRecorder);
|
|
||||||
|
|
||||||
return d->metaDataControl
|
|
||||||
? d->metaDataControl->extendedMetaData(key)
|
|
||||||
: QVariant();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
Sets a \a value for a meta-data \a key.
|
|
||||||
|
|
||||||
The naming and type of extended meta-data is not standardized, so the values and meaning
|
|
||||||
of keys may vary between backends.
|
|
||||||
*/
|
|
||||||
void QMediaRecorder::setExtendedMetaData(const QString &key, const QVariant &value)
|
|
||||||
{
|
|
||||||
Q_D(QMediaRecorder);
|
|
||||||
|
|
||||||
if (d->metaDataControl)
|
|
||||||
d->metaDataControl->setExtendedMetaData(key, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
Returns a list of keys there is extended meta-data available for.
|
|
||||||
*/
|
|
||||||
QStringList QMediaRecorder::availableExtendedMetaData() const
|
|
||||||
{
|
|
||||||
Q_D(const QMediaRecorder);
|
|
||||||
|
|
||||||
return d->metaDataControl
|
|
||||||
? d->metaDataControl->availableExtendedMetaData()
|
|
||||||
: QStringList();
|
|
||||||
}
|
|
||||||
|
|
||||||
#include "moc_qmediarecorder.cpp"
|
#include "moc_qmediarecorder.cpp"
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
|||||||
@@ -145,13 +145,9 @@ public:
|
|||||||
bool isMetaDataAvailable() const;
|
bool isMetaDataAvailable() const;
|
||||||
bool isMetaDataWritable() const;
|
bool isMetaDataWritable() const;
|
||||||
|
|
||||||
QVariant metaData(QtMultimedia::MetaData key) const;
|
QVariant metaData(const QString &key) const;
|
||||||
void setMetaData(QtMultimedia::MetaData key, const QVariant &value);
|
void setMetaData(const QString &key, const QVariant &value);
|
||||||
QList<QtMultimedia::MetaData> availableMetaData() const;
|
QStringList availableMetaData() const;
|
||||||
|
|
||||||
QVariant extendedMetaData(const QString &key) const;
|
|
||||||
void setExtendedMetaData(const QString &key, const QVariant &value);
|
|
||||||
QStringList availableExtendedMetaData() const;
|
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
void record();
|
void record();
|
||||||
|
|||||||
@@ -54,76 +54,76 @@ namespace
|
|||||||
{
|
{
|
||||||
struct QWMMetaDataKeyLookup
|
struct QWMMetaDataKeyLookup
|
||||||
{
|
{
|
||||||
QtMultimedia::MetaData key;
|
QString key;
|
||||||
const wchar_t *token;
|
const wchar_t *token;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
static const QWMMetaDataKeyLookup qt_wmMetaDataKeys[] =
|
static const QWMMetaDataKeyLookup qt_wmMetaDataKeys[] =
|
||||||
{
|
{
|
||||||
{ QtMultimedia::Title, L"Title" },
|
{ QtMultimedia::MetaData::Title, L"Title" },
|
||||||
{ QtMultimedia::SubTitle, L"WM/SubTitle" },
|
{ QtMultimedia::MetaData::SubTitle, L"WM/SubTitle" },
|
||||||
{ QtMultimedia::Author, L"Author" },
|
{ QtMultimedia::MetaData::Author, L"Author" },
|
||||||
{ QtMultimedia::Comment, L"Comment" },
|
{ QtMultimedia::MetaData::Comment, L"Comment" },
|
||||||
{ QtMultimedia::Description, L"Description" },
|
{ QtMultimedia::MetaData::Description, L"Description" },
|
||||||
{ QtMultimedia::Category, L"WM/Category" },
|
{ QtMultimedia::MetaData::Category, L"WM/Category" },
|
||||||
{ QtMultimedia::Genre, L"WM/Genre" },
|
{ QtMultimedia::MetaData::Genre, L"WM/Genre" },
|
||||||
//{ QtMultimedia::Date, 0 },
|
//{ QtMultimedia::MetaData::Date, 0 },
|
||||||
{ QtMultimedia::Year, L"WM/Year" },
|
{ QtMultimedia::MetaData::Year, L"WM/Year" },
|
||||||
{ QtMultimedia::UserRating, L"UserRating" },
|
{ QtMultimedia::MetaData::UserRating, L"UserRating" },
|
||||||
//{ QtMultimedia::MetaDatawords, 0 },
|
//{ QtMultimedia::MetaData::MetaDatawords, 0 },
|
||||||
{ QtMultimedia::Language, L"Language" },
|
{ QtMultimedia::MetaData::Language, L"Language" },
|
||||||
{ QtMultimedia::Publisher, L"WM/Publisher" },
|
{ QtMultimedia::MetaData::Publisher, L"WM/Publisher" },
|
||||||
{ QtMultimedia::Copyright, L"Copyright" },
|
{ QtMultimedia::MetaData::Copyright, L"Copyright" },
|
||||||
{ QtMultimedia::ParentalRating, L"ParentalRating" },
|
{ QtMultimedia::MetaData::ParentalRating, L"ParentalRating" },
|
||||||
{ QtMultimedia::RatingOrganization, L"RatingOrganisation" },
|
{ QtMultimedia::MetaData::RatingOrganisation, L"RatingOrganisation" },
|
||||||
|
|
||||||
// Media
|
// Media
|
||||||
{ QtMultimedia::Size, L"FileSize" },
|
{ QtMultimedia::MetaData::Size, L"FileSize" },
|
||||||
{ QtMultimedia::MediaType, L"MediaType" },
|
{ QtMultimedia::MetaData::MediaType, L"MediaType" },
|
||||||
{ QtMultimedia::Duration, L"Duration" },
|
{ QtMultimedia::MetaData::Duration, L"Duration" },
|
||||||
|
|
||||||
// Audio
|
// Audio
|
||||||
{ QtMultimedia::AudioBitRate, L"AudioBitRate" },
|
{ QtMultimedia::MetaData::AudioBitRate, L"AudioBitRate" },
|
||||||
{ QtMultimedia::AudioCodec, L"AudioCodec" },
|
{ QtMultimedia::MetaData::AudioCodec, L"AudioCodec" },
|
||||||
{ QtMultimedia::ChannelCount, L"ChannelCount" },
|
{ QtMultimedia::MetaData::ChannelCount, L"ChannelCount" },
|
||||||
{ QtMultimedia::SampleRate, L"Frequency" },
|
{ QtMultimedia::MetaData::SampleRate, L"Frequency" },
|
||||||
|
|
||||||
// Music
|
// Music
|
||||||
{ QtMultimedia::AlbumTitle, L"WM/AlbumTitle" },
|
{ QtMultimedia::MetaData::AlbumTitle, L"WM/AlbumTitle" },
|
||||||
{ QtMultimedia::AlbumArtist, L"WM/AlbumArtist" },
|
{ QtMultimedia::MetaData::AlbumArtist, L"WM/AlbumArtist" },
|
||||||
{ QtMultimedia::ContributingArtist, L"Author" },
|
{ QtMultimedia::MetaData::ContributingArtist, L"Author" },
|
||||||
{ QtMultimedia::Composer, L"WM/Composer" },
|
{ QtMultimedia::MetaData::Composer, L"WM/Composer" },
|
||||||
{ QtMultimedia::Conductor, L"WM/Conductor" },
|
{ QtMultimedia::MetaData::Conductor, L"WM/Conductor" },
|
||||||
{ QtMultimedia::Lyrics, L"WM/Lyrics" },
|
{ QtMultimedia::MetaData::Lyrics, L"WM/Lyrics" },
|
||||||
{ QtMultimedia::Mood, L"WM/Mood" },
|
{ QtMultimedia::MetaData::Mood, L"WM/Mood" },
|
||||||
{ QtMultimedia::TrackNumber, L"WM/TrackNumber" },
|
{ QtMultimedia::MetaData::TrackNumber, L"WM/TrackNumber" },
|
||||||
//{ QtMultimedia::TrackCount, 0 },
|
//{ QtMultimedia::MetaData::TrackCount, 0 },
|
||||||
//{ QtMultimedia::CoverArtUriSmall, 0 },
|
//{ QtMultimedia::MetaData::CoverArtUriSmall, 0 },
|
||||||
//{ QtMultimedia::CoverArtUriLarge, 0 },
|
//{ QtMultimedia::MetaData::CoverArtUriLarge, 0 },
|
||||||
|
|
||||||
// Image/Video
|
// Image/Video
|
||||||
//{ QtMultimedia::Resolution, 0 },
|
//{ QtMultimedia::MetaData::Resolution, 0 },
|
||||||
//{ QtMultimedia::PixelAspectRatio, 0 },
|
//{ QtMultimedia::MetaData::PixelAspectRatio, 0 },
|
||||||
|
|
||||||
// Video
|
// Video
|
||||||
//{ QtMultimedia::FrameRate, 0 },
|
//{ QtMultimedia::MetaData::FrameRate, 0 },
|
||||||
{ QtMultimedia::VideoBitRate, L"VideoBitRate" },
|
{ QtMultimedia::MetaData::VideoBitRate, L"VideoBitRate" },
|
||||||
{ QtMultimedia::VideoCodec, L"VideoCodec" },
|
{ QtMultimedia::MetaData::VideoCodec, L"VideoCodec" },
|
||||||
|
|
||||||
//{ QtMultimedia::PosterUri, 0 },
|
//{ QtMultimedia::MetaData::PosterUri, 0 },
|
||||||
|
|
||||||
// Movie
|
// Movie
|
||||||
{ QtMultimedia::ChapterNumber, L"ChapterNumber" },
|
{ QtMultimedia::MetaData::ChapterNumber, L"ChapterNumber" },
|
||||||
{ QtMultimedia::Director, L"WM/Director" },
|
{ QtMultimedia::MetaData::Director, L"WM/Director" },
|
||||||
{ QtMultimedia::LeadPerformer, L"LeadPerformer" },
|
{ QtMultimedia::MetaData::LeadPerformer, L"LeadPerformer" },
|
||||||
{ QtMultimedia::Writer, L"WM/Writer" },
|
{ QtMultimedia::MetaData::Writer, L"WM/Writer" },
|
||||||
|
|
||||||
// Photos
|
// Photos
|
||||||
{ QtMultimedia::CameraManufacturer, L"CameraManufacturer" },
|
{ QtMultimedia::MetaData::CameraManufacturer, L"CameraManufacturer" },
|
||||||
{ QtMultimedia::CameraModel, L"CameraModel" },
|
{ QtMultimedia::MetaData::CameraModel, L"CameraModel" },
|
||||||
{ QtMultimedia::Event, L"Event" },
|
{ QtMultimedia::MetaData::Event, L"Event" },
|
||||||
{ QtMultimedia::Subject, L"Subject" }
|
{ QtMultimedia::MetaData::Subject, L"Subject" }
|
||||||
};
|
};
|
||||||
|
|
||||||
static QVariant getValue(IWMHeaderInfo *header, const wchar_t *key)
|
static QVariant getValue(IWMHeaderInfo *header, const wchar_t *key)
|
||||||
@@ -249,7 +249,7 @@ bool DirectShowMetaDataControl::isMetaDataAvailable() const
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant DirectShowMetaDataControl::metaData(QtMultimedia::MetaData key) const
|
QVariant DirectShowMetaDataControl::metaData(const QString &key) const
|
||||||
{
|
{
|
||||||
QVariant value;
|
QVariant value;
|
||||||
|
|
||||||
@@ -268,25 +268,16 @@ QVariant DirectShowMetaDataControl::metaData(QtMultimedia::MetaData key) const
|
|||||||
#endif
|
#endif
|
||||||
BSTR string = 0;
|
BSTR string = 0;
|
||||||
|
|
||||||
switch (key) {
|
if (key == QtMultimedia::MetaData::Author)
|
||||||
case QtMultimedia::Author:
|
|
||||||
m_content->get_AuthorName(&string);
|
m_content->get_AuthorName(&string);
|
||||||
break;
|
else if (key == QtMultimedia::MetaData::Title)
|
||||||
case QtMultimedia::Title:
|
|
||||||
m_content->get_Title(&string);
|
m_content->get_Title(&string);
|
||||||
break;
|
else if (key == QtMultimedia::MetaData::ParentalRating)
|
||||||
case QtMultimedia::ParentalRating:
|
|
||||||
m_content->get_Rating(&string);
|
m_content->get_Rating(&string);
|
||||||
break;
|
else if (key == QtMultimedia::MetaData::Description)
|
||||||
case QtMultimedia::Description:
|
|
||||||
m_content->get_Description(&string);
|
m_content->get_Description(&string);
|
||||||
break;
|
else if (key == QtMultimedia::MetaData::Copyright)
|
||||||
case QtMultimedia::Copyright:
|
|
||||||
m_content->get_Copyright(&string);
|
m_content->get_Copyright(&string);
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (string) {
|
if (string) {
|
||||||
value = QString::fromUtf16(reinterpret_cast<ushort *>(string), ::SysStringLen(string));
|
value = QString::fromUtf16(reinterpret_cast<ushort *>(string), ::SysStringLen(string));
|
||||||
@@ -297,17 +288,7 @@ QVariant DirectShowMetaDataControl::metaData(QtMultimedia::MetaData key) const
|
|||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<QtMultimedia::MetaData> DirectShowMetaDataControl::availableMetaData() const
|
QStringList DirectShowMetaDataControl::availableMetaData() const
|
||||||
{
|
|
||||||
return QList<QtMultimedia::MetaData>();
|
|
||||||
}
|
|
||||||
|
|
||||||
QVariant DirectShowMetaDataControl::extendedMetaData(const QString &) const
|
|
||||||
{
|
|
||||||
return QVariant();
|
|
||||||
}
|
|
||||||
|
|
||||||
QStringList DirectShowMetaDataControl::availableExtendedMetaData() const
|
|
||||||
{
|
{
|
||||||
return QStringList();
|
return QStringList();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,11 +67,8 @@ public:
|
|||||||
|
|
||||||
bool isMetaDataAvailable() const;
|
bool isMetaDataAvailable() const;
|
||||||
|
|
||||||
QVariant metaData(QtMultimedia::MetaData key) const;
|
QVariant metaData(const QString &key) const;
|
||||||
QList<QtMultimedia::MetaData> availableMetaData() const;
|
QStringList availableMetaData() const;
|
||||||
|
|
||||||
QVariant extendedMetaData(const QString &key) const;
|
|
||||||
QStringList availableExtendedMetaData() const;
|
|
||||||
|
|
||||||
void updateGraph(IFilterGraph2 *graph, IBaseFilter *source);
|
void updateGraph(IFilterGraph2 *graph, IBaseFilter *source);
|
||||||
|
|
||||||
|
|||||||
@@ -124,26 +124,26 @@ gboolean CameraBinImageCapture::metadataEventProbe(GstPad *pad, GstEvent *event,
|
|||||||
qDebug() << "Capture event probe" << extendedTags;
|
qDebug() << "Capture event probe" << extendedTags;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QMap<QtMultimedia::MetaData, QVariant> tags;
|
QVariantMap tags;
|
||||||
tags[QtMultimedia::ISOSpeedRatings] = extendedTags.value("capturing-iso-speed");
|
tags[QtMultimedia::MetaData::ISOSpeedRatings] = extendedTags.value("capturing-iso-speed");
|
||||||
tags[QtMultimedia::DigitalZoomRatio] = extendedTags.value("capturing-digital-zoom-ratio");
|
tags[QtMultimedia::MetaData::DigitalZoomRatio] = extendedTags.value("capturing-digital-zoom-ratio");
|
||||||
tags[QtMultimedia::ExposureTime] = extendedTags.value("capturing-shutter-speed");
|
tags[QtMultimedia::MetaData::ExposureTime] = extendedTags.value("capturing-shutter-speed");
|
||||||
tags[QtMultimedia::WhiteBalance] = extendedTags.value("capturing-white-balance");
|
tags[QtMultimedia::MetaData::WhiteBalance] = extendedTags.value("capturing-white-balance");
|
||||||
tags[QtMultimedia::Flash] = extendedTags.value("capturing-flash-fired");
|
tags[QtMultimedia::MetaData::Flash] = extendedTags.value("capturing-flash-fired");
|
||||||
tags[QtMultimedia::FocalLengthIn35mmFilm] = extendedTags.value("capturing-focal-length");
|
tags[QtMultimedia::MetaData::FocalLengthIn35mmFilm] = extendedTags.value("capturing-focal-length");
|
||||||
tags[QtMultimedia::MeteringMode] = extendedTags.value("capturing-metering-mode");
|
tags[QtMultimedia::MetaData::MeteringMode] = extendedTags.value("capturing-metering-mode");
|
||||||
tags[QtMultimedia::ExposureMode] = extendedTags.value("capturing-exposure-mode");
|
tags[QtMultimedia::MetaData::ExposureMode] = extendedTags.value("capturing-exposure-mode");
|
||||||
tags[QtMultimedia::FNumber] = extendedTags.value("capturing-focal-ratio");
|
tags[QtMultimedia::MetaData::FNumber] = extendedTags.value("capturing-focal-ratio");
|
||||||
tags[QtMultimedia::ExposureMode] = extendedTags.value("capturing-exposure-mode");
|
tags[QtMultimedia::MetaData::ExposureMode] = extendedTags.value("capturing-exposure-mode");
|
||||||
|
|
||||||
QMapIterator<QtMultimedia::MetaData, QVariant> i(tags);
|
QMapIterator<QString, QVariant> i(tags);
|
||||||
while (i.hasNext()) {
|
while (i.hasNext()) {
|
||||||
i.next();
|
i.next();
|
||||||
if (i.value().isValid()) {
|
if (i.value().isValid()) {
|
||||||
QMetaObject::invokeMethod(self, "imageMetadataAvailable",
|
QMetaObject::invokeMethod(self, "imageMetadataAvailable",
|
||||||
Qt::QueuedConnection,
|
Qt::QueuedConnection,
|
||||||
Q_ARG(int, self->m_requestId),
|
Q_ARG(int, self->m_requestId),
|
||||||
Q_ARG(QtMultimedia::MetaData, i.key()),
|
Q_ARG(QString, i.key()),
|
||||||
Q_ARG(QVariant, i.value()));
|
Q_ARG(QVariant, i.value()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,77 +46,77 @@
|
|||||||
|
|
||||||
struct QGstreamerMetaDataKeyLookup
|
struct QGstreamerMetaDataKeyLookup
|
||||||
{
|
{
|
||||||
QtMultimedia::MetaData key;
|
QString key;
|
||||||
const char *token;
|
const char *token;
|
||||||
};
|
};
|
||||||
|
|
||||||
static const QGstreamerMetaDataKeyLookup qt_gstreamerMetaDataKeys[] =
|
static const QGstreamerMetaDataKeyLookup qt_gstreamerMetaDataKeys[] =
|
||||||
{
|
{
|
||||||
{ QtMultimedia::Title, GST_TAG_TITLE },
|
{ QtMultimedia::MetaData::Title, GST_TAG_TITLE },
|
||||||
//{ QtMultimedia::SubTitle, 0 },
|
//{ QtMultimedia::MetaData::SubTitle, 0 },
|
||||||
//{ QtMultimedia::Author, 0 },
|
//{ QtMultimedia::MetaData::Author, 0 },
|
||||||
{ QtMultimedia::Comment, GST_TAG_COMMENT },
|
{ QtMultimedia::MetaData::Comment, GST_TAG_COMMENT },
|
||||||
{ QtMultimedia::Description, GST_TAG_DESCRIPTION },
|
{ QtMultimedia::MetaData::Description, GST_TAG_DESCRIPTION },
|
||||||
//{ QtMultimedia::Category, 0 },
|
//{ QtMultimedia::MetaData::Category, 0 },
|
||||||
{ QtMultimedia::Genre, GST_TAG_GENRE },
|
{ QtMultimedia::MetaData::Genre, GST_TAG_GENRE },
|
||||||
//{ QtMultimedia::Year, 0 },
|
//{ QtMultimedia::MetaData::Year, 0 },
|
||||||
//{ QtMultimedia::UserRating, 0 },
|
//{ QtMultimedia::MetaData::UserRating, 0 },
|
||||||
|
|
||||||
{ QtMultimedia::Language, GST_TAG_LANGUAGE_CODE },
|
{ QtMultimedia::MetaData::Language, GST_TAG_LANGUAGE_CODE },
|
||||||
|
|
||||||
{ QtMultimedia::Publisher, GST_TAG_ORGANIZATION },
|
{ QtMultimedia::MetaData::Publisher, GST_TAG_ORGANIZATION },
|
||||||
{ QtMultimedia::Copyright, GST_TAG_COPYRIGHT },
|
{ QtMultimedia::MetaData::Copyright, GST_TAG_COPYRIGHT },
|
||||||
//{ QtMultimedia::ParentalRating, 0 },
|
//{ QtMultimedia::MetaData::ParentalRating, 0 },
|
||||||
//{ QtMultimedia::RatingOrganization, 0 },
|
//{ QtMultimedia::MetaData::RatingOrganisation, 0 },
|
||||||
|
|
||||||
// Media
|
// Media
|
||||||
//{ QtMultimedia::Size, 0 },
|
//{ QtMultimedia::MetaData::Size, 0 },
|
||||||
//{ QtMultimedia::MediaType, 0 },
|
//{ QtMultimedia::MetaData::MediaType, 0 },
|
||||||
{ QtMultimedia::Duration, GST_TAG_DURATION },
|
{ QtMultimedia::MetaData::Duration, GST_TAG_DURATION },
|
||||||
|
|
||||||
// Audio
|
// Audio
|
||||||
{ QtMultimedia::AudioBitRate, GST_TAG_BITRATE },
|
{ QtMultimedia::MetaData::AudioBitRate, GST_TAG_BITRATE },
|
||||||
{ QtMultimedia::AudioCodec, GST_TAG_AUDIO_CODEC },
|
{ QtMultimedia::MetaData::AudioCodec, GST_TAG_AUDIO_CODEC },
|
||||||
//{ QtMultimedia::ChannelCount, 0 },
|
//{ QtMultimedia::MetaData::ChannelCount, 0 },
|
||||||
//{ QtMultimedia::SampleRate, 0 },
|
//{ QtMultimedia::MetaData::SampleRate, 0 },
|
||||||
|
|
||||||
// Music
|
// Music
|
||||||
{ QtMultimedia::AlbumTitle, GST_TAG_ALBUM },
|
{ QtMultimedia::MetaData::AlbumTitle, GST_TAG_ALBUM },
|
||||||
{ QtMultimedia::AlbumArtist, GST_TAG_ARTIST},
|
{ QtMultimedia::MetaData::AlbumArtist, GST_TAG_ARTIST},
|
||||||
{ QtMultimedia::ContributingArtist, GST_TAG_PERFORMER },
|
{ QtMultimedia::MetaData::ContributingArtist, GST_TAG_PERFORMER },
|
||||||
#if (GST_VERSION_MAJOR >= 0) && (GST_VERSION_MINOR >= 10) && (GST_VERSION_MICRO >= 19)
|
#if (GST_VERSION_MAJOR >= 0) && (GST_VERSION_MINOR >= 10) && (GST_VERSION_MICRO >= 19)
|
||||||
{ QtMultimedia::Composer, GST_TAG_COMPOSER },
|
{ QtMultimedia::MetaData::Composer, GST_TAG_COMPOSER },
|
||||||
#endif
|
#endif
|
||||||
//{ QtMultimedia::Conductor, 0 },
|
//{ QtMultimedia::MetaData::Conductor, 0 },
|
||||||
//{ QtMultimedia::Lyrics, 0 },
|
//{ QtMultimedia::MetaData::Lyrics, 0 },
|
||||||
//{ QtMultimedia::Mood, 0 },
|
//{ QtMultimedia::MetaData::Mood, 0 },
|
||||||
{ QtMultimedia::TrackNumber, GST_TAG_TRACK_NUMBER },
|
{ QtMultimedia::MetaData::TrackNumber, GST_TAG_TRACK_NUMBER },
|
||||||
|
|
||||||
//{ QtMultimedia::CoverArtUrlSmall, 0 },
|
//{ QtMultimedia::MetaData::CoverArtUrlSmall, 0 },
|
||||||
//{ QtMultimedia::CoverArtUrlLarge, 0 },
|
//{ QtMultimedia::MetaData::CoverArtUrlLarge, 0 },
|
||||||
|
|
||||||
// Image/Video
|
// Image/Video
|
||||||
//{ QtMultimedia::Resolution, 0 },
|
//{ QtMultimedia::MetaData::Resolution, 0 },
|
||||||
//{ QtMultimedia::PixelAspectRatio, 0 },
|
//{ QtMultimedia::MetaData::PixelAspectRatio, 0 },
|
||||||
|
|
||||||
// Video
|
// Video
|
||||||
//{ QtMultimedia::VideoFrameRate, 0 },
|
//{ QtMultimedia::MetaData::VideoFrameRate, 0 },
|
||||||
//{ QtMultimedia::VideoBitRate, 0 },
|
//{ QtMultimedia::MetaData::VideoBitRate, 0 },
|
||||||
{ QtMultimedia::VideoCodec, GST_TAG_VIDEO_CODEC },
|
{ QtMultimedia::MetaData::VideoCodec, GST_TAG_VIDEO_CODEC },
|
||||||
|
|
||||||
//{ QtMultimedia::PosterUrl, 0 },
|
//{ QtMultimedia::MetaData::PosterUrl, 0 },
|
||||||
|
|
||||||
// Movie
|
// Movie
|
||||||
//{ QtMultimedia::ChapterNumber, 0 },
|
//{ QtMultimedia::MetaData::ChapterNumber, 0 },
|
||||||
//{ QtMultimedia::Director, 0 },
|
//{ QtMultimedia::MetaData::Director, 0 },
|
||||||
{ QtMultimedia::LeadPerformer, GST_TAG_PERFORMER },
|
{ QtMultimedia::MetaData::LeadPerformer, GST_TAG_PERFORMER },
|
||||||
//{ QtMultimedia::Writer, 0 },
|
//{ QtMultimedia::MetaData::Writer, 0 },
|
||||||
|
|
||||||
// Photos
|
// Photos
|
||||||
//{ QtMultimedia::CameraManufacturer, 0 },
|
//{ QtMultimedia::MetaData::CameraManufacturer, 0 },
|
||||||
//{ QtMultimedia::CameraModel, 0 },
|
//{ QtMultimedia::MetaData::CameraModel, 0 },
|
||||||
//{ QtMultimedia::Event, 0 },
|
//{ QtMultimedia::MetaData::Event, 0 },
|
||||||
//{ QtMultimedia::Subject, 0 }
|
//{ QtMultimedia::MetaData::Subject, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
CameraBinMetaData::CameraBinMetaData(QObject *parent)
|
CameraBinMetaData::CameraBinMetaData(QObject *parent)
|
||||||
@@ -124,7 +124,7 @@ CameraBinMetaData::CameraBinMetaData(QObject *parent)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant CameraBinMetaData::metaData(QtMultimedia::MetaData key) const
|
QVariant CameraBinMetaData::metaData(const QString &key) const
|
||||||
{
|
{
|
||||||
static const int count = sizeof(qt_gstreamerMetaDataKeys) / sizeof(QGstreamerMetaDataKeyLookup);
|
static const int count = sizeof(qt_gstreamerMetaDataKeys) / sizeof(QGstreamerMetaDataKeyLookup);
|
||||||
|
|
||||||
@@ -138,7 +138,7 @@ QVariant CameraBinMetaData::metaData(QtMultimedia::MetaData key) const
|
|||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CameraBinMetaData::setMetaData(QtMultimedia::MetaData key, const QVariant &value)
|
void CameraBinMetaData::setMetaData(const QString &key, const QVariant &value)
|
||||||
{
|
{
|
||||||
static const int count = sizeof(qt_gstreamerMetaDataKeys) / sizeof(QGstreamerMetaDataKeyLookup);
|
static const int count = sizeof(qt_gstreamerMetaDataKeys) / sizeof(QGstreamerMetaDataKeyLookup);
|
||||||
|
|
||||||
@@ -156,9 +156,9 @@ void CameraBinMetaData::setMetaData(QtMultimedia::MetaData key, const QVariant &
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<QtMultimedia::MetaData> CameraBinMetaData::availableMetaData() const
|
QStringList CameraBinMetaData::availableMetaData() const
|
||||||
{
|
{
|
||||||
static QMap<QByteArray, QtMultimedia::MetaData> keysMap;
|
static QMap<QByteArray, QString> keysMap;
|
||||||
if (keysMap.isEmpty()) {
|
if (keysMap.isEmpty()) {
|
||||||
const int count = sizeof(qt_gstreamerMetaDataKeys) / sizeof(QGstreamerMetaDataKeyLookup);
|
const int count = sizeof(qt_gstreamerMetaDataKeys) / sizeof(QGstreamerMetaDataKeyLookup);
|
||||||
for (int i = 0; i < count; ++i) {
|
for (int i = 0; i < count; ++i) {
|
||||||
@@ -166,33 +166,12 @@ QList<QtMultimedia::MetaData> CameraBinMetaData::availableMetaData() const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<QtMultimedia::MetaData> res;
|
QStringList res;
|
||||||
foreach (const QByteArray &key, m_values.keys()) {
|
foreach (const QByteArray &key, m_values.keys()) {
|
||||||
QtMultimedia::MetaData tag = keysMap.value(key, QtMultimedia::MetaData(-1));
|
QString tag = keysMap.value(key);
|
||||||
if (tag != -1)
|
if (!tag.isEmpty())
|
||||||
res.append(tag);
|
res.append(tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant CameraBinMetaData::extendedMetaData(QString const &name) const
|
|
||||||
{
|
|
||||||
return m_values.value(name.toLatin1());
|
|
||||||
}
|
|
||||||
|
|
||||||
void CameraBinMetaData::setExtendedMetaData(QString const &name, QVariant const &value)
|
|
||||||
{
|
|
||||||
m_values.insert(name.toLatin1(), value);
|
|
||||||
emit QMetaDataWriterControl::metaDataChanged();
|
|
||||||
emit metaDataChanged(m_values);
|
|
||||||
}
|
|
||||||
|
|
||||||
QStringList CameraBinMetaData::availableExtendedMetaData() const
|
|
||||||
{
|
|
||||||
QStringList res;
|
|
||||||
foreach (const QByteArray &key, m_values.keys())
|
|
||||||
res.append(QString(key));
|
|
||||||
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -57,13 +57,9 @@ public:
|
|||||||
bool isMetaDataAvailable() const { return true; }
|
bool isMetaDataAvailable() const { return true; }
|
||||||
bool isWritable() const { return true; }
|
bool isWritable() const { return true; }
|
||||||
|
|
||||||
QVariant metaData(QtMultimedia::MetaData key) const;
|
QVariant metaData(const QString &key) const;
|
||||||
void setMetaData(QtMultimedia::MetaData key, const QVariant &value);
|
void setMetaData(const QString &key, const QVariant &value);
|
||||||
QList<QtMultimedia::MetaData> availableMetaData() const;
|
QStringList availableMetaData() const;
|
||||||
|
|
||||||
QVariant extendedMetaData(QString const &name) const;
|
|
||||||
void setExtendedMetaData(QString const &name, QVariant const &value);
|
|
||||||
QStringList availableExtendedMetaData() const;
|
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void metaDataChanged(const QMap<QByteArray, QVariant>&);
|
void metaDataChanged(const QMap<QByteArray, QVariant>&);
|
||||||
|
|||||||
@@ -46,77 +46,77 @@
|
|||||||
|
|
||||||
struct QGstreamerMetaDataKeyLookup
|
struct QGstreamerMetaDataKeyLookup
|
||||||
{
|
{
|
||||||
QtMultimedia::MetaData key;
|
QString key;
|
||||||
const char *token;
|
const char *token;
|
||||||
};
|
};
|
||||||
|
|
||||||
static const QGstreamerMetaDataKeyLookup qt_gstreamerMetaDataKeys[] =
|
static const QGstreamerMetaDataKeyLookup qt_gstreamerMetaDataKeys[] =
|
||||||
{
|
{
|
||||||
{ QtMultimedia::Title, GST_TAG_TITLE },
|
{ QtMultimedia::MetaData::Title, GST_TAG_TITLE },
|
||||||
//{ QtMultimedia::SubTitle, 0 },
|
//{ QtMultimedia::MetaData::SubTitle, 0 },
|
||||||
//{ QtMultimedia::Author, 0 },
|
//{ QtMultimedia::MetaData::Author, 0 },
|
||||||
{ QtMultimedia::Comment, GST_TAG_COMMENT },
|
{ QtMultimedia::MetaData::Comment, GST_TAG_COMMENT },
|
||||||
{ QtMultimedia::Description, GST_TAG_DESCRIPTION },
|
{ QtMultimedia::MetaData::Description, GST_TAG_DESCRIPTION },
|
||||||
//{ QtMultimedia::Category, 0 },
|
//{ QtMultimedia::MetaData::Category, 0 },
|
||||||
{ QtMultimedia::Genre, GST_TAG_GENRE },
|
{ QtMultimedia::MetaData::Genre, GST_TAG_GENRE },
|
||||||
//{ QtMultimedia::Year, 0 },
|
//{ QtMultimedia::MetaData::Year, 0 },
|
||||||
//{ QtMultimedia::UserRating, 0 },
|
//{ QtMultimedia::MetaData::UserRating, 0 },
|
||||||
|
|
||||||
{ QtMultimedia::Language, GST_TAG_LANGUAGE_CODE },
|
{ QtMultimedia::MetaData::Language, GST_TAG_LANGUAGE_CODE },
|
||||||
|
|
||||||
{ QtMultimedia::Publisher, GST_TAG_ORGANIZATION },
|
{ QtMultimedia::MetaData::Publisher, GST_TAG_ORGANIZATION },
|
||||||
{ QtMultimedia::Copyright, GST_TAG_COPYRIGHT },
|
{ QtMultimedia::MetaData::Copyright, GST_TAG_COPYRIGHT },
|
||||||
//{ QtMultimedia::ParentalRating, 0 },
|
//{ QtMultimedia::MetaData::ParentalRating, 0 },
|
||||||
//{ QtMultimedia::RatingOrganization, 0 },
|
//{ QtMultimedia::MetaData::RatingOrganisation, 0 },
|
||||||
|
|
||||||
// Media
|
// Media
|
||||||
//{ QtMultimedia::Size, 0 },
|
//{ QtMultimedia::MetaData::Size, 0 },
|
||||||
//{ QtMultimedia::MediaType, 0 },
|
//{ QtMultimedia::MetaData::MediaType, 0 },
|
||||||
{ QtMultimedia::Duration, GST_TAG_DURATION },
|
{ QtMultimedia::MetaData::Duration, GST_TAG_DURATION },
|
||||||
|
|
||||||
// Audio
|
// Audio
|
||||||
{ QtMultimedia::AudioBitRate, GST_TAG_BITRATE },
|
{ QtMultimedia::MetaData::AudioBitRate, GST_TAG_BITRATE },
|
||||||
{ QtMultimedia::AudioCodec, GST_TAG_AUDIO_CODEC },
|
{ QtMultimedia::MetaData::AudioCodec, GST_TAG_AUDIO_CODEC },
|
||||||
//{ QtMultimedia::ChannelCount, 0 },
|
//{ QtMultimedia::MetaData::ChannelCount, 0 },
|
||||||
//{ QtMultimedia::SampleRate, 0 },
|
//{ QtMultimedia::MetaData::SampleRate, 0 },
|
||||||
|
|
||||||
// Music
|
// Music
|
||||||
{ QtMultimedia::AlbumTitle, GST_TAG_ALBUM },
|
{ QtMultimedia::MetaData::AlbumTitle, GST_TAG_ALBUM },
|
||||||
{ QtMultimedia::AlbumArtist, GST_TAG_ARTIST},
|
{ QtMultimedia::MetaData::AlbumArtist, GST_TAG_ARTIST},
|
||||||
{ QtMultimedia::ContributingArtist, GST_TAG_PERFORMER },
|
{ QtMultimedia::MetaData::ContributingArtist, GST_TAG_PERFORMER },
|
||||||
#if (GST_VERSION_MAJOR >= 0) && (GST_VERSION_MINOR >= 10) && (GST_VERSION_MICRO >= 19)
|
#if (GST_VERSION_MAJOR >= 0) && (GST_VERSION_MINOR >= 10) && (GST_VERSION_MICRO >= 19)
|
||||||
{ QtMultimedia::Composer, GST_TAG_COMPOSER },
|
{ QtMultimedia::MetaData::Composer, GST_TAG_COMPOSER },
|
||||||
#endif
|
#endif
|
||||||
//{ QtMultimedia::Conductor, 0 },
|
//{ QtMultimedia::MetaData::Conductor, 0 },
|
||||||
//{ QtMultimedia::Lyrics, 0 },
|
//{ QtMultimedia::MetaData::Lyrics, 0 },
|
||||||
//{ QtMultimedia::Mood, 0 },
|
//{ QtMultimedia::MetaData::Mood, 0 },
|
||||||
{ QtMultimedia::TrackNumber, GST_TAG_TRACK_NUMBER },
|
{ QtMultimedia::MetaData::TrackNumber, GST_TAG_TRACK_NUMBER },
|
||||||
|
|
||||||
//{ QtMultimedia::CoverArtUrlSmall, 0 },
|
//{ QtMultimedia::MetaData::CoverArtUrlSmall, 0 },
|
||||||
//{ QtMultimedia::CoverArtUrlLarge, 0 },
|
//{ QtMultimedia::MetaData::CoverArtUrlLarge, 0 },
|
||||||
|
|
||||||
// Image/Video
|
// Image/Video
|
||||||
//{ QtMultimedia::Resolution, 0 },
|
//{ QtMultimedia::MetaData::Resolution, 0 },
|
||||||
//{ QtMultimedia::PixelAspectRatio, 0 },
|
//{ QtMultimedia::MetaData::PixelAspectRatio, 0 },
|
||||||
|
|
||||||
// Video
|
// Video
|
||||||
//{ QtMultimedia::VideoFrameRate, 0 },
|
//{ QtMultimedia::MetaData::VideoFrameRate, 0 },
|
||||||
//{ QtMultimedia::VideoBitRate, 0 },
|
//{ QtMultimedia::MetaData::VideoBitRate, 0 },
|
||||||
{ QtMultimedia::VideoCodec, GST_TAG_VIDEO_CODEC },
|
{ QtMultimedia::MetaData::VideoCodec, GST_TAG_VIDEO_CODEC },
|
||||||
|
|
||||||
//{ QtMultimedia::PosterUrl, 0 },
|
//{ QtMultimedia::MetaData::PosterUrl, 0 },
|
||||||
|
|
||||||
// Movie
|
// Movie
|
||||||
//{ QtMultimedia::ChapterNumber, 0 },
|
//{ QtMultimedia::MetaData::ChapterNumber, 0 },
|
||||||
//{ QtMultimedia::Director, 0 },
|
//{ QtMultimedia::MetaData::Director, 0 },
|
||||||
{ QtMultimedia::LeadPerformer, GST_TAG_PERFORMER },
|
{ QtMultimedia::MetaData::LeadPerformer, GST_TAG_PERFORMER },
|
||||||
//{ QtMultimedia::Writer, 0 },
|
//{ QtMultimedia::MetaData::Writer, 0 },
|
||||||
|
|
||||||
// Photos
|
// Photos
|
||||||
//{ QtMultimedia::CameraManufacturer, 0 },
|
//{ QtMultimedia::MetaData::CameraManufacturer, 0 },
|
||||||
//{ QtMultimedia::CameraModel, 0 },
|
//{ QtMultimedia::MetaData::CameraModel, 0 },
|
||||||
//{ QtMultimedia::Event, 0 },
|
//{ QtMultimedia::MetaData::Event, 0 },
|
||||||
//{ QtMultimedia::Subject, 0 }
|
//{ QtMultimedia::MetaData::Subject, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
QGstreamerCaptureMetaDataControl::QGstreamerCaptureMetaDataControl(QObject *parent)
|
QGstreamerCaptureMetaDataControl::QGstreamerCaptureMetaDataControl(QObject *parent)
|
||||||
@@ -124,7 +124,7 @@ QGstreamerCaptureMetaDataControl::QGstreamerCaptureMetaDataControl(QObject *pare
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant QGstreamerCaptureMetaDataControl::metaData(QtMultimedia::MetaData key) const
|
QVariant QGstreamerCaptureMetaDataControl::metaData(const QString &key) const
|
||||||
{
|
{
|
||||||
static const int count = sizeof(qt_gstreamerMetaDataKeys) / sizeof(QGstreamerMetaDataKeyLookup);
|
static const int count = sizeof(qt_gstreamerMetaDataKeys) / sizeof(QGstreamerMetaDataKeyLookup);
|
||||||
|
|
||||||
@@ -138,7 +138,7 @@ QVariant QGstreamerCaptureMetaDataControl::metaData(QtMultimedia::MetaData key)
|
|||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QGstreamerCaptureMetaDataControl::setMetaData(QtMultimedia::MetaData key, const QVariant &value)
|
void QGstreamerCaptureMetaDataControl::setMetaData(const QString &key, const QVariant &value)
|
||||||
{
|
{
|
||||||
static const int count = sizeof(qt_gstreamerMetaDataKeys) / sizeof(QGstreamerMetaDataKeyLookup);
|
static const int count = sizeof(qt_gstreamerMetaDataKeys) / sizeof(QGstreamerMetaDataKeyLookup);
|
||||||
|
|
||||||
@@ -156,9 +156,9 @@ void QGstreamerCaptureMetaDataControl::setMetaData(QtMultimedia::MetaData key, c
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<QtMultimedia::MetaData> QGstreamerCaptureMetaDataControl::availableMetaData() const
|
QStringList QGstreamerCaptureMetaDataControl::availableMetaData() const
|
||||||
{
|
{
|
||||||
static QMap<QByteArray, QtMultimedia::MetaData> keysMap;
|
static QMap<QByteArray, QString> keysMap;
|
||||||
if (keysMap.isEmpty()) {
|
if (keysMap.isEmpty()) {
|
||||||
const int count = sizeof(qt_gstreamerMetaDataKeys) / sizeof(QGstreamerMetaDataKeyLookup);
|
const int count = sizeof(qt_gstreamerMetaDataKeys) / sizeof(QGstreamerMetaDataKeyLookup);
|
||||||
for (int i = 0; i < count; ++i) {
|
for (int i = 0; i < count; ++i) {
|
||||||
@@ -166,33 +166,12 @@ QList<QtMultimedia::MetaData> QGstreamerCaptureMetaDataControl::availableMetaDat
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<QtMultimedia::MetaData> res;
|
QStringList res;
|
||||||
foreach (const QByteArray &key, m_values.keys()) {
|
foreach (const QByteArray &key, m_values.keys()) {
|
||||||
QtMultimedia::MetaData tag = keysMap.value(key, QtMultimedia::MetaData(-1));
|
QString tag = keysMap.value(key);
|
||||||
if (tag != -1)
|
if (!tag.isEmpty())
|
||||||
res.append(tag);
|
res.append(tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant QGstreamerCaptureMetaDataControl::extendedMetaData(QString const &name) const
|
|
||||||
{
|
|
||||||
return m_values.value(name.toLatin1());
|
|
||||||
}
|
|
||||||
|
|
||||||
void QGstreamerCaptureMetaDataControl::setExtendedMetaData(QString const &name, QVariant const &value)
|
|
||||||
{
|
|
||||||
m_values.insert(name.toLatin1(), value);
|
|
||||||
emit QMetaDataWriterControl::metaDataChanged();
|
|
||||||
emit metaDataChanged(m_values);
|
|
||||||
}
|
|
||||||
|
|
||||||
QStringList QGstreamerCaptureMetaDataControl::availableExtendedMetaData() const
|
|
||||||
{
|
|
||||||
QStringList res;
|
|
||||||
foreach (const QByteArray &key, m_values.keys())
|
|
||||||
res.append(QString(key));
|
|
||||||
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -57,13 +57,9 @@ public:
|
|||||||
bool isMetaDataAvailable() const { return true; }
|
bool isMetaDataAvailable() const { return true; }
|
||||||
bool isWritable() const { return true; }
|
bool isWritable() const { return true; }
|
||||||
|
|
||||||
QVariant metaData(QtMultimedia::MetaData key) const;
|
QVariant metaData(const QString &key) const;
|
||||||
void setMetaData(QtMultimedia::MetaData key, const QVariant &value);
|
void setMetaData(const QString &key, const QVariant &value);
|
||||||
QList<QtMultimedia::MetaData> availableMetaData() const;
|
QStringList availableMetaData() const;
|
||||||
|
|
||||||
QVariant extendedMetaData(QString const &name) const;
|
|
||||||
void setExtendedMetaData(QString const &name, QVariant const &value);
|
|
||||||
QStringList availableExtendedMetaData() const;
|
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void metaDataChanged(const QMap<QByteArray, QVariant>&);
|
void metaDataChanged(const QMap<QByteArray, QVariant>&);
|
||||||
|
|||||||
@@ -49,77 +49,77 @@ QT_BEGIN_NAMESPACE
|
|||||||
|
|
||||||
struct QGstreamerMetaDataKeyLookup
|
struct QGstreamerMetaDataKeyLookup
|
||||||
{
|
{
|
||||||
QtMultimedia::MetaData key;
|
QString key;
|
||||||
const char *token;
|
const char *token;
|
||||||
};
|
};
|
||||||
|
|
||||||
static const QGstreamerMetaDataKeyLookup qt_gstreamerMetaDataKeys[] =
|
static const QGstreamerMetaDataKeyLookup qt_gstreamerMetaDataKeys[] =
|
||||||
{
|
{
|
||||||
{ QtMultimedia::Title, GST_TAG_TITLE },
|
{ QtMultimedia::MetaData::Title, GST_TAG_TITLE },
|
||||||
//{ QtMultimedia::SubTitle, 0 },
|
//{ QtMultimedia::MetaData::SubTitle, 0 },
|
||||||
//{ QtMultimedia::Author, 0 },
|
//{ QtMultimedia::MetaData::Author, 0 },
|
||||||
{ QtMultimedia::Comment, GST_TAG_COMMENT },
|
{ QtMultimedia::MetaData::Comment, GST_TAG_COMMENT },
|
||||||
{ QtMultimedia::Description, GST_TAG_DESCRIPTION },
|
{ QtMultimedia::MetaData::Description, GST_TAG_DESCRIPTION },
|
||||||
//{ QtMultimedia::Category, 0 },
|
//{ QtMultimedia::MetaData::Category, 0 },
|
||||||
{ QtMultimedia::Genre, GST_TAG_GENRE },
|
{ QtMultimedia::MetaData::Genre, GST_TAG_GENRE },
|
||||||
{ QtMultimedia::Year, "year" },
|
{ QtMultimedia::MetaData::Year, "year" },
|
||||||
//{ QtMultimedia::UserRating, 0 },
|
//{ QtMultimedia::MetaData::UserRating, 0 },
|
||||||
|
|
||||||
{ QtMultimedia::Language, GST_TAG_LANGUAGE_CODE },
|
{ QtMultimedia::MetaData::Language, GST_TAG_LANGUAGE_CODE },
|
||||||
|
|
||||||
{ QtMultimedia::Publisher, GST_TAG_ORGANIZATION },
|
{ QtMultimedia::MetaData::Publisher, GST_TAG_ORGANIZATION },
|
||||||
{ QtMultimedia::Copyright, GST_TAG_COPYRIGHT },
|
{ QtMultimedia::MetaData::Copyright, GST_TAG_COPYRIGHT },
|
||||||
//{ QtMultimedia::ParentalRating, 0 },
|
//{ QtMultimedia::MetaData::ParentalRating, 0 },
|
||||||
//{ QtMultimedia::RatingOrganization, 0 },
|
//{ QtMultimedia::MetaData::RatingOrganisation, 0 },
|
||||||
|
|
||||||
// Media
|
// Media
|
||||||
//{ QtMultimedia::Size, 0 },
|
//{ QtMultimedia::MetaData::Size, 0 },
|
||||||
//{ QtMultimedia::MediaType, 0 },
|
//{ QtMultimedia::MetaData::MediaType, 0 },
|
||||||
{ QtMultimedia::Duration, GST_TAG_DURATION },
|
{ QtMultimedia::MetaData::Duration, GST_TAG_DURATION },
|
||||||
|
|
||||||
// Audio
|
// Audio
|
||||||
{ QtMultimedia::AudioBitRate, GST_TAG_BITRATE },
|
{ QtMultimedia::MetaData::AudioBitRate, GST_TAG_BITRATE },
|
||||||
{ QtMultimedia::AudioCodec, GST_TAG_AUDIO_CODEC },
|
{ QtMultimedia::MetaData::AudioCodec, GST_TAG_AUDIO_CODEC },
|
||||||
//{ QtMultimedia::ChannelCount, 0 },
|
//{ QtMultimedia::MetaData::ChannelCount, 0 },
|
||||||
//{ QtMultimedia::SampleRate, 0 },
|
//{ QtMultimedia::MetaData::SampleRate, 0 },
|
||||||
|
|
||||||
// Music
|
// Music
|
||||||
{ QtMultimedia::AlbumTitle, GST_TAG_ALBUM },
|
{ QtMultimedia::MetaData::AlbumTitle, GST_TAG_ALBUM },
|
||||||
{ QtMultimedia::AlbumArtist, GST_TAG_ARTIST},
|
{ QtMultimedia::MetaData::AlbumArtist, GST_TAG_ARTIST},
|
||||||
{ QtMultimedia::ContributingArtist, GST_TAG_PERFORMER },
|
{ QtMultimedia::MetaData::ContributingArtist, GST_TAG_PERFORMER },
|
||||||
#if (GST_VERSION_MAJOR >= 0) && (GST_VERSION_MINOR >= 10) && (GST_VERSION_MICRO >= 19)
|
#if (GST_VERSION_MAJOR >= 0) && (GST_VERSION_MINOR >= 10) && (GST_VERSION_MICRO >= 19)
|
||||||
{ QtMultimedia::Composer, GST_TAG_COMPOSER },
|
{ QtMultimedia::MetaData::Composer, GST_TAG_COMPOSER },
|
||||||
#endif
|
#endif
|
||||||
//{ QtMultimedia::Conductor, 0 },
|
//{ QtMultimedia::MetaData::Conductor, 0 },
|
||||||
//{ QtMultimedia::Lyrics, 0 },
|
//{ QtMultimedia::MetaData::Lyrics, 0 },
|
||||||
//{ QtMultimedia::Mood, 0 },
|
//{ QtMultimedia::MetaData::Mood, 0 },
|
||||||
{ QtMultimedia::TrackNumber, GST_TAG_TRACK_NUMBER },
|
{ QtMultimedia::MetaData::TrackNumber, GST_TAG_TRACK_NUMBER },
|
||||||
|
|
||||||
//{ QtMultimedia::CoverArtUrlSmall, 0 },
|
//{ QtMultimedia::MetaData::CoverArtUrlSmall, 0 },
|
||||||
//{ QtMultimedia::CoverArtUrlLarge, 0 },
|
//{ QtMultimedia::MetaData::CoverArtUrlLarge, 0 },
|
||||||
|
|
||||||
// Image/Video
|
// Image/Video
|
||||||
{ QtMultimedia::Resolution, "resolution" },
|
{ QtMultimedia::MetaData::Resolution, "resolution" },
|
||||||
{ QtMultimedia::PixelAspectRatio, "pixel-aspect-ratio" },
|
{ QtMultimedia::MetaData::PixelAspectRatio, "pixel-aspect-ratio" },
|
||||||
|
|
||||||
// Video
|
// Video
|
||||||
//{ QtMultimedia::VideoFrameRate, 0 },
|
//{ QtMultimedia::MetaData::VideoFrameRate, 0 },
|
||||||
//{ QtMultimedia::VideoBitRate, 0 },
|
//{ QtMultimedia::MetaData::VideoBitRate, 0 },
|
||||||
{ QtMultimedia::VideoCodec, GST_TAG_VIDEO_CODEC },
|
{ QtMultimedia::MetaData::VideoCodec, GST_TAG_VIDEO_CODEC },
|
||||||
|
|
||||||
//{ QtMultimedia::PosterUrl, 0 },
|
//{ QtMultimedia::MetaData::PosterUrl, 0 },
|
||||||
|
|
||||||
// Movie
|
// Movie
|
||||||
//{ QtMultimedia::ChapterNumber, 0 },
|
//{ QtMultimedia::MetaData::ChapterNumber, 0 },
|
||||||
//{ QtMultimedia::Director, 0 },
|
//{ QtMultimedia::MetaData::Director, 0 },
|
||||||
{ QtMultimedia::LeadPerformer, GST_TAG_PERFORMER },
|
{ QtMultimedia::MetaData::LeadPerformer, GST_TAG_PERFORMER },
|
||||||
//{ QtMultimedia::Writer, 0 },
|
//{ QtMultimedia::MetaData::Writer, 0 },
|
||||||
|
|
||||||
// Photos
|
// Photos
|
||||||
//{ QtMultimedia::CameraManufacturer, 0 },
|
//{ QtMultimedia::MetaData::CameraManufacturer, 0 },
|
||||||
//{ QtMultimedia::CameraModel, 0 },
|
//{ QtMultimedia::MetaData::CameraModel, 0 },
|
||||||
//{ QtMultimedia::Event, 0 },
|
//{ QtMultimedia::MetaData::Event, 0 },
|
||||||
//{ QtMultimedia::Subject, 0 }
|
//{ QtMultimedia::MetaData::Subject, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
QGstreamerMetaDataProvider::QGstreamerMetaDataProvider(QGstreamerPlayerSession *session, QObject *parent)
|
QGstreamerMetaDataProvider::QGstreamerMetaDataProvider(QGstreamerPlayerSession *session, QObject *parent)
|
||||||
@@ -142,7 +142,7 @@ bool QGstreamerMetaDataProvider::isWritable() const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant QGstreamerMetaDataProvider::metaData(QtMultimedia::MetaData key) const
|
QVariant QGstreamerMetaDataProvider::metaData(const QString &key) const
|
||||||
{
|
{
|
||||||
static const int count = sizeof(qt_gstreamerMetaDataKeys) / sizeof(QGstreamerMetaDataKeyLookup);
|
static const int count = sizeof(qt_gstreamerMetaDataKeys) / sizeof(QGstreamerMetaDataKeyLookup);
|
||||||
|
|
||||||
@@ -154,9 +154,9 @@ QVariant QGstreamerMetaDataProvider::metaData(QtMultimedia::MetaData key) const
|
|||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<QtMultimedia::MetaData> QGstreamerMetaDataProvider::availableMetaData() const
|
QStringList QGstreamerMetaDataProvider::availableMetaData() const
|
||||||
{
|
{
|
||||||
static QMap<QByteArray, QtMultimedia::MetaData> keysMap;
|
static QMap<QByteArray, QString> keysMap;
|
||||||
if (keysMap.isEmpty()) {
|
if (keysMap.isEmpty()) {
|
||||||
const int count = sizeof(qt_gstreamerMetaDataKeys) / sizeof(QGstreamerMetaDataKeyLookup);
|
const int count = sizeof(qt_gstreamerMetaDataKeys) / sizeof(QGstreamerMetaDataKeyLookup);
|
||||||
for (int i = 0; i < count; ++i) {
|
for (int i = 0; i < count; ++i) {
|
||||||
@@ -164,30 +164,16 @@ QList<QtMultimedia::MetaData> QGstreamerMetaDataProvider::availableMetaData() co
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<QtMultimedia::MetaData> res;
|
QStringList res;
|
||||||
foreach (const QByteArray &key, m_session->tags().keys()) {
|
foreach (const QByteArray &key, m_session->tags().keys()) {
|
||||||
QtMultimedia::MetaData tag = keysMap.value(key, QtMultimedia::MetaData(-1));
|
QString tag = keysMap.value(key);
|
||||||
if (tag != -1)
|
if (!tag.isEmpty())
|
||||||
res.append(tag);
|
res.append(tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant QGstreamerMetaDataProvider::extendedMetaData(const QString &key) const
|
|
||||||
{
|
|
||||||
return m_session->tags().value(key.toLatin1());
|
|
||||||
}
|
|
||||||
|
|
||||||
QStringList QGstreamerMetaDataProvider::availableExtendedMetaData() const
|
|
||||||
{
|
|
||||||
QStringList res;
|
|
||||||
foreach (const QByteArray &key, m_session->tags().keys())
|
|
||||||
res.append(QString(key));
|
|
||||||
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
void QGstreamerMetaDataProvider::updateTags()
|
void QGstreamerMetaDataProvider::updateTags()
|
||||||
{
|
{
|
||||||
emit metaDataChanged();
|
emit metaDataChanged();
|
||||||
|
|||||||
@@ -58,11 +58,8 @@ public:
|
|||||||
bool isMetaDataAvailable() const;
|
bool isMetaDataAvailable() const;
|
||||||
bool isWritable() const;
|
bool isWritable() const;
|
||||||
|
|
||||||
QVariant metaData(QtMultimedia::MetaData key) const;
|
QVariant metaData(const QString &key) const;
|
||||||
QList<QtMultimedia::MetaData> availableMetaData() const;
|
QStringList availableMetaData() const;
|
||||||
|
|
||||||
QVariant extendedMetaData(const QString &key) const ;
|
|
||||||
QStringList availableExtendedMetaData() const;
|
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void updateTags();
|
void updateTags();
|
||||||
|
|||||||
@@ -1221,7 +1221,7 @@ void QGstreamerPlayerSession::getStreamsInfo()
|
|||||||
|
|
||||||
for (int i=0; i<m_streamTypes.count(); i++) {
|
for (int i=0; i<m_streamTypes.count(); i++) {
|
||||||
QMediaStreamsControl::StreamType streamType = m_streamTypes[i];
|
QMediaStreamsControl::StreamType streamType = m_streamTypes[i];
|
||||||
QMap<QtMultimedia::MetaData, QVariant> streamProperties;
|
QMap<QString, QVariant> streamProperties;
|
||||||
|
|
||||||
int streamIndex = i - m_playbin2StreamOffset[streamType];
|
int streamIndex = i - m_playbin2StreamOffset[streamType];
|
||||||
|
|
||||||
@@ -1243,7 +1243,7 @@ void QGstreamerPlayerSession::getStreamsInfo()
|
|||||||
if (tags && gst_is_tag_list(tags)) {
|
if (tags && gst_is_tag_list(tags)) {
|
||||||
gchar *languageCode = 0;
|
gchar *languageCode = 0;
|
||||||
if (gst_tag_list_get_string(tags, GST_TAG_LANGUAGE_CODE, &languageCode))
|
if (gst_tag_list_get_string(tags, GST_TAG_LANGUAGE_CODE, &languageCode))
|
||||||
streamProperties[QtMultimedia::Language] = QString::fromUtf8(languageCode);
|
streamProperties[QtMultimedia::MetaData::Language] = QString::fromUtf8(languageCode);
|
||||||
|
|
||||||
//qDebug() << "language for setream" << i << QString::fromUtf8(languageCode);
|
//qDebug() << "language for setream" << i << QString::fromUtf8(languageCode);
|
||||||
g_free (languageCode);
|
g_free (languageCode);
|
||||||
@@ -1303,8 +1303,8 @@ void QGstreamerPlayerSession::getStreamsInfo()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
QMap<QtMultimedia::MetaData, QVariant> streamProperties;
|
QMap<QString, QVariant> streamProperties;
|
||||||
streamProperties[QtMultimedia::Language] = QString::fromUtf8(languageCode);
|
streamProperties[QtMultimedia::MetaData::Language] = QString::fromUtf8(languageCode);
|
||||||
|
|
||||||
m_streamProperties.append(streamProperties);
|
m_streamProperties.append(streamProperties);
|
||||||
m_streamTypes.append(streamType);
|
m_streamTypes.append(streamType);
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ public:
|
|||||||
QMediaTimeRange availablePlaybackRanges() const;
|
QMediaTimeRange availablePlaybackRanges() const;
|
||||||
|
|
||||||
QMap<QByteArray ,QVariant> tags() const { return m_tags; }
|
QMap<QByteArray ,QVariant> tags() const { return m_tags; }
|
||||||
QMap<QtMultimedia::MetaData,QVariant> streamProperties(int streamNumber) const { return m_streamProperties[streamNumber]; }
|
QMap<QString,QVariant> streamProperties(int streamNumber) const { return m_streamProperties[streamNumber]; }
|
||||||
int streamCount() const { return m_streamProperties.count(); }
|
int streamCount() const { return m_streamProperties.count(); }
|
||||||
QMediaStreamsControl::StreamType streamType(int streamNumber) { return m_streamTypes.value(streamNumber, QMediaStreamsControl::UnknownStream); }
|
QMediaStreamsControl::StreamType streamType(int streamNumber) { return m_streamTypes.value(streamNumber, QMediaStreamsControl::UnknownStream); }
|
||||||
|
|
||||||
@@ -195,7 +195,7 @@ private:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
QMap<QByteArray, QVariant> m_tags;
|
QMap<QByteArray, QVariant> m_tags;
|
||||||
QList< QMap<QtMultimedia::MetaData,QVariant> > m_streamProperties;
|
QList< QMap<QString,QVariant> > m_streamProperties;
|
||||||
QList<QMediaStreamsControl::StreamType> m_streamTypes;
|
QList<QMediaStreamsControl::StreamType> m_streamTypes;
|
||||||
QMap<QMediaStreamsControl::StreamType, int> m_playbin2StreamOffset;
|
QMap<QMediaStreamsControl::StreamType, int> m_playbin2StreamOffset;
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ QMediaStreamsControl::StreamType QGstreamerStreamsControl::streamType(int stream
|
|||||||
return m_session->streamType(streamNumber);
|
return m_session->streamType(streamNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant QGstreamerStreamsControl::metaData(int streamNumber, QtMultimedia::MetaData key)
|
QVariant QGstreamerStreamsControl::metaData(int streamNumber, const QString &key)
|
||||||
{
|
{
|
||||||
return m_session->streamProperties(streamNumber).value(key);
|
return m_session->streamProperties(streamNumber).value(key);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ public:
|
|||||||
virtual int streamCount();
|
virtual int streamCount();
|
||||||
virtual StreamType streamType(int streamNumber);
|
virtual StreamType streamType(int streamNumber);
|
||||||
|
|
||||||
virtual QVariant metaData(int streamNumber, QtMultimedia::MetaData key);
|
virtual QVariant metaData(int streamNumber, const QString &key);
|
||||||
|
|
||||||
virtual bool isActive(int streamNumber);
|
virtual bool isActive(int streamNumber);
|
||||||
virtual void setActive(int streamNumber, bool state);
|
virtual void setActive(int streamNumber, bool state);
|
||||||
|
|||||||
@@ -58,18 +58,15 @@ public:
|
|||||||
bool isMetaDataAvailable() const;
|
bool isMetaDataAvailable() const;
|
||||||
bool isWritable() const;
|
bool isWritable() const;
|
||||||
|
|
||||||
QVariant metaData(QtMultimedia::MetaData key) const;
|
QVariant metaData(const QString &key) const;
|
||||||
QList<QtMultimedia::MetaData> availableMetaData() const;
|
QStringList availableMetaData() const;
|
||||||
|
|
||||||
QVariant extendedMetaData(const QString &key) const ;
|
|
||||||
QStringList availableExtendedMetaData() const;
|
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void updateTags();
|
void updateTags();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QT7PlayerSession *m_session;
|
QT7PlayerSession *m_session;
|
||||||
QMap<QtMultimedia::MetaData, QVariant> m_tags;
|
QMap<QString, QVariant> m_tags;
|
||||||
};
|
};
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|||||||
@@ -72,27 +72,16 @@ bool QT7PlayerMetaDataControl::isWritable() const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant QT7PlayerMetaDataControl::metaData(QtMultimedia::MetaData key) const
|
QVariant QT7PlayerMetaDataControl::metaData(const QString &key) const
|
||||||
{
|
{
|
||||||
return m_tags.value(key);
|
return m_tags.value(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<QtMultimedia::MetaData> QT7PlayerMetaDataControl::availableMetaData() const
|
QStringList QT7PlayerMetaDataControl::availableMetaData() const
|
||||||
{
|
{
|
||||||
return m_tags.keys();
|
return m_tags.keys();
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant QT7PlayerMetaDataControl::extendedMetaData(const QString &key) const
|
|
||||||
{
|
|
||||||
Q_UNUSED(key);
|
|
||||||
return QVariant();
|
|
||||||
}
|
|
||||||
|
|
||||||
QStringList QT7PlayerMetaDataControl::availableExtendedMetaData() const
|
|
||||||
{
|
|
||||||
return QStringList();
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef QUICKTIME_C_API_AVAILABLE
|
#ifdef QUICKTIME_C_API_AVAILABLE
|
||||||
|
|
||||||
static QString stripCopyRightSymbol(const QString &key)
|
static QString stripCopyRightSymbol(const QString &key)
|
||||||
@@ -244,13 +233,13 @@ void QT7PlayerMetaDataControl::updateTags()
|
|||||||
metaMap.insert(QLatin1String("nam"), QString::fromUtf8([name UTF8String]));
|
metaMap.insert(QLatin1String("nam"), QString::fromUtf8([name UTF8String]));
|
||||||
#endif // QUICKTIME_C_API_AVAILABLE
|
#endif // QUICKTIME_C_API_AVAILABLE
|
||||||
|
|
||||||
m_tags.insert(QtMultimedia::AlbumArtist, metaMap.value(QLatin1String("ART")));
|
m_tags.insert(QtMultimedia::MetaData::AlbumArtist, metaMap.value(QLatin1String("ART")));
|
||||||
m_tags.insert(QtMultimedia::AlbumTitle, metaMap.value(QLatin1String("alb")));
|
m_tags.insert(QtMultimedia::MetaData::AlbumTitle, metaMap.value(QLatin1String("alb")));
|
||||||
m_tags.insert(QtMultimedia::Title, metaMap.value(QLatin1String("nam")));
|
m_tags.insert(QtMultimedia::MetaData::Title, metaMap.value(QLatin1String("nam")));
|
||||||
m_tags.insert(QtMultimedia::Date, metaMap.value(QLatin1String("day")));
|
m_tags.insert(QtMultimedia::MetaData::Date, metaMap.value(QLatin1String("day")));
|
||||||
m_tags.insert(QtMultimedia::Genre, metaMap.value(QLatin1String("gnre")));
|
m_tags.insert(QtMultimedia::MetaData::Genre, metaMap.value(QLatin1String("gnre")));
|
||||||
m_tags.insert(QtMultimedia::TrackNumber, metaMap.value(QLatin1String("trk")));
|
m_tags.insert(QtMultimedia::MetaData::TrackNumber, metaMap.value(QLatin1String("trk")));
|
||||||
m_tags.insert(QtMultimedia::Description, metaMap.value(QLatin1String("des")));
|
m_tags.insert(QtMultimedia::MetaData::Description, metaMap.value(QLatin1String("des")));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!wasEmpty || !m_tags.isEmpty())
|
if (!wasEmpty || !m_tags.isEmpty())
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ bool MFMetaDataControl::isMetaDataAvailable() const
|
|||||||
return m_content || m_metaData;
|
return m_content || m_metaData;
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant MFMetaDataControl::metaData(QtMultimedia::MetaData key) const
|
QVariant MFMetaDataControl::metaData(const QString &key) const
|
||||||
{
|
{
|
||||||
QVariant value;
|
QVariant value;
|
||||||
if (!isMetaDataAvailable())
|
if (!isMetaDataAvailable())
|
||||||
@@ -113,38 +113,11 @@ QVariant MFMetaDataControl::convertValue(const PROPVARIANT& var) const
|
|||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<QtMultimedia::MetaData> MFMetaDataControl::availableMetaData() const
|
QStringList MFMetaDataControl::availableMetaData() const
|
||||||
{
|
{
|
||||||
return m_availableMetaDatas;
|
return m_availableMetaDatas;
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant MFMetaDataControl::extendedMetaData(const QString &key) const
|
|
||||||
{
|
|
||||||
QVariant value;
|
|
||||||
HRESULT hr = S_FALSE;
|
|
||||||
PROPVARIANT var;
|
|
||||||
PropVariantInit(&var);
|
|
||||||
if (m_content) {
|
|
||||||
int index = m_extendedMetaDatas.indexOf(key);
|
|
||||||
if (index >= 0) {
|
|
||||||
hr = m_content->GetValue(m_extendedKeys[index], &var);
|
|
||||||
}
|
|
||||||
} else if (m_metaData) {
|
|
||||||
hr = m_metaData->GetProperty(key.utf16(), &var);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (SUCCEEDED(hr))
|
|
||||||
value = convertValue(var);
|
|
||||||
|
|
||||||
PropVariantClear(&var);
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
QStringList MFMetaDataControl::availableExtendedMetaData() const
|
|
||||||
{
|
|
||||||
return m_extendedMetaDatas;
|
|
||||||
}
|
|
||||||
|
|
||||||
void MFMetaDataControl::updateSource(IMFPresentationDescriptor* sourcePD, IMFMediaSource* mediaSource)
|
void MFMetaDataControl::updateSource(IMFPresentationDescriptor* sourcePD, IMFMediaSource* mediaSource)
|
||||||
{
|
{
|
||||||
if (m_metaData) {
|
if (m_metaData) {
|
||||||
@@ -173,15 +146,15 @@ void MFMetaDataControl::updateSource(IMFPresentationDescriptor* sourcePD, IMFMed
|
|||||||
continue;
|
continue;
|
||||||
bool common = true;
|
bool common = true;
|
||||||
if (key == PKEY_Author) {
|
if (key == PKEY_Author) {
|
||||||
m_availableMetaDatas.push_back(QtMultimedia::Author);
|
m_availableMetaDatas.push_back(QtMultimedia::MetaData::Author);
|
||||||
} else if (key == PKEY_Title) {
|
} else if (key == PKEY_Title) {
|
||||||
m_availableMetaDatas.push_back(QtMultimedia::Title);
|
m_availableMetaDatas.push_back(QtMultimedia::MetaData::Title);
|
||||||
} else if (key == PKEY_ParentalRating) {
|
} else if (key == PKEY_ParentalRating) {
|
||||||
m_availableMetaDatas.push_back(QtMultimedia::ParentalRating);
|
m_availableMetaDatas.push_back(QtMultimedia::MetaData::ParentalRating);
|
||||||
} else if (key == PKEY_Comment) {
|
} else if (key == PKEY_Comment) {
|
||||||
m_availableMetaDatas.push_back(QtMultimedia::Description);
|
m_availableMetaDatas.push_back(QtMultimedia::MetaData::Description);
|
||||||
} else if (key == PKEY_Copyright) {
|
} else if (key == PKEY_Copyright) {
|
||||||
m_availableMetaDatas.push_back(QtMultimedia::Copyright);
|
m_availableMetaDatas.push_back(QtMultimedia::MetaData::Copyright);
|
||||||
//TODO: add more common keys
|
//TODO: add more common keys
|
||||||
} else {
|
} else {
|
||||||
common = false;
|
common = false;
|
||||||
@@ -211,24 +184,21 @@ void MFMetaDataControl::updateSource(IMFPresentationDescriptor* sourcePD, IMFMed
|
|||||||
#ifdef DEBUG_MEDIAFOUNDATION
|
#ifdef DEBUG_MEDIAFOUNDATION
|
||||||
qDebug() << "metadata: " << QString::fromUtf16(sName);
|
qDebug() << "metadata: " << QString::fromUtf16(sName);
|
||||||
#endif
|
#endif
|
||||||
bool common = true;
|
|
||||||
if (wcscmp(sName, L"Author") == 0) {
|
if (wcscmp(sName, L"Author") == 0) {
|
||||||
m_availableMetaDatas.push_back(QtMultimedia::Author);
|
m_availableMetaDatas.push_back(QtMultimedia::MetaData::Author);
|
||||||
} else if (wcscmp(sName, L"Title") == 0) {
|
} else if (wcscmp(sName, L"Title") == 0) {
|
||||||
m_availableMetaDatas.push_back(QtMultimedia::Title);
|
m_availableMetaDatas.push_back(QtMultimedia::MetaData::Title);
|
||||||
} else if (wcscmp(sName, L"Rating") == 0) {
|
} else if (wcscmp(sName, L"Rating") == 0) {
|
||||||
m_availableMetaDatas.push_back(QtMultimedia::ParentalRating);
|
m_availableMetaDatas.push_back(QtMultimedia::MetaData::ParentalRating);
|
||||||
} else if (wcscmp(sName, L"Description") == 0) {
|
} else if (wcscmp(sName, L"Description") == 0) {
|
||||||
m_availableMetaDatas.push_back(QtMultimedia::Description);
|
m_availableMetaDatas.push_back(QtMultimedia::MetaData::Description);
|
||||||
} else if (wcscmp(sName, L"Copyright") == 0) {
|
} else if (wcscmp(sName, L"Copyright") == 0) {
|
||||||
m_availableMetaDatas.push_back(QtMultimedia::Copyright);
|
m_availableMetaDatas.push_back(QtMultimedia::MetaData::Copyright);
|
||||||
//TODO: add more common keys
|
//TODO: add more common keys
|
||||||
} else {
|
} else {
|
||||||
common = false;
|
m_availableMetaDatas.push_back(QString::fromUtf16(sName));
|
||||||
m_extendedMetaDatas.push_back(QString::fromUtf16(sName));
|
|
||||||
}
|
}
|
||||||
if (common)
|
m_commonNames.push_back(QString::fromUtf16(sName));
|
||||||
m_commonNames.push_back(QString::fromUtf16(sName));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
PropVariantClear(&varNames);
|
PropVariantClear(&varNames);
|
||||||
|
|||||||
@@ -56,11 +56,8 @@ public:
|
|||||||
|
|
||||||
bool isMetaDataAvailable() const;
|
bool isMetaDataAvailable() const;
|
||||||
|
|
||||||
QVariant metaData(QtMultimedia::MetaData key) const;
|
QVariant metaData(const QString &key) const;
|
||||||
QList<QtMultimedia::MetaData> availableMetaData() const;
|
QStringList availableMetaData() const;
|
||||||
|
|
||||||
QVariant extendedMetaData(const QString &key) const;
|
|
||||||
QStringList availableExtendedMetaData() const;
|
|
||||||
|
|
||||||
void updateSource(IMFPresentationDescriptor* sourcePD, IMFMediaSource* mediaSource);
|
void updateSource(IMFPresentationDescriptor* sourcePD, IMFMediaSource* mediaSource);
|
||||||
|
|
||||||
@@ -69,12 +66,9 @@ private:
|
|||||||
IPropertyStore *m_content; //for Windows7
|
IPropertyStore *m_content; //for Windows7
|
||||||
IMFMetadata *m_metaData; //for Vista
|
IMFMetadata *m_metaData; //for Vista
|
||||||
|
|
||||||
QList<QtMultimedia::MetaData> m_availableMetaDatas;
|
QStringList m_availableMetaDatas;
|
||||||
QList<PROPERTYKEY> m_commonKeys; //for Windows7
|
QList<PROPERTYKEY> m_commonKeys; //for Windows7
|
||||||
QStringList m_commonNames; //for Vista
|
QStringList m_commonNames; //for Vista
|
||||||
|
|
||||||
QStringList m_extendedMetaDatas;
|
|
||||||
QList<PROPERTYKEY> m_extendedKeys; //for Windows7
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -127,8 +127,6 @@ private:
|
|||||||
|
|
||||||
void tst_QCameraBackend::initTestCase()
|
void tst_QCameraBackend::initTestCase()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<QtMultimedia::MetaData>("QtMultimedia::MetaData");
|
|
||||||
|
|
||||||
QCamera camera;
|
QCamera camera;
|
||||||
if (!camera.isAvailable())
|
if (!camera.isAvailable())
|
||||||
QSKIP("Camera is not available");
|
QSKIP("Camera is not available");
|
||||||
@@ -501,7 +499,7 @@ void tst_QCameraBackend::testCameraCaptureMetadata()
|
|||||||
QCameraImageCapture imageCapture(&camera);
|
QCameraImageCapture imageCapture(&camera);
|
||||||
camera.exposure()->setFlashMode(QCameraExposure::FlashOff);
|
camera.exposure()->setFlashMode(QCameraExposure::FlashOff);
|
||||||
|
|
||||||
QSignalSpy metadataSignal(&imageCapture, SIGNAL(imageMetadataAvailable(int,QtMultimedia::MetaData,QVariant)));
|
QSignalSpy metadataSignal(&imageCapture, SIGNAL(imageMetadataAvailable(int,QString,QVariant)));
|
||||||
QSignalSpy savedSignal(&imageCapture, SIGNAL(imageSaved(int,QString)));
|
QSignalSpy savedSignal(&imageCapture, SIGNAL(imageSaved(int,QString)));
|
||||||
|
|
||||||
camera.start();
|
camera.start();
|
||||||
|
|||||||
@@ -171,7 +171,6 @@ void tst_QCamera::initTestCase()
|
|||||||
provider = new MockMediaServiceProvider;
|
provider = new MockMediaServiceProvider;
|
||||||
mockSimpleCameraService = new MockSimpleCameraService;
|
mockSimpleCameraService = new MockSimpleCameraService;
|
||||||
provider->service = mockSimpleCameraService;
|
provider->service = mockSimpleCameraService;
|
||||||
qRegisterMetaType<QtMultimedia::MetaData>("QtMultimedia::MetaData");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_QCamera::cleanupTestCase()
|
void tst_QCamera::cleanupTestCase()
|
||||||
@@ -479,8 +478,7 @@ void tst_QCamera::testCameraCaptureMetadata()
|
|||||||
QCamera camera(0, provider);
|
QCamera camera(0, provider);
|
||||||
QCameraImageCapture imageCapture(&camera);
|
QCameraImageCapture imageCapture(&camera);
|
||||||
|
|
||||||
QSignalSpy metadataSignal(&imageCapture, SIGNAL(imageMetadataAvailable(int,QtMultimedia::MetaData,QVariant)));
|
QSignalSpy metadataSignal(&imageCapture, SIGNAL(imageMetadataAvailable(int,QString,QVariant)));
|
||||||
QSignalSpy extendedMetadataSignal(&imageCapture, SIGNAL(imageMetadataAvailable(int,QString,QVariant)));
|
|
||||||
QSignalSpy savedSignal(&imageCapture, SIGNAL(imageSaved(int,QString)));
|
QSignalSpy savedSignal(&imageCapture, SIGNAL(imageSaved(int,QString)));
|
||||||
|
|
||||||
camera.start();
|
camera.start();
|
||||||
@@ -491,21 +489,20 @@ void tst_QCamera::testCameraCaptureMetadata()
|
|||||||
|
|
||||||
QCOMPARE(savedSignal.size(), 1);
|
QCOMPARE(savedSignal.size(), 1);
|
||||||
|
|
||||||
QCOMPARE(metadataSignal.size(), 2);
|
QCOMPARE(metadataSignal.size(), 3);
|
||||||
|
|
||||||
QVariantList metadata = metadataSignal[0];
|
QVariantList metadata = metadataSignal[0];
|
||||||
QCOMPARE(metadata[0].toInt(), id);
|
QCOMPARE(metadata[0].toInt(), id);
|
||||||
QCOMPARE(metadata[1].value<QtMultimedia::MetaData>(), QtMultimedia::FocalLengthIn35mmFilm);
|
QCOMPARE(metadata[1].toString(), QtMultimedia::MetaData::FocalLengthIn35mmFilm);
|
||||||
QCOMPARE(metadata[2].value<QVariant>().toInt(), 50);
|
QCOMPARE(metadata[2].value<QVariant>().toInt(), 50);
|
||||||
|
|
||||||
metadata = metadataSignal[1];
|
metadata = metadataSignal[1];
|
||||||
QCOMPARE(metadata[0].toInt(), id);
|
QCOMPARE(metadata[0].toInt(), id);
|
||||||
QCOMPARE(metadata[1].value<QtMultimedia::MetaData>(), QtMultimedia::DateTimeOriginal);
|
QCOMPARE(metadata[1].toString(), QtMultimedia::MetaData::DateTimeOriginal);
|
||||||
QDateTime captureTime = metadata[2].value<QVariant>().value<QDateTime>();
|
QDateTime captureTime = metadata[2].value<QVariant>().value<QDateTime>();
|
||||||
QVERIFY(qAbs(captureTime.secsTo(QDateTime::currentDateTime()) < 5)); //it should not takes more than 5 seconds for signal to arrive here
|
QVERIFY(qAbs(captureTime.secsTo(QDateTime::currentDateTime()) < 5)); //it should not takes more than 5 seconds for signal to arrive here
|
||||||
|
|
||||||
QCOMPARE(extendedMetadataSignal.size(), 1);
|
metadata = metadataSignal[2];
|
||||||
metadata = extendedMetadataSignal.first();
|
|
||||||
QCOMPARE(metadata[0].toInt(), id);
|
QCOMPARE(metadata[0].toInt(), id);
|
||||||
QCOMPARE(metadata[1].toString(), QLatin1String("Answer to the Ultimate Question of Life, the Universe, and Everything"));
|
QCOMPARE(metadata[1].toString(), QLatin1String("Answer to the Ultimate Question of Life, the Universe, and Everything"));
|
||||||
QCOMPARE(metadata[2].value<QVariant>().toInt(), 42);
|
QCOMPARE(metadata[2].value<QVariant>().toInt(), 42);
|
||||||
|
|||||||
@@ -97,7 +97,6 @@ void tst_QCameraWidgets::initTestCase()
|
|||||||
provider = new MockMediaServiceProvider;
|
provider = new MockMediaServiceProvider;
|
||||||
mockSimpleCameraService = new MockSimpleCameraService;
|
mockSimpleCameraService = new MockSimpleCameraService;
|
||||||
provider->service = mockSimpleCameraService;
|
provider->service = mockSimpleCameraService;
|
||||||
qRegisterMetaType<QtMultimedia::MetaData>("QtMultimedia::MetaData");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_QCameraWidgets::cleanupTestCase()
|
void tst_QCameraWidgets::cleanupTestCase()
|
||||||
|
|||||||
@@ -202,17 +202,14 @@ public:
|
|||||||
|
|
||||||
bool isMetaDataAvailable() const { return true; }
|
bool isMetaDataAvailable() const { return true; }
|
||||||
|
|
||||||
QVariant metaData(QtMultimedia::MetaData key) const { return m_metaData.value(key); }
|
QVariant metaData(const QString &key) const { return m_metaData.value(key); }
|
||||||
void setMetaData(QtMultimedia::MetaData key, const QVariant &value) {
|
void setMetaData(const QString &key, const QVariant &value) {
|
||||||
m_metaData.insert(key, value); emit metaDataChanged(); }
|
m_metaData.insert(key, value); emit metaDataChanged(); }
|
||||||
|
|
||||||
QList<QtMultimedia::MetaData> availableMetaData() const { return m_metaData.keys(); }
|
QStringList availableMetaData() const { return m_metaData.keys(); }
|
||||||
|
|
||||||
QVariant extendedMetaData(const QString &) const { return QVariant(); }
|
|
||||||
QStringList availableExtendedMetaData() const { return QStringList(); }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QMap<QtMultimedia::MetaData, QVariant> m_metaData;
|
QMap<QString, QVariant> m_metaData;
|
||||||
};
|
};
|
||||||
|
|
||||||
class QtTestMediaService : public QMediaService
|
class QtTestMediaService : public QMediaService
|
||||||
@@ -1122,29 +1119,29 @@ void tst_QDeclarativeAudio::status()
|
|||||||
void tst_QDeclarativeAudio::metaData_data()
|
void tst_QDeclarativeAudio::metaData_data()
|
||||||
{
|
{
|
||||||
QTest::addColumn<QByteArray>("propertyName");
|
QTest::addColumn<QByteArray>("propertyName");
|
||||||
QTest::addColumn<QtMultimedia::MetaData>("propertyKey");
|
QTest::addColumn<QString>("propertyKey");
|
||||||
QTest::addColumn<QVariant>("value");
|
QTest::addColumn<QVariant>("value");
|
||||||
|
|
||||||
QTest::newRow("title")
|
QTest::newRow("title")
|
||||||
<< QByteArray("title")
|
<< QByteArray("title")
|
||||||
<< QtMultimedia::Title
|
<< QtMultimedia::MetaData::Title
|
||||||
<< QVariant(QString::fromLatin1("This is a title"));
|
<< QVariant(QString::fromLatin1("This is a title"));
|
||||||
|
|
||||||
QTest::newRow("genre")
|
QTest::newRow("genre")
|
||||||
<< QByteArray("genre")
|
<< QByteArray("genre")
|
||||||
<< QtMultimedia::Genre
|
<< QtMultimedia::MetaData::Genre
|
||||||
<< QVariant(QString::fromLatin1("rock"));
|
<< QVariant(QString::fromLatin1("rock"));
|
||||||
|
|
||||||
QTest::newRow("trackNumber")
|
QTest::newRow("trackNumber")
|
||||||
<< QByteArray("trackNumber")
|
<< QByteArray("trackNumber")
|
||||||
<< QtMultimedia::TrackNumber
|
<< QtMultimedia::MetaData::TrackNumber
|
||||||
<< QVariant(8);
|
<< QVariant(8);
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_QDeclarativeAudio::metaData()
|
void tst_QDeclarativeAudio::metaData()
|
||||||
{
|
{
|
||||||
QFETCH(QByteArray, propertyName);
|
QFETCH(QByteArray, propertyName);
|
||||||
QFETCH(QtMultimedia::MetaData, propertyKey);
|
QFETCH(QString, propertyKey);
|
||||||
QFETCH(QVariant, value);
|
QFETCH(QVariant, value);
|
||||||
|
|
||||||
QtTestMediaServiceProvider provider;
|
QtTestMediaServiceProvider provider;
|
||||||
|
|||||||
@@ -98,8 +98,6 @@ private slots:
|
|||||||
void metaData_data();
|
void metaData_data();
|
||||||
void metaData();
|
void metaData();
|
||||||
void availability();
|
void availability();
|
||||||
void extendedMetaData_data() { metaData_data(); }
|
|
||||||
void extendedMetaData();
|
|
||||||
|
|
||||||
void service();
|
void service();
|
||||||
|
|
||||||
@@ -340,10 +338,8 @@ void tst_QMediaObject::nullMetaDataControl()
|
|||||||
|
|
||||||
QCOMPARE(object.isMetaDataAvailable(), false);
|
QCOMPARE(object.isMetaDataAvailable(), false);
|
||||||
|
|
||||||
QCOMPARE(object.metaData(QtMultimedia::Title).toString(), QString());
|
QCOMPARE(object.metaData(QtMultimedia::MetaData::Title).toString(), QString());
|
||||||
QCOMPARE(object.extendedMetaData(titleKey).toString(), QString());
|
QCOMPARE(object.availableMetaData(), QStringList());
|
||||||
QCOMPARE(object.availableMetaData(), QList<QtMultimedia::MetaData>());
|
|
||||||
QCOMPARE(object.availableExtendedMetaData(), QStringList());
|
|
||||||
QCOMPARE(spy.count(), 0);
|
QCOMPARE(spy.count(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -407,42 +403,18 @@ void tst_QMediaObject::metaData()
|
|||||||
QtTestMediaObject object(&service);
|
QtTestMediaObject object(&service);
|
||||||
QVERIFY(object.availableMetaData().isEmpty());
|
QVERIFY(object.availableMetaData().isEmpty());
|
||||||
|
|
||||||
service.metaData.m_data.insert(QtMultimedia::AlbumArtist, artist);
|
service.metaData.m_data.insert(QtMultimedia::MetaData::AlbumArtist, artist);
|
||||||
service.metaData.m_data.insert(QtMultimedia::Title, title);
|
service.metaData.m_data.insert(QtMultimedia::MetaData::Title, title);
|
||||||
service.metaData.m_data.insert(QtMultimedia::Genre, genre);
|
service.metaData.m_data.insert(QtMultimedia::MetaData::Genre, genre);
|
||||||
|
|
||||||
QCOMPARE(object.metaData(QtMultimedia::AlbumArtist).toString(), artist);
|
QCOMPARE(object.metaData(QtMultimedia::MetaData::AlbumArtist).toString(), artist);
|
||||||
QCOMPARE(object.metaData(QtMultimedia::Title).toString(), title);
|
QCOMPARE(object.metaData(QtMultimedia::MetaData::Title).toString(), title);
|
||||||
|
|
||||||
QList<QtMultimedia::MetaData> metaDataKeys = object.availableMetaData();
|
QStringList metaDataKeys = object.availableMetaData();
|
||||||
QCOMPARE(metaDataKeys.size(), 3);
|
QCOMPARE(metaDataKeys.size(), 3);
|
||||||
QVERIFY(metaDataKeys.contains(QtMultimedia::AlbumArtist));
|
QVERIFY(metaDataKeys.contains(QtMultimedia::MetaData::AlbumArtist));
|
||||||
QVERIFY(metaDataKeys.contains(QtMultimedia::Title));
|
QVERIFY(metaDataKeys.contains(QtMultimedia::MetaData::Title));
|
||||||
QVERIFY(metaDataKeys.contains(QtMultimedia::Genre));
|
QVERIFY(metaDataKeys.contains(QtMultimedia::MetaData::Genre));
|
||||||
}
|
|
||||||
|
|
||||||
void tst_QMediaObject::extendedMetaData()
|
|
||||||
{
|
|
||||||
QFETCH(QString, artist);
|
|
||||||
QFETCH(QString, title);
|
|
||||||
QFETCH(QString, genre);
|
|
||||||
|
|
||||||
QtTestMetaDataService service;
|
|
||||||
QtTestMediaObject object(&service);
|
|
||||||
QVERIFY(object.availableExtendedMetaData().isEmpty());
|
|
||||||
|
|
||||||
service.metaData.m_extendedData.insert(QLatin1String("Artist"), artist);
|
|
||||||
service.metaData.m_extendedData.insert(QLatin1String("Title"), title);
|
|
||||||
service.metaData.m_extendedData.insert(QLatin1String("Genre"), genre);
|
|
||||||
|
|
||||||
QCOMPARE(object.extendedMetaData(QLatin1String("Artist")).toString(), artist);
|
|
||||||
QCOMPARE(object.extendedMetaData(QLatin1String("Title")).toString(), title);
|
|
||||||
|
|
||||||
QStringList extendedKeys = object.availableExtendedMetaData();
|
|
||||||
QCOMPARE(extendedKeys.size(), 3);
|
|
||||||
QVERIFY(extendedKeys.contains(QLatin1String("Artist")));
|
|
||||||
QVERIFY(extendedKeys.contains(QLatin1String("Title")));
|
|
||||||
QVERIFY(extendedKeys.contains(QLatin1String("Genre")));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_QMediaObject::availability()
|
void tst_QMediaObject::availability()
|
||||||
|
|||||||
@@ -92,10 +92,6 @@ private slots:
|
|||||||
void metaData();
|
void metaData();
|
||||||
void setMetaData_data();
|
void setMetaData_data();
|
||||||
void setMetaData();
|
void setMetaData();
|
||||||
void extendedMetaData_data() { metaData_data(); }
|
|
||||||
void extendedMetaData();
|
|
||||||
void setExtendedMetaData_data() { extendedMetaData_data(); }
|
|
||||||
void setExtendedMetaData();
|
|
||||||
|
|
||||||
void testAudioSettingsCopyConstructor();
|
void testAudioSettingsCopyConstructor();
|
||||||
void testAudioSettingsOperatorNotEqual();
|
void testAudioSettingsOperatorNotEqual();
|
||||||
@@ -710,13 +706,10 @@ void tst_QMediaRecorder::nullMetaDataControl()
|
|||||||
QCOMPARE(recorder.isMetaDataAvailable(), false);
|
QCOMPARE(recorder.isMetaDataAvailable(), false);
|
||||||
QCOMPARE(recorder.isMetaDataWritable(), false);
|
QCOMPARE(recorder.isMetaDataWritable(), false);
|
||||||
|
|
||||||
recorder.setMetaData(QtMultimedia::Title, title);
|
recorder.setMetaData(QtMultimedia::MetaData::Title, title);
|
||||||
recorder.setExtendedMetaData(titleKey, title);
|
|
||||||
|
|
||||||
QCOMPARE(recorder.metaData(QtMultimedia::Title).toString(), QString());
|
QCOMPARE(recorder.metaData(QtMultimedia::MetaData::Title).toString(), QString());
|
||||||
QCOMPARE(recorder.extendedMetaData(titleKey).toString(), QString());
|
QCOMPARE(recorder.availableMetaData(), QStringList());
|
||||||
QCOMPARE(recorder.availableMetaData(), QList<QtMultimedia::MetaData>());
|
|
||||||
QCOMPARE(recorder.availableExtendedMetaData(), QStringList());
|
|
||||||
QCOMPARE(spy.count(), 0);
|
QCOMPARE(spy.count(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -793,11 +786,13 @@ void tst_QMediaRecorder::metaData_data()
|
|||||||
QTest::addColumn<QString>("artist");
|
QTest::addColumn<QString>("artist");
|
||||||
QTest::addColumn<QString>("title");
|
QTest::addColumn<QString>("title");
|
||||||
QTest::addColumn<QString>("genre");
|
QTest::addColumn<QString>("genre");
|
||||||
|
QTest::addColumn<QString>("custom");
|
||||||
|
|
||||||
QTest::newRow("")
|
QTest::newRow("")
|
||||||
<< QString::fromLatin1("Dead Can Dance")
|
<< QString::fromLatin1("Dead Can Dance")
|
||||||
<< QString::fromLatin1("Host of Seraphim")
|
<< QString::fromLatin1("Host of Seraphim")
|
||||||
<< QString::fromLatin1("Awesome");
|
<< QString::fromLatin1("Awesome")
|
||||||
|
<< QString::fromLatin1("Something else");
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_QMediaRecorder::metaData()
|
void tst_QMediaRecorder::metaData()
|
||||||
@@ -805,6 +800,7 @@ void tst_QMediaRecorder::metaData()
|
|||||||
QFETCH(QString, artist);
|
QFETCH(QString, artist);
|
||||||
QFETCH(QString, title);
|
QFETCH(QString, title);
|
||||||
QFETCH(QString, genre);
|
QFETCH(QString, genre);
|
||||||
|
QFETCH(QString, custom);
|
||||||
|
|
||||||
MockMediaRecorderControl recorderControl(0);
|
MockMediaRecorderControl recorderControl(0);
|
||||||
MockMediaRecorderService service(0, &recorderControl);
|
MockMediaRecorderService service(0, &recorderControl);
|
||||||
@@ -815,18 +811,20 @@ void tst_QMediaRecorder::metaData()
|
|||||||
QMediaRecorder recorder(&object);
|
QMediaRecorder recorder(&object);
|
||||||
QVERIFY(object.availableMetaData().isEmpty());
|
QVERIFY(object.availableMetaData().isEmpty());
|
||||||
|
|
||||||
service.mockMetaDataControl->m_data.insert(QtMultimedia::AlbumArtist, artist);
|
service.mockMetaDataControl->m_data.insert(QtMultimedia::MetaData::AlbumArtist, artist);
|
||||||
service.mockMetaDataControl->m_data.insert(QtMultimedia::Title, title);
|
service.mockMetaDataControl->m_data.insert(QtMultimedia::MetaData::Title, title);
|
||||||
service.mockMetaDataControl->m_data.insert(QtMultimedia::Genre, genre);
|
service.mockMetaDataControl->m_data.insert(QtMultimedia::MetaData::Genre, genre);
|
||||||
|
service.mockMetaDataControl->m_data.insert(QLatin1String("CustomEntry"), custom );
|
||||||
|
|
||||||
QCOMPARE(recorder.metaData(QtMultimedia::AlbumArtist).toString(), artist);
|
QCOMPARE(recorder.metaData(QtMultimedia::MetaData::AlbumArtist).toString(), artist);
|
||||||
QCOMPARE(recorder.metaData(QtMultimedia::Title).toString(), title);
|
QCOMPARE(recorder.metaData(QtMultimedia::MetaData::Title).toString(), title);
|
||||||
|
|
||||||
QList<QtMultimedia::MetaData> metaDataKeys = recorder.availableMetaData();
|
QStringList metaDataKeys = recorder.availableMetaData();
|
||||||
QCOMPARE(metaDataKeys.size(), 3);
|
QCOMPARE(metaDataKeys.size(), 4);
|
||||||
QVERIFY(metaDataKeys.contains(QtMultimedia::AlbumArtist));
|
QVERIFY(metaDataKeys.contains(QtMultimedia::MetaData::AlbumArtist));
|
||||||
QVERIFY(metaDataKeys.contains(QtMultimedia::Title));
|
QVERIFY(metaDataKeys.contains(QtMultimedia::MetaData::Title));
|
||||||
QVERIFY(metaDataKeys.contains(QtMultimedia::Genre));
|
QVERIFY(metaDataKeys.contains(QtMultimedia::MetaData::Genre));
|
||||||
|
QVERIFY(metaDataKeys.contains(QLatin1String("CustomEntry")));
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_QMediaRecorder::setMetaData_data()
|
void tst_QMediaRecorder::setMetaData_data()
|
||||||
@@ -849,56 +847,11 @@ void tst_QMediaRecorder::setMetaData()
|
|||||||
|
|
||||||
QMediaRecorder recorder(&object);
|
QMediaRecorder recorder(&object);
|
||||||
|
|
||||||
recorder.setMetaData(QtMultimedia::Title, title);
|
recorder.setMetaData(QtMultimedia::MetaData::Title, title);
|
||||||
QCOMPARE(recorder.metaData(QtMultimedia::Title).toString(), title);
|
QCOMPARE(recorder.metaData(QtMultimedia::MetaData::Title).toString(), title);
|
||||||
QCOMPARE(service.mockMetaDataControl->m_data.value(QtMultimedia::Title).toString(), title);
|
QCOMPARE(service.mockMetaDataControl->m_data.value(QtMultimedia::MetaData::Title).toString(), title);
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_QMediaRecorder::extendedMetaData()
|
|
||||||
{
|
|
||||||
QFETCH(QString, artist);
|
|
||||||
QFETCH(QString, title);
|
|
||||||
QFETCH(QString, genre);
|
|
||||||
|
|
||||||
MockMediaRecorderControl recorderControl(0);
|
|
||||||
MockMediaRecorderService service(0, &recorderControl);
|
|
||||||
MockMediaObject object(0, &service);
|
|
||||||
|
|
||||||
QMediaRecorder recorder(&object);
|
|
||||||
QVERIFY(recorder.availableExtendedMetaData().isEmpty());
|
|
||||||
|
|
||||||
service.mockMetaDataControl->m_extendedData.insert(QLatin1String("Artist"), artist);
|
|
||||||
service.mockMetaDataControl->m_extendedData.insert(QLatin1String("Title"), title);
|
|
||||||
service.mockMetaDataControl->m_extendedData.insert(QLatin1String("Genre"), genre);
|
|
||||||
|
|
||||||
QCOMPARE(recorder.extendedMetaData(QLatin1String("Artist")).toString(), artist);
|
|
||||||
QCOMPARE(recorder.extendedMetaData(QLatin1String("Title")).toString(), title);
|
|
||||||
|
|
||||||
QStringList extendedKeys = recorder.availableExtendedMetaData();
|
|
||||||
QCOMPARE(extendedKeys.size(), 3);
|
|
||||||
QVERIFY(extendedKeys.contains(QLatin1String("Artist")));
|
|
||||||
QVERIFY(extendedKeys.contains(QLatin1String("Title")));
|
|
||||||
QVERIFY(extendedKeys.contains(QLatin1String("Genre")));
|
|
||||||
}
|
|
||||||
|
|
||||||
void tst_QMediaRecorder::setExtendedMetaData()
|
|
||||||
{
|
|
||||||
MockMediaRecorderControl recorderControl(0);
|
|
||||||
MockMediaRecorderService service(0, &recorderControl);
|
|
||||||
service.mockMetaDataControl->populateMetaData();
|
|
||||||
|
|
||||||
MockMediaObject object(0, &service);
|
|
||||||
|
|
||||||
QMediaRecorder recorder(&object);
|
|
||||||
|
|
||||||
QString title(QLatin1String("In the Kingdom of the Blind the One eyed are Kings"));
|
|
||||||
|
|
||||||
recorder.setExtendedMetaData(QLatin1String("Title"), title);
|
|
||||||
QCOMPARE(recorder.extendedMetaData(QLatin1String("Title")).toString(), title);
|
|
||||||
QCOMPARE(service.mockMetaDataControl->m_extendedData.value(QLatin1String("Title")).toString(), title);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void tst_QMediaRecorder::testAudioSettingsCopyConstructor()
|
void tst_QMediaRecorder::testAudioSettingsCopyConstructor()
|
||||||
{
|
{
|
||||||
/* create an object for AudioEncodersettings */
|
/* create an object for AudioEncodersettings */
|
||||||
|
|||||||
@@ -52,10 +52,8 @@ private slots:
|
|||||||
// Test case for QMetaDataReaderControl
|
// Test case for QMetaDataReaderControl
|
||||||
void metaDataReaderControlConstructor();
|
void metaDataReaderControlConstructor();
|
||||||
void metaDataReaderControlAvailableMetaData();
|
void metaDataReaderControlAvailableMetaData();
|
||||||
void metaDataReaderControlExtendedMetaData();
|
|
||||||
void metaDataReaderControlIsMetaDataAvailable();
|
void metaDataReaderControlIsMetaDataAvailable();
|
||||||
void metaDataReaderControlMetaData();
|
void metaDataReaderControlMetaData();
|
||||||
void metaDataReaderControlAvailableExtendedMetaData();
|
|
||||||
void metaDataReaderControlMetaDataAvailableChangedSignal();
|
void metaDataReaderControlMetaDataAvailableChangedSignal();
|
||||||
void metaDataReaderControlMetaDataChangedSignal();
|
void metaDataReaderControlMetaDataChangedSignal();
|
||||||
};
|
};
|
||||||
@@ -79,16 +77,6 @@ void tst_QMetaDataReaderControl::metaDataReaderControlAvailableMetaData()
|
|||||||
delete metaData;
|
delete metaData;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Test case for extendedMetaData */
|
|
||||||
void tst_QMetaDataReaderControl::metaDataReaderControlExtendedMetaData ()
|
|
||||||
{
|
|
||||||
const QString titleKey(QLatin1String("Title"));
|
|
||||||
MockMetaDataReaderControl *metaData = new MockMetaDataReaderControl();
|
|
||||||
QVERIFY(metaData !=NULL);
|
|
||||||
metaData->extendedMetaData(titleKey);
|
|
||||||
delete metaData;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Test case for availableMetaData */
|
/* Test case for availableMetaData */
|
||||||
void tst_QMetaDataReaderControl::metaDataReaderControlIsMetaDataAvailable ()
|
void tst_QMetaDataReaderControl::metaDataReaderControlIsMetaDataAvailable ()
|
||||||
{
|
{
|
||||||
@@ -103,16 +91,7 @@ void tst_QMetaDataReaderControl::metaDataReaderControlMetaData ()
|
|||||||
{
|
{
|
||||||
MockMetaDataReaderControl *metaData = new MockMetaDataReaderControl();
|
MockMetaDataReaderControl *metaData = new MockMetaDataReaderControl();
|
||||||
QVERIFY(metaData !=NULL);
|
QVERIFY(metaData !=NULL);
|
||||||
metaData->metaData(QtMultimedia::Title);
|
metaData->metaData(QtMultimedia::MetaData::Title);
|
||||||
delete metaData;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Test case for availableExtendedMetaData */
|
|
||||||
void tst_QMetaDataReaderControl::metaDataReaderControlAvailableExtendedMetaData ()
|
|
||||||
{
|
|
||||||
MockMetaDataReaderControl *metaData = new MockMetaDataReaderControl();
|
|
||||||
QVERIFY(metaData !=NULL);
|
|
||||||
metaData->availableExtendedMetaData();
|
|
||||||
delete metaData;
|
delete metaData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -71,14 +71,11 @@ void tst_QMetaDataWriterControl::cleanupTestCase()
|
|||||||
void tst_QMetaDataWriterControl::constructor()
|
void tst_QMetaDataWriterControl::constructor()
|
||||||
{
|
{
|
||||||
QMetaDataWriterControl *mock = new MockMetaDataWriterControl();
|
QMetaDataWriterControl *mock = new MockMetaDataWriterControl();
|
||||||
mock->availableExtendedMetaData();
|
|
||||||
mock->availableMetaData();
|
mock->availableMetaData();
|
||||||
mock->isMetaDataAvailable();
|
mock->isMetaDataAvailable();
|
||||||
mock->isWritable();
|
mock->isWritable();
|
||||||
mock->metaData((QtMultimedia::MetaData) 1 );
|
mock->metaData(QtMultimedia::MetaData::Title);
|
||||||
mock->extendedMetaData(QString("XYZ"));
|
mock->setMetaData(QtMultimedia::MetaData::Title, QVariant());
|
||||||
mock->setExtendedMetaData(QString("XYZ"),QVariant());
|
|
||||||
mock->setMetaData((QtMultimedia::MetaData) 1,QVariant());
|
|
||||||
((MockMetaDataWriterControl*)mock)->setWritable();
|
((MockMetaDataWriterControl*)mock)->setWritable();
|
||||||
((MockMetaDataWriterControl*)mock)->setMetaDataAvailable();
|
((MockMetaDataWriterControl*)mock)->setMetaDataAvailable();
|
||||||
delete mock;
|
delete mock;
|
||||||
|
|||||||
@@ -95,11 +95,11 @@ private Q_SLOTS:
|
|||||||
emit imageCaptured(m_captureRequest, QImage());
|
emit imageCaptured(m_captureRequest, QImage());
|
||||||
|
|
||||||
emit imageMetadataAvailable(m_captureRequest,
|
emit imageMetadataAvailable(m_captureRequest,
|
||||||
QtMultimedia::FocalLengthIn35mmFilm,
|
QtMultimedia::MetaData::FocalLengthIn35mmFilm,
|
||||||
QVariant(50));
|
QVariant(50));
|
||||||
|
|
||||||
emit imageMetadataAvailable(m_captureRequest,
|
emit imageMetadataAvailable(m_captureRequest,
|
||||||
QtMultimedia::DateTimeOriginal,
|
QtMultimedia::MetaData::DateTimeOriginal,
|
||||||
QVariant(QDateTime::currentDateTime()));
|
QVariant(QDateTime::currentDateTime()));
|
||||||
|
|
||||||
emit imageMetadataAvailable(m_captureRequest,
|
emit imageMetadataAvailable(m_captureRequest,
|
||||||
|
|||||||
@@ -55,9 +55,9 @@ public:
|
|||||||
StreamType streamType(int index) { return _streams.at(index).type; }
|
StreamType streamType(int index) { return _streams.at(index).type; }
|
||||||
void setStreamType(int index, StreamType type) { _streams[index].type = type; }
|
void setStreamType(int index, StreamType type) { _streams[index].type = type; }
|
||||||
|
|
||||||
QVariant metaData(int index, QtMultimedia::MetaData key) {
|
QVariant metaData(int index, const QString &key) {
|
||||||
return _streams.at(index).metaData.value(key); }
|
return _streams.at(index).metaData.value(key); }
|
||||||
void setMetaData(int index, QtMultimedia::MetaData key, const QVariant &value) {
|
void setMetaData(int index, const QString &key, const QVariant &value) {
|
||||||
_streams[index].metaData.insert(key, value); }
|
_streams[index].metaData.insert(key, value); }
|
||||||
|
|
||||||
bool isActive(int index) { return _streams.at(index).active; }
|
bool isActive(int index) { return _streams.at(index).active; }
|
||||||
@@ -68,7 +68,7 @@ private:
|
|||||||
{
|
{
|
||||||
Stream() : type(UnknownStream), active(false) {}
|
Stream() : type(UnknownStream), active(false) {}
|
||||||
StreamType type;
|
StreamType type;
|
||||||
QMap<QtMultimedia::MetaData, QVariant> metaData;
|
QMap<QString, QVariant> metaData;
|
||||||
bool active;
|
bool active;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -63,26 +63,16 @@ public:
|
|||||||
if (m_available != available)
|
if (m_available != available)
|
||||||
emit metaDataAvailableChanged(m_available = available);
|
emit metaDataAvailableChanged(m_available = available);
|
||||||
}
|
}
|
||||||
QList<QtMultimedia::MetaData> availableMetaData() const
|
QStringList availableMetaData() const
|
||||||
{
|
{
|
||||||
return m_data.keys();
|
return m_data.keys();
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant metaData(QtMultimedia::MetaData key) const
|
QVariant metaData(const QString &key) const
|
||||||
{
|
{
|
||||||
return m_data.value(key);
|
return m_data.value(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant extendedMetaData(const QString &key) const
|
|
||||||
{
|
|
||||||
return m_extendedData.value(key);
|
|
||||||
}
|
|
||||||
|
|
||||||
QStringList availableExtendedMetaData() const
|
|
||||||
{
|
|
||||||
return m_extendedData.keys();
|
|
||||||
}
|
|
||||||
|
|
||||||
using QMetaDataReaderControl::metaDataChanged;
|
using QMetaDataReaderControl::metaDataChanged;
|
||||||
|
|
||||||
void populateMetaData()
|
void populateMetaData()
|
||||||
@@ -91,8 +81,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool m_available;
|
bool m_available;
|
||||||
QMap<QtMultimedia::MetaData, QVariant> m_data;
|
QMap<QString, QVariant> m_data;
|
||||||
QMap<QString, QVariant> m_extendedData;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MOCKMETADATAREADERCONTROL_H
|
#endif // MOCKMETADATAREADERCONTROL_H
|
||||||
|
|||||||
@@ -64,25 +64,17 @@ public:
|
|||||||
if (m_available != available)
|
if (m_available != available)
|
||||||
emit metaDataAvailableChanged(m_available = available);
|
emit metaDataAvailableChanged(m_available = available);
|
||||||
}
|
}
|
||||||
QList<QtMultimedia::MetaData> availableMetaData() const { return m_data.keys(); }
|
QStringList availableMetaData() const { return m_data.keys(); }
|
||||||
|
|
||||||
bool isWritable() const { return m_writable; }
|
bool isWritable() const { return m_writable; }
|
||||||
void setWritable(bool writable) { emit writableChanged(m_writable = writable); }
|
void setWritable(bool writable) { emit writableChanged(m_writable = writable); }
|
||||||
|
|
||||||
QVariant metaData(QtMultimedia::MetaData key) const { return m_data.value(key); }//Getting the metadata from Multimediakit
|
QVariant metaData(const QString &key) const { return m_data.value(key); }//Getting the metadata from Multimediakit
|
||||||
void setMetaData(QtMultimedia::MetaData key, const QVariant &value)
|
void setMetaData(const QString &key, const QVariant &value)
|
||||||
{
|
{
|
||||||
m_data.insert(key, value);
|
m_data.insert(key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant extendedMetaData(const QString &key) const { return m_extendedData.value(key); }
|
|
||||||
void setExtendedMetaData(const QString &key, const QVariant &value)
|
|
||||||
{
|
|
||||||
m_extendedData.insert(key, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
QStringList availableExtendedMetaData() const { return m_extendedData.keys(); }
|
|
||||||
|
|
||||||
using QMetaDataWriterControl::metaDataChanged;
|
using QMetaDataWriterControl::metaDataChanged;
|
||||||
|
|
||||||
void populateMetaData()
|
void populateMetaData()
|
||||||
@@ -100,8 +92,7 @@ public:
|
|||||||
|
|
||||||
bool m_available;
|
bool m_available;
|
||||||
bool m_writable;
|
bool m_writable;
|
||||||
QMap<QtMultimedia::MetaData, QVariant> m_data;
|
QMap<QString, QVariant> m_data;
|
||||||
QMap<QString, QVariant> m_extendedData;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MOCKMETADATAWRITERCONTROL_H
|
#endif // MOCKMETADATAWRITERCONTROL_H
|
||||||
|
|||||||
Reference in New Issue
Block a user