QtGStreamer 0.10.1
|
00001 /* 00002 Copyright (C) 2010 Collabora Multimedia. 00003 @author Mauricio Piacentini <mauricio.piacentini@collabora.co.uk> 00004 00005 This library is free software; you can redistribute it and/or modify 00006 it under the terms of the GNU Lesser General Public License as published 00007 by the Free Software Foundation; either version 2.1 of the License, or 00008 (at your option) any later version. 00009 00010 This program is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 GNU General Public License for more details. 00014 00015 You should have received a copy of the GNU Lesser General Public License 00016 along with this program. If not, see <http://www.gnu.org/licenses/>. 00017 */ 00018 #ifndef QGST_TAGLIST_H 00019 #define QGST_TAGLIST_H 00020 00021 #include "global.h" 00022 #include "../QGlib/type.h" 00023 #include "../QGlib/value.h" 00024 #include <QtCore/QString> 00025 00026 class QDate; 00027 class QDateTime; 00028 00029 namespace QGst { 00030 00070 class QTGSTREAMER_EXPORT TagList 00071 { 00072 public: 00073 TagList(); 00074 TagList(const GstTagList *taglist); 00075 TagList(const TagList & other); 00076 virtual ~TagList(); 00077 00078 TagList & operator=(const TagList & other); 00079 00080 bool isEmpty() const; 00081 00082 void insert(const TagList & other, TagMergeMode mode = TagMergeAppend); 00083 static TagList merge(const TagList & firstList, const TagList & secondList, 00084 TagMergeMode mode = TagMergeAppend); 00085 00086 QGlib::Value tagValue(const char *tag, int index = 0) const; 00087 void setTagValue(const char *tag, const QGlib::Value & value, 00088 TagMergeMode mode = TagMergeReplaceAll); 00089 int tagValueCount(const char *tag) const; 00090 00091 void clear(); 00092 void removeTag(const char *tag); 00093 00094 operator GstTagList*(); 00095 operator const GstTagList*() const; 00096 00097 //Begin helpers 00098 00099 QString title(int index = 0) const; 00100 void setTitle(const QString & value, TagMergeMode mode = TagMergeReplaceAll); 00101 int titleCount() const; 00102 00103 QString titleSortName() const; 00104 void setTitleSortName(const QString & value); 00105 00106 QString artist(int index = 0) const; 00107 void setArtist(const QString & value, TagMergeMode mode = TagMergeReplaceAll); 00108 int artistCount() const; 00109 00110 QString artistSortName() const; 00111 void setArtistSortName(const QString & value); 00112 00113 QString composer(int index = 0) const; 00114 void setComposer(const QString & value, TagMergeMode mode = TagMergeReplaceAll); 00115 int composerCount() const; 00116 00117 QDate date() const; 00118 void setDate(const QDate & value); 00119 00120 QString genre(int index = 0) const; 00121 void setGenre(const QString & value, TagMergeMode mode = TagMergeReplaceAll); 00122 int genreCount() const; 00123 00124 QString comment(int index = 0) const; 00125 void setComment(const QString & value, TagMergeMode mode = TagMergeReplaceAll); 00126 int commentCount() const; 00127 00128 QString extendedComment(int index = 0) const; 00129 void setExtendedComment(const QString & value, TagMergeMode mode = TagMergeReplaceAll);; 00130 int extendedCommentCount() const; 00131 00132 quint32 trackNumber() const; 00133 void setTrackNumber(quint32 value); 00134 00135 quint32 trackCount() const; 00136 void setTrackCount(quint32 value); 00137 00138 quint32 albumVolumeNumber() const; 00139 void setAlbumVolumeNumber(quint32 value); 00140 00141 quint32 albumVolumeCount() const; 00142 void setAlbumVolumeCount(quint32 value); 00143 00144 QString location(int index = 0) const; 00145 void setLocation(const QString & value, TagMergeMode mode = TagMergeReplaceAll); 00146 int locationCount() const; 00147 00148 QString homepage(int index = 0) const; 00149 void setHomepage(const QString & value, TagMergeMode mode = TagMergeReplaceAll); 00150 int homepageCount() const; 00151 00152 QString description(int index = 0) const; 00153 void setDescription(const QString & value, TagMergeMode mode = TagMergeReplaceAll); 00154 int descriptionCount() const; 00155 00156 QString version() const; 00157 void setVersion(const QString & value); 00158 00159 QString isrc() const; 00160 void setIsrc(const QString & value); 00161 00162 QString organization(int index = 0) const; 00163 void setOrganization(const QString & value, TagMergeMode mode = TagMergeReplaceAll); 00164 int organizationCount() const; 00165 00166 QString copyright() const; 00167 void setCopyright(const QString & value); 00168 00169 QString copyrightUri() const; 00170 void setCopyrightUri(const QString & value); 00171 00172 QString contact(int index = 0) const; 00173 void setContact(const QString & value, TagMergeMode mode = TagMergeReplaceAll); 00174 int contactCount() const; 00175 00176 QString license() const; 00177 void setLicense(const QString & value); 00178 00179 QString licenseUri() const; 00180 void setLicenseUri(const QString & value); 00181 00182 QString performer(int index = 0) const; 00183 void setPerformer(const QString & value, TagMergeMode mode = TagMergeReplaceAll); 00184 int performerCount() const; 00185 00186 quint64 duration() const; 00187 void setDuration(quint64 value); 00188 00189 QString codec() const; 00190 void setCodec(const QString & value); 00191 00192 QString videoCodec() const; 00193 void setVideoCodec(const QString & value); 00194 00195 QString audioCodec() const; 00196 void setAudioCodec(const QString & value); 00197 00198 QString subtitleCodec() const; 00199 void setSubtitleCodec(const QString & value); 00200 00201 QString containerFormat() const; 00202 void setContainerFormat(const QString & value); 00203 00204 quint32 bitrate() const; 00205 void setBitrate(quint32 value); 00206 00207 quint32 nominalBitrate() const; 00208 void setNominalBitrate(quint32 value); 00209 00210 quint32 minimumBitrate() const; 00211 void setMinimumBitrate(quint32 value); 00212 00213 quint32 maximumBitrate() const; 00214 void setMaximumBitrate(quint32 value); 00215 00216 quint32 serial() const; 00217 void setSerial(quint32 value); 00218 00219 QString encoder() const; 00220 void setEncoder(const QString & value); 00221 00222 quint32 encoderVersion() const; 00223 void setEncoderVersion(quint32 value); 00224 00225 double trackGain() const; 00226 void setTrackGain(double value); 00227 00228 double trackPeak() const; 00229 void setTrackPeak(double value); 00230 00231 double albumGain() const; 00232 void setAlbumGain(double value); 00233 00234 double albumPeak() const; 00235 void setAlbumPeak(double value); 00236 00237 double referenceLevel() const; 00238 void setReferenceLevel(double value); 00239 00240 QString languageCode() const; 00241 void setLanguageCode(const QString & value); 00242 00243 BufferPtr image(int index = 0) const; 00244 void setImage(const BufferPtr & value, TagMergeMode mode = TagMergeReplaceAll); 00245 int imageCount() const; 00246 00247 BufferPtr previewImage() const; 00248 void setPreviewImage(const BufferPtr & value); 00249 00250 BufferPtr attachment(int index = 0) const; 00251 void setAttachment(const BufferPtr & value, TagMergeMode mode = TagMergeReplaceAll); 00252 int attachmentCount() const; 00253 00254 double beatsPerMinute() const; 00255 void setBeatsPerMinute(double value); 00256 00257 QString keywords(int index = 0) const; 00258 void setKeywords(const QString & value, TagMergeMode mode = TagMergeReplaceAll); 00259 int keywordsCount() const; 00260 00261 QString geoLocationName() const; 00262 void seGeoLocationName(const QString & value); 00263 00264 double geoLocationLatitude() const; 00265 void setGeoLocationLatitude(double value); 00266 00267 double geoLocationLongitude() const; 00268 void setGeoLocationLongitude(double value); 00269 00270 double geoLocationElevation() const; 00271 void setGeoLocationElevation(double value); 00272 00273 QString geoLocationCountry() const; 00274 void setGeoLocationCountry(const QString & value); 00275 00276 QString geoLocationCity() const; 00277 void setGeoLocationCity(const QString & value); 00278 00279 QString geoLocationSublocation() const; 00280 void setGeoLocationSublocation(const QString & value); 00281 00282 double geoLocationMovementSpeed() const; 00283 void setGeoLocationMovementSpeed(double value); 00284 00285 double geoLocationMovementDirection() const; 00286 void setGeoLocationMovementDirection(double value); 00287 00288 double geoLocationCaptureDirection() const; 00289 void setGeoLocationCaptureDirector(double value); 00290 00291 QString showName(int index = 0) const; 00292 void setShowName(const QString & value, TagMergeMode mode = TagMergeReplaceAll); 00293 int showNameCount() const; 00294 00295 QString showSortName() const; 00296 void setShowSortName(const QString & value); 00297 00298 quint32 showEpisodeNumber() const; 00299 void setShowEpisodeNumber(quint32 value); 00300 00301 quint32 showSeasonNumber() const; 00302 void setShowSeasonNumber(quint32 value); 00303 00304 QString lyrics(int index = 0) const; 00305 void setLyrics(const QString & value, TagMergeMode mode = TagMergeReplaceAll); 00306 int lyricsCount() const; 00307 00308 QString composerSortName() const; 00309 void setComposerSortName(const QString & value); 00310 00311 QString grouping() const; 00312 void setGrouping(const QString & value); 00313 00314 quint32 userRating() const; 00315 void setUserRating(quint32 value); 00316 00317 QString deviceManufacturer() const; 00318 void setDeviceManufacturer(const QString & value); 00319 00320 QString deviceModel() const; 00321 void setDeviceModel(const QString & value); 00322 00323 QString imageOrientation() const; 00324 void setImageOrientation(const QString & value); 00325 00326 QString applicationName() const; 00327 void setApplicationName(const QString & value); 00328 00329 BufferPtr applicationData() const; 00330 void setApplicationData(const BufferPtr & value); 00331 00332 QDateTime dateTime() const; 00333 void setDateTime(const QDateTime & value); 00334 00335 double geoLocationHorizontalError() const; 00336 void setGeoLocationHorizontalError(double value); 00337 00338 private: 00339 struct Data; 00340 QSharedDataPointer<Data> d; 00341 }; 00342 00344 QTGSTREAMER_EXPORT QDebug operator<<(QDebug debug, const TagList & taglist); 00345 00346 } //namespace QGst 00347 00348 QGST_REGISTER_TYPE(QGst::TagList) 00349 00350 #endif