1/****************************************************************************
2**
3** Copyright (C) 2016 The Qt Company Ltd.
4** Contact: https://www.qt.io/licensing/
5**
6** This file is part of the Qt Toolkit.
7**
8** $QT_BEGIN_LICENSE:LGPL$
9** Commercial License Usage
10** Licensees holding valid commercial Qt licenses may use this file in
11** accordance with the commercial license agreement provided with the
12** Software or, alternatively, in accordance with the terms contained in
13** a written agreement between you and The Qt Company. For licensing terms
14** and conditions see https://www.qt.io/terms-conditions. For further
15** information use the contact form at https://www.qt.io/contact-us.
16**
17** GNU Lesser General Public License Usage
18** Alternatively, this file may be used under the terms of the GNU Lesser
19** General Public License version 3 as published by the Free Software
20** Foundation and appearing in the file LICENSE.LGPL3 included in the
21** packaging of this file. Please review the following information to
22** ensure the GNU Lesser General Public License version 3 requirements
23** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
24**
25** GNU General Public License Usage
26** Alternatively, this file may be used under the terms of the GNU
27** General Public License version 2.0 or (at your option) the GNU General
28** Public license version 3 or any later version approved by the KDE Free
29** Qt Foundation. The licenses are as published by the Free Software
30** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
31** included in the packaging of this file. Please review the following
32** information to ensure the GNU General Public License requirements will
33** be met: https://www.gnu.org/licenses/gpl-2.0.html and
34** https://www.gnu.org/licenses/gpl-3.0.html.
35**
36** $QT_END_LICENSE$
37**
38****************************************************************************/
39
40#ifndef QDECLARATIVEMEDIAMETADATA_P_H
41#define QDECLARATIVEMEDIAMETADATA_P_H
42
43//
44// W A R N I N G
45// -------------
46//
47// This file is not part of the Qt API. It exists for the convenience
48// of other Qt classes. This header file may change from version to
49// version without notice, or even be removed.
50//
51// We mean it.
52//
53
54#include <QtQml/qqml.h>
55#include <QtMultimedia/qmediametadata.h>
56#include <QtMultimedia/qmediaservice.h>
57#include <QtMultimedia/qmetadatawritercontrol.h>
58#include "qmediaobject.h"
59
60QT_BEGIN_NAMESPACE
61
62class QDeclarativeMediaMetaData : public QObject
63{
64 Q_OBJECT
65 Q_PROPERTY(QVariant title READ title WRITE setTitle NOTIFY metaDataChanged)
66 Q_PROPERTY(QVariant subTitle READ subTitle WRITE setSubTitle NOTIFY metaDataChanged)
67 Q_PROPERTY(QVariant author READ author WRITE setAuthor NOTIFY metaDataChanged)
68 Q_PROPERTY(QVariant comment READ comment WRITE setComment NOTIFY metaDataChanged)
69 Q_PROPERTY(QVariant description READ description WRITE setDescription NOTIFY metaDataChanged)
70 Q_PROPERTY(QVariant category READ category WRITE setCategory NOTIFY metaDataChanged)
71 Q_PROPERTY(QVariant genre READ genre WRITE setGenre NOTIFY metaDataChanged)
72 Q_PROPERTY(QVariant year READ year WRITE setYear NOTIFY metaDataChanged)
73 Q_PROPERTY(QVariant date READ date WRITE setDate NOTIFY metaDataChanged)
74 Q_PROPERTY(QVariant userRating READ userRating WRITE setUserRating NOTIFY metaDataChanged)
75 Q_PROPERTY(QVariant keywords READ keywords WRITE setKeywords NOTIFY metaDataChanged)
76 Q_PROPERTY(QVariant language READ language WRITE setLanguage NOTIFY metaDataChanged)
77 Q_PROPERTY(QVariant publisher READ publisher WRITE setPublisher NOTIFY metaDataChanged)
78 Q_PROPERTY(QVariant copyright READ copyright WRITE setCopyright NOTIFY metaDataChanged)
79 Q_PROPERTY(QVariant parentalRating READ parentalRating WRITE setParentalRating NOTIFY metaDataChanged)
80 Q_PROPERTY(QVariant ratingOrganization READ ratingOrganization WRITE setRatingOrganization NOTIFY metaDataChanged)
81 Q_PROPERTY(QVariant size READ size WRITE setSize NOTIFY metaDataChanged)
82 Q_PROPERTY(QVariant mediaType READ mediaType WRITE setMediaType NOTIFY metaDataChanged)
83 Q_PROPERTY(QVariant duration READ duration WRITE setDuration NOTIFY metaDataChanged)
84 Q_PROPERTY(QVariant audioBitRate READ audioBitRate WRITE setAudioBitRate NOTIFY metaDataChanged)
85 Q_PROPERTY(QVariant audioCodec READ audioCodec WRITE setAudioCodec NOTIFY metaDataChanged)
86 Q_PROPERTY(QVariant averageLevel READ averageLevel WRITE setAverageLevel NOTIFY metaDataChanged)
87 Q_PROPERTY(QVariant channelCount READ channelCount WRITE setChannelCount NOTIFY metaDataChanged)
88 Q_PROPERTY(QVariant peakValue READ peakValue WRITE setPeakValue NOTIFY metaDataChanged)
89 Q_PROPERTY(QVariant sampleRate READ sampleRate WRITE setSampleRate NOTIFY metaDataChanged)
90 Q_PROPERTY(QVariant albumTitle READ albumTitle WRITE setAlbumTitle NOTIFY metaDataChanged)
91 Q_PROPERTY(QVariant albumArtist READ albumArtist WRITE setAlbumArtist NOTIFY metaDataChanged)
92 Q_PROPERTY(QVariant contributingArtist READ contributingArtist WRITE setContributingArtist NOTIFY metaDataChanged)
93 Q_PROPERTY(QVariant composer READ composer WRITE setComposer NOTIFY metaDataChanged)
94 Q_PROPERTY(QVariant conductor READ conductor WRITE setConductor NOTIFY metaDataChanged)
95 Q_PROPERTY(QVariant lyrics READ lyrics WRITE setLyrics NOTIFY metaDataChanged)
96 Q_PROPERTY(QVariant mood READ mood WRITE setMood NOTIFY metaDataChanged)
97 Q_PROPERTY(QVariant trackNumber READ trackNumber WRITE setTrackNumber NOTIFY metaDataChanged)
98 Q_PROPERTY(QVariant trackCount READ trackCount WRITE setTrackCount NOTIFY metaDataChanged)
99 Q_PROPERTY(QVariant coverArtUrlSmall READ coverArtUrlSmall WRITE setCoverArtUrlSmall NOTIFY metaDataChanged)
100 Q_PROPERTY(QVariant coverArtUrlLarge READ coverArtUrlLarge WRITE setCoverArtUrlLarge NOTIFY metaDataChanged)
101 Q_PROPERTY(QVariant resolution READ resolution WRITE setResolution NOTIFY metaDataChanged)
102 Q_PROPERTY(QVariant pixelAspectRatio READ pixelAspectRatio WRITE setPixelAspectRatio NOTIFY metaDataChanged)
103 Q_PROPERTY(QVariant videoFrameRate READ videoFrameRate WRITE setVideoFrameRate NOTIFY metaDataChanged)
104 Q_PROPERTY(QVariant videoBitRate READ videoBitRate WRITE setVideoBitRate NOTIFY metaDataChanged)
105 Q_PROPERTY(QVariant videoCodec READ videoCodec WRITE setVideoCodec NOTIFY metaDataChanged)
106 Q_PROPERTY(QVariant posterUrl READ posterUrl WRITE setPosterUrl NOTIFY metaDataChanged)
107 Q_PROPERTY(QVariant chapterNumber READ chapterNumber WRITE setChapterNumber NOTIFY metaDataChanged)
108 Q_PROPERTY(QVariant director READ director WRITE setDirector NOTIFY metaDataChanged)
109 Q_PROPERTY(QVariant leadPerformer READ leadPerformer WRITE setLeadPerformer NOTIFY metaDataChanged)
110 Q_PROPERTY(QVariant writer READ writer WRITE setWriter NOTIFY metaDataChanged)
111
112 Q_PROPERTY(QVariant cameraManufacturer READ cameraManufacturer WRITE setCameraManufacturer NOTIFY metaDataChanged)
113 Q_PROPERTY(QVariant cameraModel READ cameraModel WRITE setCameraModel NOTIFY metaDataChanged)
114 Q_PROPERTY(QVariant event READ event WRITE setEvent NOTIFY metaDataChanged)
115 Q_PROPERTY(QVariant subject READ subject WRITE setSubject NOTIFY metaDataChanged)
116 Q_PROPERTY(QVariant orientation READ orientation WRITE setOrientation NOTIFY metaDataChanged)
117 Q_PROPERTY(QVariant exposureTime READ exposureTime WRITE setExposureTime NOTIFY metaDataChanged)
118 Q_PROPERTY(QVariant fNumber READ fNumber WRITE setFNumber NOTIFY metaDataChanged)
119 Q_PROPERTY(QVariant exposureProgram READ exposureProgram WRITE setExposureProgram NOTIFY metaDataChanged)
120 Q_PROPERTY(QVariant isoSpeedRatings READ isoSpeedRatings WRITE setISOSpeedRatings NOTIFY metaDataChanged)
121 Q_PROPERTY(QVariant exposureBiasValue READ exposureBiasValue WRITE setExposureBiasValue NOTIFY metaDataChanged)
122 Q_PROPERTY(QVariant dateTimeOriginal READ dateTimeOriginal WRITE setDateTimeOriginal NOTIFY metaDataChanged)
123 Q_PROPERTY(QVariant dateTimeDigitized READ dateTimeDigitized WRITE setDateTimeDigitized NOTIFY metaDataChanged)
124 Q_PROPERTY(QVariant subjectDistance READ subjectDistance WRITE setSubjectDistance NOTIFY metaDataChanged)
125 Q_PROPERTY(QVariant meteringMode READ meteringMode WRITE setMeteringMode NOTIFY metaDataChanged)
126 Q_PROPERTY(QVariant lightSource READ lightSource WRITE setLightSource NOTIFY metaDataChanged)
127 Q_PROPERTY(QVariant flash READ flash WRITE setFlash NOTIFY metaDataChanged)
128 Q_PROPERTY(QVariant focalLength READ focalLength WRITE setFocalLength NOTIFY metaDataChanged)
129 Q_PROPERTY(QVariant exposureMode READ exposureMode WRITE setExposureMode NOTIFY metaDataChanged)
130 Q_PROPERTY(QVariant whiteBalance READ whiteBalance WRITE setWhiteBalance NOTIFY metaDataChanged)
131 Q_PROPERTY(QVariant digitalZoomRatio READ digitalZoomRatio WRITE setDigitalZoomRatio NOTIFY metaDataChanged)
132 Q_PROPERTY(QVariant focalLengthIn35mmFilm READ focalLengthIn35mmFilm WRITE setFocalLengthIn35mmFilm NOTIFY metaDataChanged)
133 Q_PROPERTY(QVariant sceneCaptureType READ sceneCaptureType WRITE setSceneCaptureType NOTIFY metaDataChanged)
134 Q_PROPERTY(QVariant gainControl READ gainControl WRITE setGainControl NOTIFY metaDataChanged)
135 Q_PROPERTY(QVariant contrast READ contrast WRITE setContrast NOTIFY metaDataChanged)
136 Q_PROPERTY(QVariant saturation READ saturation WRITE setSaturation NOTIFY metaDataChanged)
137 Q_PROPERTY(QVariant sharpness READ sharpness WRITE setSharpness NOTIFY metaDataChanged)
138 Q_PROPERTY(QVariant deviceSettingDescription READ deviceSettingDescription WRITE setDeviceSettingDescription NOTIFY metaDataChanged)
139
140 Q_PROPERTY(QVariant gpsLatitude READ gpsLatitude WRITE setGPSLatitude NOTIFY metaDataChanged)
141 Q_PROPERTY(QVariant gpsLongitude READ gpsLongitude WRITE setGPSLongitude NOTIFY metaDataChanged)
142 Q_PROPERTY(QVariant gpsAltitude READ gpsAltitude WRITE setGPSAltitude NOTIFY metaDataChanged)
143 Q_PROPERTY(QVariant gpsTimeStamp READ gpsTimeStamp WRITE setGPSTimeStamp NOTIFY metaDataChanged)
144 Q_PROPERTY(QVariant gpsSatellites READ gpsSatellites WRITE setGPSSatellites NOTIFY metaDataChanged)
145 Q_PROPERTY(QVariant gpsStatus READ gpsStatus WRITE setGPSStatus NOTIFY metaDataChanged)
146 Q_PROPERTY(QVariant gpsDOP READ gpsDOP WRITE setGPSDOP NOTIFY metaDataChanged)
147 Q_PROPERTY(QVariant gpsSpeed READ gpsSpeed WRITE setGPSSpeed NOTIFY metaDataChanged)
148 Q_PROPERTY(QVariant gpsTrack READ gpsTrack WRITE setGPSTrack NOTIFY metaDataChanged)
149 Q_PROPERTY(QVariant gpsTrackRef READ gpsTrackRef WRITE setGPSTrackRef NOTIFY metaDataChanged)
150 Q_PROPERTY(QVariant gpsImgDirection READ gpsImgDirection WRITE setGPSImgDirection NOTIFY metaDataChanged)
151 Q_PROPERTY(QVariant gpsImgDirectionRef READ gpsImgDirectionRef WRITE setGPSImgDirectionRef NOTIFY metaDataChanged)
152 Q_PROPERTY(QVariant gpsMapDatum READ gpsMapDatum WRITE setGPSMapDatum NOTIFY metaDataChanged)
153 Q_PROPERTY(QVariant gpsProcessingMethod READ gpsProcessingMethod WRITE setGPSProcessingMethod NOTIFY metaDataChanged)
154 Q_PROPERTY(QVariant gpsAreaInformation READ gpsAreaInformation WRITE setGPSAreaInformation NOTIFY metaDataChanged)
155
156public:
157 QDeclarativeMediaMetaData(QMediaObject *player, QObject *parent = 0)
158 : QObject(parent)
159 , m_mediaObject(player)
160 , m_writerControl(0)
161 , m_requestedWriterControl(false)
162 {
163 }
164
165 ~QDeclarativeMediaMetaData()
166 {
167 if (m_writerControl) {
168 if (QMediaService *service = m_mediaObject->service())
169 service->releaseControl(control: m_writerControl);
170 }
171 }
172
173 QVariant title() const { return m_mediaObject->metaData(key: QMediaMetaData::Title); }
174 void setTitle(const QVariant &title) { setMetaData(key: QMediaMetaData::Title, value: title); }
175 QVariant subTitle() const { return m_mediaObject->metaData(key: QMediaMetaData::SubTitle); }
176 void setSubTitle(const QVariant &title) {
177 setMetaData(key: QMediaMetaData::SubTitle, value: title); }
178 QVariant author() const { return m_mediaObject->metaData(key: QMediaMetaData::Author); }
179 void setAuthor(const QVariant &author) { setMetaData(key: QMediaMetaData::Author, value: author); }
180 QVariant comment() const { return m_mediaObject->metaData(key: QMediaMetaData::Comment); }
181 void setComment(const QVariant &comment) { setMetaData(key: QMediaMetaData::Comment, value: comment); }
182 QVariant description() const { return m_mediaObject->metaData(key: QMediaMetaData::Description); }
183 void setDescription(const QVariant &description) {
184 setMetaData(key: QMediaMetaData::Description, value: description); }
185 QVariant category() const { return m_mediaObject->metaData(key: QMediaMetaData::Category); }
186 void setCategory(const QVariant &category) { setMetaData(key: QMediaMetaData::Category, value: category); }
187 QVariant genre() const { return m_mediaObject->metaData(key: QMediaMetaData::Genre); }
188 void setGenre(const QVariant &genre) { setMetaData(key: QMediaMetaData::Genre, value: genre); }
189 QVariant year() const { return m_mediaObject->metaData(key: QMediaMetaData::Year); }
190 void setYear(const QVariant &year) { setMetaData(key: QMediaMetaData::Year, value: year); }
191 QVariant date() const { return m_mediaObject->metaData(key: QMediaMetaData::Date); }
192 void setDate(const QVariant &date) { setMetaData(key: QMediaMetaData::Date, value: date); }
193 QVariant userRating() const { return m_mediaObject->metaData(key: QMediaMetaData::UserRating); }
194 void setUserRating(const QVariant &rating) { setMetaData(key: QMediaMetaData::UserRating, value: rating); }
195 QVariant keywords() const { return m_mediaObject->metaData(key: QMediaMetaData::Keywords); }
196 void setKeywords(const QVariant &keywords) { setMetaData(key: QMediaMetaData::Keywords, value: keywords); }
197 QVariant language() const { return m_mediaObject->metaData(key: QMediaMetaData::Language); }
198 void setLanguage(const QVariant &language) { setMetaData(key: QMediaMetaData::Language, value: language); }
199 QVariant publisher() const { return m_mediaObject->metaData(key: QMediaMetaData::Publisher); }
200 void setPublisher(const QVariant &publisher) {
201 setMetaData(key: QMediaMetaData::Publisher, value: publisher); }
202 QVariant copyright() const { return m_mediaObject->metaData(key: QMediaMetaData::Copyright); }
203 void setCopyright(const QVariant &copyright) {
204 setMetaData(key: QMediaMetaData::Copyright, value: copyright); }
205 QVariant parentalRating() const { return m_mediaObject->metaData(key: QMediaMetaData::ParentalRating); }
206 void setParentalRating(const QVariant &rating) {
207 setMetaData(key: QMediaMetaData::ParentalRating, value: rating); }
208 QVariant ratingOrganization() const {
209 return m_mediaObject->metaData(key: QMediaMetaData::RatingOrganization); }
210 void setRatingOrganization(const QVariant &organization) {
211 setMetaData(key: QMediaMetaData::RatingOrganization, value: organization); }
212 QVariant size() const { return m_mediaObject->metaData(key: QMediaMetaData::Size); }
213 void setSize(const QVariant &size) { setMetaData(key: QMediaMetaData::Size, value: size); }
214 QVariant mediaType() const { return m_mediaObject->metaData(key: QMediaMetaData::MediaType); }
215 void setMediaType(const QVariant &type) { setMetaData(key: QMediaMetaData::MediaType, value: type); }
216 QVariant duration() const { return m_mediaObject->metaData(key: QMediaMetaData::Duration); }
217 void setDuration(const QVariant &duration) { setMetaData(key: QMediaMetaData::Duration, value: duration); }
218 QVariant audioBitRate() const { return m_mediaObject->metaData(key: QMediaMetaData::AudioBitRate); }
219 void setAudioBitRate(const QVariant &rate) { setMetaData(key: QMediaMetaData::AudioBitRate, value: rate); }
220 QVariant audioCodec() const { return m_mediaObject->metaData(key: QMediaMetaData::AudioCodec); }
221 void setAudioCodec(const QVariant &codec) { setMetaData(key: QMediaMetaData::AudioCodec, value: codec); }
222 QVariant averageLevel() const { return m_mediaObject->metaData(key: QMediaMetaData::AverageLevel); }
223 void setAverageLevel(const QVariant &level) {
224 setMetaData(key: QMediaMetaData::AverageLevel, value: level); }
225 QVariant channelCount() const { return m_mediaObject->metaData(key: QMediaMetaData::ChannelCount); }
226 void setChannelCount(const QVariant &count) {
227 setMetaData(key: QMediaMetaData::ChannelCount, value: count); }
228 QVariant peakValue() const { return m_mediaObject->metaData(key: QMediaMetaData::PeakValue); }
229 void setPeakValue(const QVariant &value) { setMetaData(key: QMediaMetaData::PeakValue, value); }
230 QVariant sampleRate() const { return m_mediaObject->metaData(key: QMediaMetaData::SampleRate); }
231 void setSampleRate(const QVariant &rate) { setMetaData(key: QMediaMetaData::SampleRate, value: rate); }
232 QVariant albumTitle() const { return m_mediaObject->metaData(key: QMediaMetaData::AlbumTitle); }
233 void setAlbumTitle(const QVariant &title) { setMetaData(key: QMediaMetaData::AlbumTitle, value: title); }
234 QVariant albumArtist() const { return m_mediaObject->metaData(key: QMediaMetaData::AlbumArtist); }
235 void setAlbumArtist(const QVariant &artist) {
236 setMetaData(key: QMediaMetaData::AlbumArtist, value: artist); }
237 QVariant contributingArtist() const {
238 return m_mediaObject->metaData(key: QMediaMetaData::ContributingArtist); }
239 void setContributingArtist(const QVariant &artist) {
240 setMetaData(key: QMediaMetaData::ContributingArtist, value: artist); }
241 QVariant composer() const { return m_mediaObject->metaData(key: QMediaMetaData::Composer); }
242 void setComposer(const QVariant &composer) { setMetaData(key: QMediaMetaData::Composer, value: composer); }
243 QVariant conductor() const { return m_mediaObject->metaData(key: QMediaMetaData::Conductor); }
244 void setConductor(const QVariant &conductor) {
245 setMetaData(key: QMediaMetaData::Conductor, value: conductor); }
246 QVariant lyrics() const { return m_mediaObject->metaData(key: QMediaMetaData::Lyrics); }
247 void setLyrics(const QVariant &lyrics) { setMetaData(key: QMediaMetaData::Lyrics, value: lyrics); }
248 QVariant mood() const { return m_mediaObject->metaData(key: QMediaMetaData::Mood); }
249 void setMood(const QVariant &mood) { setMetaData(key: QMediaMetaData::Mood, value: mood); }
250 QVariant trackNumber() const { return m_mediaObject->metaData(key: QMediaMetaData::TrackNumber); }
251 void setTrackNumber(const QVariant &track) { setMetaData(key: QMediaMetaData::TrackNumber, value: track); }
252 QVariant trackCount() const { return m_mediaObject->metaData(key: QMediaMetaData::TrackCount); }
253 void setTrackCount(const QVariant &count) { setMetaData(key: QMediaMetaData::TrackCount, value: count); }
254 QVariant coverArtUrlSmall() const {
255 return m_mediaObject->metaData(key: QMediaMetaData::CoverArtUrlSmall); }
256 void setCoverArtUrlSmall(const QVariant &url) {
257 setMetaData(key: QMediaMetaData::CoverArtUrlSmall, value: url); }
258 QVariant coverArtUrlLarge() const {
259 return m_mediaObject->metaData(key: QMediaMetaData::CoverArtUrlLarge); }
260 void setCoverArtUrlLarge(const QVariant &url) {
261 setMetaData(key: QMediaMetaData::CoverArtUrlLarge, value: url); }
262 QVariant resolution() const { return m_mediaObject->metaData(key: QMediaMetaData::Resolution); }
263 void setResolution(const QVariant &resolution) {
264 setMetaData(key: QMediaMetaData::Resolution, value: resolution); }
265 QVariant pixelAspectRatio() const {
266 return m_mediaObject->metaData(key: QMediaMetaData::PixelAspectRatio); }
267 void setPixelAspectRatio(const QVariant &ratio) {
268 setMetaData(key: QMediaMetaData::PixelAspectRatio, value: ratio); }
269 QVariant videoFrameRate() const { return m_mediaObject->metaData(key: QMediaMetaData::VideoFrameRate); }
270 void setVideoFrameRate(const QVariant &rate) {
271 setMetaData(key: QMediaMetaData::VideoFrameRate, value: rate); }
272 QVariant videoBitRate() const { return m_mediaObject->metaData(key: QMediaMetaData::VideoBitRate); }
273 void setVideoBitRate(const QVariant &rate) {
274 setMetaData(key: QMediaMetaData::VideoBitRate, value: rate); }
275 QVariant videoCodec() const { return m_mediaObject->metaData(key: QMediaMetaData::VideoCodec); }
276 void setVideoCodec(const QVariant &codec) {
277 setMetaData(key: QMediaMetaData::VideoCodec, value: codec); }
278 QVariant posterUrl() const { return m_mediaObject->metaData(key: QMediaMetaData::PosterUrl); }
279 void setPosterUrl(const QVariant &url) {
280 setMetaData(key: QMediaMetaData::PosterUrl, value: url); }
281 QVariant chapterNumber() const { return m_mediaObject->metaData(key: QMediaMetaData::ChapterNumber); }
282 void setChapterNumber(const QVariant &chapter) {
283 setMetaData(key: QMediaMetaData::ChapterNumber, value: chapter); }
284 QVariant director() const { return m_mediaObject->metaData(key: QMediaMetaData::Director); }
285 void setDirector(const QVariant &director) { setMetaData(key: QMediaMetaData::Director, value: director); }
286 QVariant leadPerformer() const { return m_mediaObject->metaData(key: QMediaMetaData::LeadPerformer); }
287 void setLeadPerformer(const QVariant &performer) {
288 setMetaData(key: QMediaMetaData::LeadPerformer, value: performer); }
289 QVariant writer() const { return m_mediaObject->metaData(key: QMediaMetaData::Writer); }
290 void setWriter(const QVariant &writer) { setMetaData(key: QMediaMetaData::Writer, value: writer); }
291
292 QVariant cameraManufacturer() const {
293 return m_mediaObject->metaData(key: QMediaMetaData::CameraManufacturer); }
294 void setCameraManufacturer(const QVariant &manufacturer) {
295 setMetaData(key: QMediaMetaData::CameraManufacturer, value: manufacturer); }
296 QVariant cameraModel() const { return m_mediaObject->metaData(key: QMediaMetaData::CameraModel); }
297 void setCameraModel(const QVariant &model) { setMetaData(key: QMediaMetaData::CameraModel, value: model); }
298
299QT_WARNING_PUSH
300QT_WARNING_DISABLE_GCC("-Woverloaded-virtual")
301QT_WARNING_DISABLE_CLANG("-Woverloaded-virtual")
302 QVariant event() const { return m_mediaObject->metaData(key: QMediaMetaData::Event); }
303QT_WARNING_POP
304
305 void setEvent(const QVariant &event) { setMetaData(key: QMediaMetaData::Event, value: event); }
306 QVariant subject() const { return m_mediaObject->metaData(key: QMediaMetaData::Subject); }
307 void setSubject(const QVariant &subject) { setMetaData(key: QMediaMetaData::Subject, value: subject); }
308 QVariant orientation() const { return m_mediaObject->metaData(key: QMediaMetaData::Orientation); }
309 void setOrientation(const QVariant &orientation) {
310 setMetaData(key: QMediaMetaData::Orientation, value: orientation); }
311 QVariant exposureTime() const { return m_mediaObject->metaData(key: QMediaMetaData::ExposureTime); }
312 void setExposureTime(const QVariant &time) { setMetaData(key: QMediaMetaData::ExposureTime, value: time); }
313 QVariant fNumber() const { return m_mediaObject->metaData(key: QMediaMetaData::FNumber); }
314 void setFNumber(const QVariant &number) { setMetaData(key: QMediaMetaData::FNumber, value: number); }
315 QVariant exposureProgram() const {
316 return m_mediaObject->metaData(key: QMediaMetaData::ExposureProgram); }
317 void setExposureProgram(const QVariant &program) {
318 setMetaData(key: QMediaMetaData::ExposureProgram, value: program); }
319 QVariant isoSpeedRatings() const {
320 return m_mediaObject->metaData(key: QMediaMetaData::ISOSpeedRatings); }
321 void setISOSpeedRatings(const QVariant &ratings) {
322 setMetaData(key: QMediaMetaData::ISOSpeedRatings, value: ratings); }
323 QVariant exposureBiasValue() const {
324 return m_mediaObject->metaData(key: QMediaMetaData::ExposureBiasValue); }
325 void setExposureBiasValue(const QVariant &bias) {
326 setMetaData(key: QMediaMetaData::ExposureBiasValue, value: bias); }
327 QVariant dateTimeOriginal() const {
328 return m_mediaObject->metaData(key: QMediaMetaData::DateTimeOriginal); }
329 void setDateTimeOriginal(const QVariant &dateTime) {
330 setMetaData(key: QMediaMetaData::DateTimeOriginal, value: dateTime); }
331 QVariant dateTimeDigitized() const {
332 return m_mediaObject->metaData(key: QMediaMetaData::DateTimeDigitized); }
333 void setDateTimeDigitized(const QVariant &dateTime) {
334 setMetaData(key: QMediaMetaData::DateTimeDigitized, value: dateTime); }
335 QVariant subjectDistance() const {
336 return m_mediaObject->metaData(key: QMediaMetaData::SubjectDistance); }
337 void setSubjectDistance(const QVariant &distance) {
338 setMetaData(key: QMediaMetaData::SubjectDistance, value: distance); }
339 QVariant meteringMode() const { return m_mediaObject->metaData(key: QMediaMetaData::MeteringMode); }
340 void setMeteringMode(const QVariant &mode) { setMetaData(key: QMediaMetaData::MeteringMode, value: mode); }
341 QVariant lightSource() const { return m_mediaObject->metaData(key: QMediaMetaData::LightSource); }
342 void setLightSource(const QVariant &source) {
343 setMetaData(key: QMediaMetaData::LightSource, value: source); }
344 QVariant flash() const { return m_mediaObject->metaData(key: QMediaMetaData::Flash); }
345 void setFlash(const QVariant &flash) { setMetaData(key: QMediaMetaData::Flash, value: flash); }
346 QVariant focalLength() const { return m_mediaObject->metaData(key: QMediaMetaData::FocalLength); }
347 void setFocalLength(const QVariant &length) {
348 setMetaData(key: QMediaMetaData::FocalLength, value: length); }
349 QVariant exposureMode() const { return m_mediaObject->metaData(key: QMediaMetaData::ExposureMode); }
350 void setExposureMode(const QVariant &mode) {
351 setMetaData(key: QMediaMetaData::ExposureMode, value: mode); }
352 QVariant whiteBalance() const { return m_mediaObject->metaData(key: QMediaMetaData::WhiteBalance); }
353 void setWhiteBalance(const QVariant &balance) {
354 setMetaData(key: QMediaMetaData::WhiteBalance, value: balance); }
355 QVariant digitalZoomRatio() const {
356 return m_mediaObject->metaData(key: QMediaMetaData::DigitalZoomRatio); }
357 void setDigitalZoomRatio(const QVariant &ratio) {
358 setMetaData(key: QMediaMetaData::DigitalZoomRatio, value: ratio); }
359 QVariant focalLengthIn35mmFilm() const {
360 return m_mediaObject->metaData(key: QMediaMetaData::FocalLengthIn35mmFilm); }
361 void setFocalLengthIn35mmFilm(const QVariant &length) {
362 setMetaData(key: QMediaMetaData::FocalLengthIn35mmFilm, value: length); }
363 QVariant sceneCaptureType() const {
364 return m_mediaObject->metaData(key: QMediaMetaData::SceneCaptureType); }
365 void setSceneCaptureType(const QVariant &type) {
366 setMetaData(key: QMediaMetaData::SceneCaptureType, value: type); }
367 QVariant gainControl() const { return m_mediaObject->metaData(key: QMediaMetaData::GainControl); }
368 void setGainControl(const QVariant &gain) { setMetaData(key: QMediaMetaData::GainControl, value: gain); }
369 QVariant contrast() const { return m_mediaObject->metaData(key: QMediaMetaData::Contrast); }
370 void setContrast(const QVariant &contrast) { setMetaData(key: QMediaMetaData::Contrast, value: contrast); }
371 QVariant saturation() const { return m_mediaObject->metaData(key: QMediaMetaData::Saturation); }
372 void setSaturation(const QVariant &saturation) {
373 setMetaData(key: QMediaMetaData::Saturation, value: saturation); }
374 QVariant sharpness() const { return m_mediaObject->metaData(key: QMediaMetaData::Sharpness); }
375 void setSharpness(const QVariant &sharpness) {
376 setMetaData(key: QMediaMetaData::Sharpness, value: sharpness); }
377 QVariant deviceSettingDescription() const {
378 return m_mediaObject->metaData(key: QMediaMetaData::DeviceSettingDescription); }
379 void setDeviceSettingDescription(const QVariant &description) {
380 setMetaData(key: QMediaMetaData::DeviceSettingDescription, value: description); }
381
382 QVariant gpsLatitude() const { return m_mediaObject->metaData(key: QMediaMetaData::GPSLatitude); }
383 void setGPSLatitude(const QVariant &latitude) {
384 setMetaData(key: QMediaMetaData::GPSLatitude, value: latitude); }
385 QVariant gpsLongitude() const { return m_mediaObject->metaData(key: QMediaMetaData::GPSLongitude); }
386 void setGPSLongitude(const QVariant &longitude) {
387 setMetaData(key: QMediaMetaData::GPSLongitude, value: longitude); }
388 QVariant gpsAltitude() const { return m_mediaObject->metaData(key: QMediaMetaData::GPSAltitude); }
389 void setGPSAltitude(const QVariant &altitude) {
390 setMetaData(key: QMediaMetaData::GPSAltitude, value: altitude); }
391 QVariant gpsTimeStamp() const { return m_mediaObject->metaData(key: QMediaMetaData::GPSTimeStamp); }
392 void setGPSTimeStamp(const QVariant &timestamp) {
393 setMetaData(key: QMediaMetaData::GPSTimeStamp, value: timestamp); }
394 QVariant gpsSatellites() const {
395 return m_mediaObject->metaData(key: QMediaMetaData::GPSSatellites); }
396 void setGPSSatellites(const QVariant &satellites) {
397 setMetaData(key: QMediaMetaData::GPSSatellites, value: satellites); }
398 QVariant gpsStatus() const { return m_mediaObject->metaData(key: QMediaMetaData::GPSStatus); }
399 void setGPSStatus(const QVariant &status) { setMetaData(key: QMediaMetaData::GPSStatus, value: status); }
400 QVariant gpsDOP() const { return m_mediaObject->metaData(key: QMediaMetaData::GPSDOP); }
401 void setGPSDOP(const QVariant &dop) { setMetaData(key: QMediaMetaData::GPSDOP, value: dop); }
402 QVariant gpsSpeed() const { return m_mediaObject->metaData(key: QMediaMetaData::GPSSpeed); }
403 void setGPSSpeed(const QVariant &speed) { setMetaData(key: QMediaMetaData::GPSSpeed, value: speed); }
404 QVariant gpsTrack() const { return m_mediaObject->metaData(key: QMediaMetaData::GPSTrack); }
405 void setGPSTrack(const QVariant &track) { setMetaData(key: QMediaMetaData::GPSTrack, value: track); }
406 QVariant gpsTrackRef() const { return m_mediaObject->metaData(key: QMediaMetaData::GPSTrackRef); }
407 void setGPSTrackRef(const QVariant &ref) { setMetaData(key: QMediaMetaData::GPSTrackRef, value: ref); }
408 QVariant gpsImgDirection() const {
409 return m_mediaObject->metaData(key: QMediaMetaData::GPSImgDirection); }
410 void setGPSImgDirection(const QVariant &direction) {
411 setMetaData(key: QMediaMetaData::GPSImgDirection, value: direction); }
412 QVariant gpsImgDirectionRef() const {
413 return m_mediaObject->metaData(key: QMediaMetaData::GPSImgDirectionRef); }
414 void setGPSImgDirectionRef(const QVariant &ref) {
415 setMetaData(key: QMediaMetaData::GPSImgDirectionRef, value: ref); }
416 QVariant gpsMapDatum() const { return m_mediaObject->metaData(key: QMediaMetaData::GPSMapDatum); }
417 void setGPSMapDatum(const QVariant &datum) {
418 setMetaData(key: QMediaMetaData::GPSMapDatum, value: datum); }
419 QVariant gpsProcessingMethod() const {
420 return m_mediaObject->metaData(key: QMediaMetaData::GPSProcessingMethod); }
421 void setGPSProcessingMethod(const QVariant &method) {
422 setMetaData(key: QMediaMetaData::GPSProcessingMethod, value: method); }
423 QVariant gpsAreaInformation() const {
424 return m_mediaObject->metaData(key: QMediaMetaData::GPSAreaInformation); }
425 void setGPSAreaInformation(const QVariant &information) {
426 setMetaData(key: QMediaMetaData::GPSAreaInformation, value: information); }
427
428Q_SIGNALS:
429 void metaDataChanged();
430
431private:
432 void setMetaData(const QString &key, const QVariant &value)
433 {
434 if (!m_requestedWriterControl) {
435 m_requestedWriterControl = true;
436 if (QMediaService *service = m_mediaObject->service())
437 m_writerControl = service->requestControl<QMetaDataWriterControl *>();
438 }
439 if (m_writerControl)
440 m_writerControl->setMetaData(key, value);
441 }
442
443 QMediaObject *m_mediaObject;
444 QMetaDataWriterControl *m_writerControl;
445 bool m_requestedWriterControl;
446};
447
448QT_END_NAMESPACE
449
450QML_DECLARE_TYPE(QT_PREPEND_NAMESPACE(QDeclarativeMediaMetaData))
451
452#endif
453

source code of qtmultimedia/src/imports/multimedia/qdeclarativemediametadata_p.h