QtGStreamer 1.2.0
Loading...
Searching...
No Matches
taglist.h
1/*
2 Copyright (C) 2010 Collabora Multimedia.
3 @author Mauricio Piacentini <mauricio.piacentini@collabora.co.uk>
4
5 This library is free software; you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published
7 by the Free Software Foundation; either version 2.1 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18#ifndef QGST_TAGLIST_H
19#define QGST_TAGLIST_H
20
21#include "global.h"
22#include "../QGlib/type.h"
23#include "../QGlib/value.h"
24#include <QtCore/QString>
25
26class QDate;
27class QDateTime;
28
29namespace QGst {
30
70class QTGSTREAMER_EXPORT TagList
71{
72public:
73 TagList();
74 TagList(const GstTagList *taglist);
75 TagList(const TagList & other);
76 virtual ~TagList();
77
78 TagList & operator=(const TagList & other);
79
80 bool isEmpty() const;
81
82 void insert(const TagList & other, TagMergeMode mode = TagMergeAppend);
83 static TagList merge(const TagList & firstList, const TagList & secondList,
84 TagMergeMode mode = TagMergeAppend);
85
86 QGlib::Value tagValue(const char *tag, int index = 0) const;
87 void setTagValue(const char *tag, const QGlib::Value & value,
88 TagMergeMode mode = TagMergeReplaceAll);
89 int tagValueCount(const char *tag) const;
90
91 void clear();
92 void removeTag(const char *tag);
93
94 operator GstTagList*();
95 operator const GstTagList*() const;
96
97 //Begin helpers
98
99 QString title(int index = 0) const;
100 void setTitle(const QString & value, TagMergeMode mode = TagMergeReplaceAll);
101 int titleCount() const;
102
103 QString titleSortName() const;
104 void setTitleSortName(const QString & value);
105
106 QString artist(int index = 0) const;
107 void setArtist(const QString & value, TagMergeMode mode = TagMergeReplaceAll);
108 int artistCount() const;
109
110 QString artistSortName() const;
111 void setArtistSortName(const QString & value);
112
113 QString composer(int index = 0) const;
114 void setComposer(const QString & value, TagMergeMode mode = TagMergeReplaceAll);
115 int composerCount() const;
116
117 QDate date() const;
118 void setDate(const QDate & value);
119
120 QString genre(int index = 0) const;
121 void setGenre(const QString & value, TagMergeMode mode = TagMergeReplaceAll);
122 int genreCount() const;
123
124 QString comment(int index = 0) const;
125 void setComment(const QString & value, TagMergeMode mode = TagMergeReplaceAll);
126 int commentCount() const;
127
128 QString extendedComment(int index = 0) const;
129 void setExtendedComment(const QString & value, TagMergeMode mode = TagMergeReplaceAll);;
130 int extendedCommentCount() const;
131
132 quint32 trackNumber() const;
133 void setTrackNumber(quint32 value);
134
135 quint32 trackCount() const;
136 void setTrackCount(quint32 value);
137
138 quint32 albumVolumeNumber() const;
139 void setAlbumVolumeNumber(quint32 value);
140
141 quint32 albumVolumeCount() const;
142 void setAlbumVolumeCount(quint32 value);
143
144 QString location(int index = 0) const;
145 void setLocation(const QString & value, TagMergeMode mode = TagMergeReplaceAll);
146 int locationCount() const;
147
148 QString homepage(int index = 0) const;
149 void setHomepage(const QString & value, TagMergeMode mode = TagMergeReplaceAll);
150 int homepageCount() const;
151
152 QString description(int index = 0) const;
153 void setDescription(const QString & value, TagMergeMode mode = TagMergeReplaceAll);
154 int descriptionCount() const;
155
156 QString version() const;
157 void setVersion(const QString & value);
158
159 QString isrc() const;
160 void setIsrc(const QString & value);
161
162 QString organization(int index = 0) const;
163 void setOrganization(const QString & value, TagMergeMode mode = TagMergeReplaceAll);
164 int organizationCount() const;
165
166 QString copyright() const;
167 void setCopyright(const QString & value);
168
169 QString copyrightUri() const;
170 void setCopyrightUri(const QString & value);
171
172 QString contact(int index = 0) const;
173 void setContact(const QString & value, TagMergeMode mode = TagMergeReplaceAll);
174 int contactCount() const;
175
176 QString license() const;
177 void setLicense(const QString & value);
178
179 QString licenseUri() const;
180 void setLicenseUri(const QString & value);
181
182 QString performer(int index = 0) const;
183 void setPerformer(const QString & value, TagMergeMode mode = TagMergeReplaceAll);
184 int performerCount() const;
185
186 quint64 duration() const;
187 void setDuration(quint64 value);
188
189 QString codec() const;
190 void setCodec(const QString & value);
191
192 QString videoCodec() const;
193 void setVideoCodec(const QString & value);
194
195 QString audioCodec() const;
196 void setAudioCodec(const QString & value);
197
198 QString subtitleCodec() const;
199 void setSubtitleCodec(const QString & value);
200
201 QString containerFormat() const;
202 void setContainerFormat(const QString & value);
203
204 quint32 bitrate() const;
205 void setBitrate(quint32 value);
206
207 quint32 nominalBitrate() const;
208 void setNominalBitrate(quint32 value);
209
210 quint32 minimumBitrate() const;
211 void setMinimumBitrate(quint32 value);
212
213 quint32 maximumBitrate() const;
214 void setMaximumBitrate(quint32 value);
215
216 quint32 serial() const;
217 void setSerial(quint32 value);
218
219 QString encoder() const;
220 void setEncoder(const QString & value);
221
222 quint32 encoderVersion() const;
223 void setEncoderVersion(quint32 value);
224
225 double trackGain() const;
226 void setTrackGain(double value);
227
228 double trackPeak() const;
229 void setTrackPeak(double value);
230
231 double albumGain() const;
232 void setAlbumGain(double value);
233
234 double albumPeak() const;
235 void setAlbumPeak(double value);
236
237 double referenceLevel() const;
238 void setReferenceLevel(double value);
239
240 QString languageCode() const;
241 void setLanguageCode(const QString & value);
242
243 SamplePtr image(int index = 0) const;
244 void setImage(const SamplePtr & value, TagMergeMode mode = TagMergeReplaceAll);
245 int imageCount() const;
246
247 SamplePtr previewImage() const;
248 void setPreviewImage(const SamplePtr & value);
249
250 SamplePtr attachment(int index = 0) const;
251 void setAttachment(const SamplePtr & value, TagMergeMode mode = TagMergeReplaceAll);
252 int attachmentCount() const;
253
254 double beatsPerMinute() const;
255 void setBeatsPerMinute(double value);
256
257 QString keywords(int index = 0) const;
258 void setKeywords(const QString & value, TagMergeMode mode = TagMergeReplaceAll);
259 int keywordsCount() const;
260
261 QString geoLocationName() const;
262 void seGeoLocationName(const QString & value);
263
264 double geoLocationLatitude() const;
265 void setGeoLocationLatitude(double value);
266
267 double geoLocationLongitude() const;
268 void setGeoLocationLongitude(double value);
269
270 double geoLocationElevation() const;
271 void setGeoLocationElevation(double value);
272
273 QString geoLocationCountry() const;
274 void setGeoLocationCountry(const QString & value);
275
276 QString geoLocationCity() const;
277 void setGeoLocationCity(const QString & value);
278
279 QString geoLocationSublocation() const;
280 void setGeoLocationSublocation(const QString & value);
281
282 double geoLocationMovementSpeed() const;
283 void setGeoLocationMovementSpeed(double value);
284
285 double geoLocationMovementDirection() const;
286 void setGeoLocationMovementDirection(double value);
287
288 double geoLocationCaptureDirection() const;
289 void setGeoLocationCaptureDirector(double value);
290
291 QString showName(int index = 0) const;
292 void setShowName(const QString & value, TagMergeMode mode = TagMergeReplaceAll);
293 int showNameCount() const;
294
295 QString showSortName() const;
296 void setShowSortName(const QString & value);
297
298 quint32 showEpisodeNumber() const;
299 void setShowEpisodeNumber(quint32 value);
300
301 quint32 showSeasonNumber() const;
302 void setShowSeasonNumber(quint32 value);
303
304 QString lyrics(int index = 0) const;
305 void setLyrics(const QString & value, TagMergeMode mode = TagMergeReplaceAll);
306 int lyricsCount() const;
307
308 QString composerSortName() const;
309 void setComposerSortName(const QString & value);
310
311 QString grouping() const;
312 void setGrouping(const QString & value);
313
314 quint32 userRating() const;
315 void setUserRating(quint32 value);
316
317 QString deviceManufacturer() const;
318 void setDeviceManufacturer(const QString & value);
319
320 QString deviceModel() const;
321 void setDeviceModel(const QString & value);
322
323 QString imageOrientation() const;
324 void setImageOrientation(const QString & value);
325
326 QString applicationName() const;
327 void setApplicationName(const QString & value);
328
329 SamplePtr applicationData() const;
330 void setApplicationData(const SamplePtr & value);
331
332 QDateTime dateTime() const;
333 void setDateTime(const QDateTime & value);
334
335 double geoLocationHorizontalError() const;
336 void setGeoLocationHorizontalError(double value);
337
338private:
339 struct Data;
340 QSharedDataPointer<Data> d;
341};
342
344QTGSTREAMER_EXPORT QDebug operator<<(QDebug debug, const TagList & taglist);
345
346} //namespace QGst
347
348QGST_REGISTER_TYPE(QGst::TagList)
349
350#endif
Smart pointer class for working with wrapper classes that support reference counting.
Definition refpointer.h:91
Wrapper class for GValue.
Definition value.h:77
Wrapper class for GstTagList.
Definition taglist.h:71
Wrappers for GStreamer classes.