046618300064b00798426ecba4341270db074cbe
[platform/upstream/gstreamer.git] / gst / gsttaglist.h
1 /* GStreamer
2  * Copyright (C) 2003 Benjamin Otte <in7y118@public.uni-hamburg.de>
3  *
4  * gsttaglist.h: Header for tag support
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  */
21
22
23 #ifndef __GST_TAGLIST_H__
24 #define __GST_TAGLIST_H__
25
26 #include <gst/gstdatetime.h>
27 #include <gst/gstsample.h>
28 #include <gst/gstbuffer.h>
29 #include <gst/glib-compat.h>
30
31 G_BEGIN_DECLS
32
33 /**
34  * GstTagMergeMode:
35  * @GST_TAG_MERGE_UNDEFINED: undefined merge mode
36  * @GST_TAG_MERGE_REPLACE_ALL: replace all tags (clear list and append)
37  * @GST_TAG_MERGE_REPLACE: replace tags
38  * @GST_TAG_MERGE_APPEND: append tags
39  * @GST_TAG_MERGE_PREPEND: prepend tags
40  * @GST_TAG_MERGE_KEEP: keep existing tags
41  * @GST_TAG_MERGE_KEEP_ALL: keep all existing tags
42  * @GST_TAG_MERGE_COUNT: the number of merge modes
43  *
44  * The different tag merging modes are basically replace, overwrite and append,
45  * but they can be seen from two directions. Given two taglists: (A) the tags
46  * already in the element and (B) the ones that are supplied to the element (
47  * e.g. via gst_tag_setter_merge_tags() / gst_tag_setter_add_tags() or a
48  * %GST_EVENT_TAG), how are these tags merged?
49  * In the table below this is shown for the cases that a tag exists in the list
50  * (A) or does not exists (!A) and combinations thereof.
51  *
52  * <table frame="all" colsep="1" rowsep="1">
53  *   <title>merge mode</title>
54  *   <tgroup cols='5' align='left'>
55  *     <thead>
56  *       <row>
57  *         <entry>merge mode</entry>
58  *         <entry>A + B</entry>
59  *         <entry>A + !B</entry>
60  *         <entry>!A + B</entry>
61  *         <entry>!A + !B</entry>
62  *       </row>
63  *     </thead>
64  *     <tbody>
65  *       <row>
66  *         <entry>REPLACE_ALL</entry>
67  *         <entry>B</entry>
68  *         <entry>-</entry>
69  *         <entry>B</entry>
70  *         <entry>-</entry>
71  *       </row>
72  *       <row>
73  *         <entry>REPLACE</entry>
74  *         <entry>B</entry>
75  *         <entry>A</entry>
76  *         <entry>B</entry>
77  *         <entry>-</entry>
78  *       </row>
79  *       <row>
80  *         <entry>APPEND</entry>
81  *         <entry>A, B</entry>
82  *         <entry>A</entry>
83  *         <entry>B</entry>
84  *         <entry>-</entry>
85  *       </row>
86  *       <row>
87  *         <entry>PREPEND</entry>
88  *         <entry>B, A</entry>
89  *         <entry>A</entry>
90  *         <entry>B</entry>
91  *         <entry>-</entry>
92  *       </row>
93  *       <row>
94  *         <entry>KEEP</entry>
95  *         <entry>A</entry>
96  *         <entry>A</entry>
97  *         <entry>B</entry>
98  *         <entry>-</entry>
99  *       </row>
100  *       <row>
101  *         <entry>KEEP_ALL</entry>
102  *         <entry>A</entry>
103  *         <entry>A</entry>
104  *         <entry>-</entry>
105  *         <entry>-</entry>
106  *       </row>
107  *     </tbody>
108  *   </tgroup>
109  * </table>
110  */
111 typedef enum {
112   GST_TAG_MERGE_UNDEFINED,
113   GST_TAG_MERGE_REPLACE_ALL,
114   GST_TAG_MERGE_REPLACE,
115   GST_TAG_MERGE_APPEND,
116   GST_TAG_MERGE_PREPEND,
117   GST_TAG_MERGE_KEEP,
118   GST_TAG_MERGE_KEEP_ALL,
119   /* add more */
120   GST_TAG_MERGE_COUNT
121 } GstTagMergeMode;
122
123 #define GST_TAG_MODE_IS_VALID(mode)     (((mode) > GST_TAG_MERGE_UNDEFINED) && ((mode) < GST_TAG_MERGE_COUNT))
124
125 /**
126  * GstTagFlag:
127  * @GST_TAG_FLAG_UNDEFINED: undefined flag
128  * @GST_TAG_FLAG_META: tag is meta data
129  * @GST_TAG_FLAG_ENCODED: tag is encoded
130  * @GST_TAG_FLAG_DECODED: tag is decoded
131  * @GST_TAG_FLAG_COUNT: number of tag flags
132  *
133  * Extra tag flags used when registering tags.
134  */
135 /* FIXME: these are not really flags .. */
136 typedef enum {
137   GST_TAG_FLAG_UNDEFINED,
138   GST_TAG_FLAG_META,
139   GST_TAG_FLAG_ENCODED,
140   GST_TAG_FLAG_DECODED,
141   GST_TAG_FLAG_COUNT
142 } GstTagFlag;
143
144 #define GST_TAG_FLAG_IS_VALID(flag)     (((flag) > GST_TAG_FLAG_UNDEFINED) && ((flag) < GST_TAG_FLAG_COUNT))
145
146 /**
147  * GstTagList:
148  * @mini_object: the parent type
149  *
150  * Object describing tags / metadata.
151  */
152 typedef struct _GstTagList GstTagList;
153 struct _GstTagList {
154   GstMiniObject mini_object;
155 };
156
157 GST_API GType _gst_tag_list_type;
158
159 #define GST_TAG_LIST(x)       ((GstTagList *) (x))
160 #define GST_TYPE_TAG_LIST     (_gst_tag_list_type)
161 #define GST_IS_TAG_LIST(obj)  (GST_IS_MINI_OBJECT_TYPE((obj), GST_TYPE_TAG_LIST))
162
163 /**
164  * GstTagForeachFunc:
165  * @list: the #GstTagList
166  * @tag: a name of a tag in @list
167  * @user_data: user data
168  *
169  * A function that will be called in gst_tag_list_foreach(). The function may
170  * not modify the tag list.
171  */
172 typedef void (*GstTagForeachFunc) (const GstTagList * list,
173                                    const gchar      * tag,
174                                    gpointer           user_data);
175
176 /**
177  * GstTagMergeFunc:
178  * @dest: the destination #GValue
179  * @src: the source #GValue
180  *
181  * A function for merging multiple values of a tag used when registering
182  * tags.
183  */
184 typedef void (* GstTagMergeFunc) (GValue *dest, const GValue *src);
185
186 GST_API
187 GType        gst_tag_list_get_type (void);
188
189 /* tag registration */
190
191 GST_API
192 void         gst_tag_register      (const gchar     * name,
193                                     GstTagFlag        flag,
194                                     GType             type,
195                                     const gchar     * nick,
196                                     const gchar     * blurb,
197                                     GstTagMergeFunc   func);
198 GST_API
199 void         gst_tag_register_static (const gchar   * name,
200                                       GstTagFlag      flag,
201                                       GType           type,
202                                       const gchar   * nick,
203                                       const gchar   * blurb,
204                                       GstTagMergeFunc func);
205
206 /* some default merging functions */
207
208 GST_API
209 void      gst_tag_merge_use_first          (GValue * dest, const GValue * src);
210
211 GST_API
212 void      gst_tag_merge_strings_with_comma (GValue * dest, const GValue * src);
213
214 /* basic tag support */
215
216 GST_API
217 gboolean               gst_tag_exists          (const gchar * tag);
218
219 GST_API
220 GType                  gst_tag_get_type        (const gchar * tag);
221
222 GST_API
223 const gchar *          gst_tag_get_nick        (const gchar * tag);
224
225 GST_API
226 const gchar *          gst_tag_get_description (const gchar * tag);
227
228 GST_API
229 GstTagFlag             gst_tag_get_flag        (const gchar * tag);
230
231 GST_API
232 gboolean               gst_tag_is_fixed        (const gchar * tag);
233
234 /* tag lists */
235
236 /**
237  * GstTagScope:
238  * @GST_TAG_SCOPE_STREAM: tags specific to this single stream
239  * @GST_TAG_SCOPE_GLOBAL: global tags for the complete medium
240  *
241  * GstTagScope specifies if a taglist applies to the complete
242  * medium or only to one single stream.
243  */
244 typedef enum {
245   GST_TAG_SCOPE_STREAM,
246   GST_TAG_SCOPE_GLOBAL
247 } GstTagScope;
248
249 GST_API
250 GstTagList * gst_tag_list_new_empty         (void) G_GNUC_MALLOC;
251
252 GST_API
253 GstTagList * gst_tag_list_new               (const gchar * tag, ...) G_GNUC_MALLOC;
254
255 GST_API
256 GstTagList * gst_tag_list_new_valist        (va_list var_args) G_GNUC_MALLOC;
257
258 GST_API
259 void         gst_tag_list_set_scope         (GstTagList * list, GstTagScope scope);
260
261 GST_API
262 GstTagScope  gst_tag_list_get_scope         (const GstTagList * list);
263
264 GST_API
265 gchar      * gst_tag_list_to_string         (const GstTagList * list) G_GNUC_MALLOC;
266
267 GST_API
268 GstTagList * gst_tag_list_new_from_string   (const gchar      * str) G_GNUC_MALLOC;
269
270 GST_API
271 gint         gst_tag_list_n_tags            (const GstTagList * list);
272
273 GST_API
274 const gchar* gst_tag_list_nth_tag_name      (const GstTagList * list, guint index);
275
276 GST_API
277 gboolean     gst_tag_list_is_empty          (const GstTagList * list);
278
279 GST_API
280 gboolean     gst_tag_list_is_equal          (const GstTagList * list1,
281                                              const GstTagList * list2);
282 GST_API
283 void         gst_tag_list_insert            (GstTagList       * into,
284                                              const GstTagList * from,
285                                              GstTagMergeMode    mode);
286 GST_API
287 GstTagList * gst_tag_list_merge             (const GstTagList * list1,
288                                              const GstTagList * list2,
289                                              GstTagMergeMode    mode) G_GNUC_MALLOC;
290 GST_API
291 guint        gst_tag_list_get_tag_size      (const GstTagList * list,
292                                              const gchar      * tag);
293 GST_API
294 void         gst_tag_list_add               (GstTagList       * list,
295                                              GstTagMergeMode    mode,
296                                              const gchar      * tag,
297                                              ...) G_GNUC_NULL_TERMINATED;
298 GST_API
299 void         gst_tag_list_add_values        (GstTagList       * list,
300                                              GstTagMergeMode    mode,
301                                              const gchar      * tag,
302                                              ...) G_GNUC_NULL_TERMINATED;
303 GST_API
304 void         gst_tag_list_add_valist        (GstTagList       * list,
305                                              GstTagMergeMode    mode,
306                                              const gchar      * tag,
307                                              va_list        var_args);
308 GST_API
309 void         gst_tag_list_add_valist_values (GstTagList       * list,
310                                              GstTagMergeMode    mode,
311                                              const gchar      * tag,
312                                              va_list            var_args);
313 GST_API
314 void         gst_tag_list_add_value         (GstTagList       * list,
315                                              GstTagMergeMode    mode,
316                                              const gchar      * tag,
317                                              const GValue     * value);
318 GST_API
319 void         gst_tag_list_remove_tag        (GstTagList       * list,
320                                              const gchar      * tag);
321 GST_API
322 void         gst_tag_list_foreach           (const GstTagList * list,
323                                              GstTagForeachFunc  func,
324                                              gpointer           user_data);
325 GST_API
326 const GValue *
327              gst_tag_list_get_value_index   (const GstTagList * list,
328                                              const gchar      * tag,
329                                              guint              index);
330 GST_API
331 gboolean     gst_tag_list_copy_value        (GValue           * dest,
332                                              const GstTagList * list,
333                                              const gchar      * tag);
334
335 /* simplifications (FIXME: do we want them?) */
336
337 GST_API
338 gboolean     gst_tag_list_get_boolean       (const GstTagList * list,
339                                              const gchar      * tag,
340                                              gboolean         * value);
341 GST_API
342 gboolean     gst_tag_list_get_boolean_index (const GstTagList * list,
343                                              const gchar      * tag,
344                                              guint              index,
345                                              gboolean         * value);
346 GST_API
347 gboolean     gst_tag_list_get_int           (const GstTagList * list,
348                                              const gchar      * tag,
349                                              gint             * value);
350 GST_API
351 gboolean     gst_tag_list_get_int_index     (const GstTagList * list,
352                                              const gchar      * tag,
353                                              guint              index,
354                                              gint             * value);
355 GST_API
356 gboolean     gst_tag_list_get_uint          (const GstTagList * list,
357                                              const gchar      * tag,
358                                              guint            * value);
359 GST_API
360 gboolean     gst_tag_list_get_uint_index    (const GstTagList * list,
361                                              const gchar      * tag,
362                                              guint              index,
363                                              guint            * value);
364 GST_API
365 gboolean     gst_tag_list_get_int64         (const GstTagList * list,
366                                              const gchar      * tag,
367                                              gint64           * value);
368 GST_API
369 gboolean     gst_tag_list_get_int64_index   (const GstTagList * list,
370                                              const gchar      * tag,
371                                              guint              index,
372                                              gint64           * value);
373 GST_API
374 gboolean     gst_tag_list_get_uint64        (const GstTagList * list,
375                                              const gchar      * tag,
376                                              guint64          * value);
377 GST_API
378 gboolean     gst_tag_list_get_uint64_index  (const GstTagList * list,
379                                              const gchar      * tag,
380                                              guint              index,
381                                              guint64          * value);
382 GST_API
383 gboolean     gst_tag_list_get_float         (const GstTagList * list,
384                                              const gchar      * tag,
385                                              gfloat           * value);
386 GST_API
387 gboolean     gst_tag_list_get_float_index   (const GstTagList * list,
388                                              const gchar      * tag,
389                                              guint              index,
390                                              gfloat           * value);
391 GST_API
392 gboolean     gst_tag_list_get_double        (const GstTagList * list,
393                                              const gchar      * tag,
394                                              gdouble          * value);
395 GST_API
396 gboolean     gst_tag_list_get_double_index  (const GstTagList * list,
397                                              const gchar      * tag,
398                                              guint              index,
399                                              gdouble          * value);
400 GST_API
401 gboolean     gst_tag_list_get_string        (const GstTagList * list,
402                                              const gchar      * tag,
403                                              gchar           ** value);
404 GST_API
405 gboolean     gst_tag_list_get_string_index  (const GstTagList * list,
406                                              const gchar      * tag,
407                                              guint              index,
408                                              gchar           ** value);
409 GST_API
410 gboolean     gst_tag_list_peek_string_index (const GstTagList * list,
411                                              const gchar      * tag,
412                                              guint              index,
413                                              const gchar     ** value);
414 GST_API
415 gboolean     gst_tag_list_get_pointer       (const GstTagList * list,
416                                              const gchar      * tag,
417                                              gpointer         * value);
418 GST_API
419 gboolean     gst_tag_list_get_pointer_index (const GstTagList * list,
420                                              const gchar      * tag,
421                                              guint              index,
422                                              gpointer         * value);
423 GST_API
424 gboolean     gst_tag_list_get_date          (const GstTagList * list,
425                                              const gchar      * tag,
426                                              GDate           ** value);
427 GST_API
428 gboolean     gst_tag_list_get_date_index    (const GstTagList * list,
429                                              const gchar      * tag,
430                                              guint              index,
431                                              GDate           ** value);
432 GST_API
433 gboolean     gst_tag_list_get_date_time     (const GstTagList * list,
434                                              const gchar      * tag,
435                                              GstDateTime     ** value);
436 GST_API
437 gboolean     gst_tag_list_get_date_time_index (const GstTagList * list,
438                                              const gchar      * tag,
439                                              guint              index,
440                                              GstDateTime     ** value);
441 GST_API
442 gboolean     gst_tag_list_get_sample        (const GstTagList * list,
443                                              const gchar      * tag,
444                                              GstSample       ** sample);
445 GST_API
446 gboolean     gst_tag_list_get_sample_index  (const GstTagList * list,
447                                              const gchar      * tag,
448                                              guint              index,
449                                              GstSample       ** sample);
450
451 /* refcounting */
452 /**
453  * gst_tag_list_ref:
454  * @taglist: the #GstTagList to reference
455  *
456  * Add a reference to a #GstTagList mini object.
457  *
458  * From this point on, until the caller calls gst_tag_list_unref() or
459  * gst_tag_list_make_writable(), it is guaranteed that the taglist object will
460  * not change. To use a #GstTagList object, you must always have a refcount on
461  * it -- either the one made implicitly by e.g. gst_tag_list_new(), or via
462  * taking one explicitly with this function.
463  *
464  * Returns: the same #GstTagList mini object.
465  */
466 static inline GstTagList *
467 gst_tag_list_ref (GstTagList * taglist)
468 {
469   return (GstTagList *) gst_mini_object_ref (GST_MINI_OBJECT_CAST (taglist));
470 }
471
472 /**
473  * gst_tag_list_unref:
474  * @taglist: a #GstTagList.
475  *
476  * Unref a #GstTagList, and and free all its memory when the refcount reaches 0.
477  */
478 static inline void
479 gst_tag_list_unref (GstTagList * taglist)
480 {
481   gst_mini_object_unref (GST_MINI_OBJECT_CAST (taglist));
482 }
483
484 /**
485  * gst_tag_list_copy:
486  * @taglist: a #GstTagList.
487  *
488  * Creates a new #GstTagList as a copy of the old @taglist. The new taglist
489  * will have a refcount of 1, owned by the caller, and will be writable as
490  * a result.
491  *
492  * Note that this function is the semantic equivalent of a gst_tag_list_ref()
493  * followed by a gst_tag_list_make_writable(). If you only want to hold on to a
494  * reference to the data, you should use gst_tag_list_ref().
495  *
496  * When you are finished with the taglist, call gst_tag_list_unref() on it.
497  *
498  * Returns: the new #GstTagList
499  */
500 static inline GstTagList *
501 gst_tag_list_copy (const GstTagList * taglist)
502 {
503   return GST_TAG_LIST (gst_mini_object_copy (GST_MINI_OBJECT_CAST (taglist)));
504 }
505
506 /**
507  * gst_tag_list_is_writable:
508  * @taglist: a #GstTagList
509  *
510  * Tests if you can safely modify @taglist. It is only safe to modify taglist
511  * when there is only one owner of the taglist - ie, the refcount is 1.
512  */
513 #define gst_tag_list_is_writable(taglist)    gst_mini_object_is_writable (GST_MINI_OBJECT_CAST (taglist))
514
515 /**
516  * gst_tag_list_make_writable:
517  * @taglist: (transfer full): a #GstTagList
518  *
519  * Returns a writable copy of @taglist.
520  *
521  * If there is only one reference count on @taglist, the caller must be the
522  * owner, and so this function will return the taglist object unchanged. If on
523  * the other hand there is more than one reference on the object, a new taglist
524  * object will be returned (which will be a copy of @taglist). The caller's
525  * reference on @taglist will be removed, and instead the caller will own a
526  * reference to the returned object.
527  *
528  * In short, this function unrefs the taglist in the argument and refs the
529  * taglist that it returns. Don't access the argument after calling this
530  * function. See also: gst_tag_list_ref().
531  *
532  * Returns: (transfer full): a writable taglist which may or may not be the
533  *     same as @taglist
534  */
535 #define gst_tag_list_make_writable(taglist)   GST_TAG_LIST (gst_mini_object_make_writable (GST_MINI_OBJECT_CAST (taglist)))
536
537 /* GStreamer core tags */
538 /**
539  * GST_TAG_TITLE:
540  *
541  * commonly used title (string)
542  *
543  * The title as it should be displayed, e.g. 'The Doll House'
544  */
545 #define GST_TAG_TITLE                  "title"
546 /**
547  * GST_TAG_TITLE_SORTNAME:
548  *
549  * commonly used title, as used for sorting (string)
550  *
551  * The title as it should be sorted, e.g. 'Doll House, The'
552  */
553 #define GST_TAG_TITLE_SORTNAME         "title-sortname"
554 /**
555  * GST_TAG_ARTIST:
556  *
557  * person(s) responsible for the recording (string)
558  *
559  * The artist name as it should be displayed, e.g. 'Jimi Hendrix' or
560  * 'The Guitar Heroes'
561  */
562 #define GST_TAG_ARTIST                 "artist"
563 /**
564  * GST_TAG_ARTIST_SORTNAME:
565  *
566  * person(s) responsible for the recording, as used for sorting (string)
567  *
568  * The artist name as it should be sorted, e.g. 'Hendrix, Jimi' or
569  * 'Guitar Heroes, The'
570  */
571 #define GST_TAG_ARTIST_SORTNAME        "artist-sortname"
572 /**
573  * GST_TAG_ALBUM:
574  *
575  * album containing this data (string)
576  *
577  * The album name as it should be displayed, e.g. 'The Jazz Guitar'
578  */
579 #define GST_TAG_ALBUM                  "album"
580 /**
581  * GST_TAG_ALBUM_SORTNAME:
582  *
583  * album containing this data, as used for sorting (string)
584  *
585  * The album name as it should be sorted, e.g. 'Jazz Guitar, The'
586  */
587 #define GST_TAG_ALBUM_SORTNAME         "album-sortname"
588 /**
589  * GST_TAG_ALBUM_ARTIST:
590  *
591  * The artist of the entire album, as it should be displayed.
592  */
593 #define GST_TAG_ALBUM_ARTIST           "album-artist"
594 /**
595  * GST_TAG_ALBUM_ARTIST_SORTNAME:
596  *
597  * The artist of the entire album, as it should be sorted.
598  */
599 #define GST_TAG_ALBUM_ARTIST_SORTNAME  "album-artist-sortname"
600 /**
601  * GST_TAG_COMPOSER:
602  *
603  * person(s) who composed the recording (string)
604  */
605 #define GST_TAG_COMPOSER               "composer"
606 /**
607  * GST_TAG_CONDUCTOR:
608  *
609  * conductor/performer refinement (string)
610  *
611  * Since: 1.8
612  */
613 #define GST_TAG_CONDUCTOR               "conductor"
614 /**
615  * GST_TAG_DATE:
616  *
617  * date the data was created (#GDate structure)
618  */
619 #define GST_TAG_DATE                   "date"
620 /**
621  * GST_TAG_DATE_TIME:
622  *
623  * date and time the data was created (#GstDateTime structure)
624  */
625 #define GST_TAG_DATE_TIME              "datetime"
626 /**
627  * GST_TAG_GENRE:
628  *
629  * genre this data belongs to (string)
630  */
631 #define GST_TAG_GENRE                  "genre"
632 /**
633  * GST_TAG_COMMENT:
634  *
635  * free text commenting the data (string)
636  */
637 #define GST_TAG_COMMENT                "comment"
638 /**
639  * GST_TAG_EXTENDED_COMMENT:
640  *
641  * key/value text commenting the data (string)
642  *
643  * Must be in the form of 'key=comment' or
644  * 'key[lc]=comment' where 'lc' is an ISO-639
645  * language code.
646  *
647  * This tag is used for unknown Vorbis comment tags,
648  * unknown APE tags and certain ID3v2 comment fields.
649  */
650 #define GST_TAG_EXTENDED_COMMENT       "extended-comment"
651 /**
652  * GST_TAG_TRACK_NUMBER:
653  *
654  * track number inside a collection (unsigned integer)
655  */
656 #define GST_TAG_TRACK_NUMBER           "track-number"
657 /**
658  * GST_TAG_TRACK_COUNT:
659  *
660  * count of tracks inside collection this track belongs to (unsigned integer)
661  */
662 #define GST_TAG_TRACK_COUNT            "track-count"
663 /**
664  * GST_TAG_ALBUM_VOLUME_NUMBER:
665  *
666  * disc number inside a collection (unsigned integer)
667  */
668 #define GST_TAG_ALBUM_VOLUME_NUMBER    "album-disc-number"
669 /**
670  * GST_TAG_ALBUM_VOLUME_COUNT:
671  *
672  * count of discs inside collection this disc belongs to (unsigned integer)
673  */
674 #define GST_TAG_ALBUM_VOLUME_COUNT    "album-disc-count"
675 /**
676  * GST_TAG_LOCATION:
677  *
678  * Origin of media as a URI (location, where the original of the file or stream
679  * is hosted) (string)
680  */
681 #define GST_TAG_LOCATION               "location"
682 /**
683  * GST_TAG_HOMEPAGE:
684  *
685  * Homepage for this media (i.e. artist or movie homepage) (string)
686  */
687 #define GST_TAG_HOMEPAGE               "homepage"
688 /**
689  * GST_TAG_DESCRIPTION:
690  *
691  * short text describing the content of the data (string)
692  */
693 #define GST_TAG_DESCRIPTION            "description"
694 /**
695  * GST_TAG_VERSION:
696  *
697  * version of this data (string)
698  */
699 #define GST_TAG_VERSION                "version"
700 /**
701  * GST_TAG_ISRC:
702  *
703  * International Standard Recording Code - see http://www.ifpi.org/isrc/ (string)
704  */
705 #define GST_TAG_ISRC                   "isrc"
706 /**
707  * GST_TAG_ORGANIZATION:
708  *
709  * organization (string)
710  */
711 #define GST_TAG_ORGANIZATION           "organization"
712 /**
713  * GST_TAG_COPYRIGHT:
714  *
715  * copyright notice of the data (string)
716  */
717 #define GST_TAG_COPYRIGHT              "copyright"
718 /**
719  * GST_TAG_COPYRIGHT_URI:
720  *
721  * URI to location where copyright details can be found (string)
722  */
723 #define GST_TAG_COPYRIGHT_URI          "copyright-uri"
724 /**
725  * GST_TAG_ENCODED_BY:
726  *
727  * name of the person or organisation that encoded the file. May contain a
728  * copyright message if the person or organisation also holds the copyright
729  * (string)
730  *
731  * Note: do not use this field to describe the encoding application. Use
732  * #GST_TAG_APPLICATION_NAME or #GST_TAG_COMMENT for that.
733  */
734 #define GST_TAG_ENCODED_BY             "encoded-by"
735 /**
736  * GST_TAG_CONTACT:
737  *
738  * contact information (string)
739  */
740 #define GST_TAG_CONTACT                "contact"
741 /**
742  * GST_TAG_LICENSE:
743  *
744  * license of data (string)
745  */
746 #define GST_TAG_LICENSE                "license"
747 /**
748  * GST_TAG_LICENSE_URI:
749  *
750  * URI to location where license details can be found (string)
751  */
752 #define GST_TAG_LICENSE_URI            "license-uri"
753 /**
754  * GST_TAG_PERFORMER:
755  *
756  * person(s) performing (string)
757  */
758 #define GST_TAG_PERFORMER              "performer"
759 /**
760  * GST_TAG_DURATION:
761  *
762  * length in GStreamer time units (nanoseconds) (unsigned 64-bit integer)
763  */
764 #define GST_TAG_DURATION               "duration"
765 /**
766  * GST_TAG_CODEC:
767  *
768  * codec the data is stored in (string)
769  */
770 #define GST_TAG_CODEC                  "codec"
771 /**
772  * GST_TAG_VIDEO_CODEC:
773  *
774  * codec the video data is stored in (string)
775  */
776 #define GST_TAG_VIDEO_CODEC            "video-codec"
777 /**
778  * GST_TAG_AUDIO_CODEC:
779  *
780  * codec the audio data is stored in (string)
781  */
782 #define GST_TAG_AUDIO_CODEC            "audio-codec"
783 /**
784  * GST_TAG_SUBTITLE_CODEC:
785  *
786  * codec/format the subtitle data is stored in (string)
787  */
788 #define GST_TAG_SUBTITLE_CODEC         "subtitle-codec"
789 /**
790  * GST_TAG_CONTAINER_FORMAT:
791  *
792  * container format the data is stored in (string)
793  */
794 #define GST_TAG_CONTAINER_FORMAT       "container-format"
795 /**
796  * GST_TAG_BITRATE:
797  *
798  * exact or average bitrate in bits/s (unsigned integer)
799  */
800 #define GST_TAG_BITRATE                "bitrate"
801 /**
802  * GST_TAG_NOMINAL_BITRATE:
803  *
804  * nominal bitrate in bits/s (unsigned integer). The actual bitrate might be
805  * different from this target bitrate.
806  */
807 #define GST_TAG_NOMINAL_BITRATE        "nominal-bitrate"
808 /**
809  * GST_TAG_MINIMUM_BITRATE:
810  *
811  * minimum bitrate in bits/s (unsigned integer)
812  */
813 #define GST_TAG_MINIMUM_BITRATE        "minimum-bitrate"
814 /**
815  * GST_TAG_MAXIMUM_BITRATE:
816  *
817  * maximum bitrate in bits/s (unsigned integer)
818  */
819 #define GST_TAG_MAXIMUM_BITRATE        "maximum-bitrate"
820 /**
821  * GST_TAG_SERIAL:
822  *
823  * serial number of track (unsigned integer)
824  */
825 #define GST_TAG_SERIAL                 "serial"
826 /**
827  * GST_TAG_ENCODER:
828  *
829  * encoder used to encode this stream (string)
830  */
831 #define GST_TAG_ENCODER                "encoder"
832 /**
833  * GST_TAG_ENCODER_VERSION:
834  *
835  * version of the encoder used to encode this stream (unsigned integer)
836  */
837 #define GST_TAG_ENCODER_VERSION        "encoder-version"
838 /**
839  * GST_TAG_TRACK_GAIN:
840  *
841  * track gain in db (double)
842  */
843 #define GST_TAG_TRACK_GAIN             "replaygain-track-gain"
844 /**
845  * GST_TAG_TRACK_PEAK:
846  *
847  * peak of the track (double)
848  */
849 #define GST_TAG_TRACK_PEAK             "replaygain-track-peak"
850 /**
851  * GST_TAG_ALBUM_GAIN:
852  *
853  * album gain in db (double)
854  */
855 #define GST_TAG_ALBUM_GAIN             "replaygain-album-gain"
856 /**
857  * GST_TAG_ALBUM_PEAK:
858  *
859  * peak of the album (double)
860  */
861 #define GST_TAG_ALBUM_PEAK             "replaygain-album-peak"
862 /**
863  * GST_TAG_REFERENCE_LEVEL:
864  *
865  * reference level of track and album gain values (double)
866  */
867 #define GST_TAG_REFERENCE_LEVEL        "replaygain-reference-level"
868 /**
869  * GST_TAG_LANGUAGE_CODE:
870  *
871  * ISO-639-2 or ISO-639-1 code for the language the content is in (string)
872  *
873  * There is utility API in libgsttag in gst-plugins-base to obtain a translated
874  * language name from the language code: gst_tag_get_language_name()
875  */
876 #define GST_TAG_LANGUAGE_CODE          "language-code"
877 /**
878  * GST_TAG_LANGUAGE_NAME:
879  *
880  * Name of the language the content is in (string)
881  *
882  * Free-form name of the language the content is in, if a language code
883  * is not available. This tag should not be set in addition to a language
884  * code. It is undefined what language or locale the language name is in.
885  */
886 #define GST_TAG_LANGUAGE_NAME          "language-name"
887 /**
888  * GST_TAG_IMAGE:
889  *
890  * image (sample) (sample taglist should specify the content type and preferably
891  * also set "image-type" field as #GstTagImageType)
892  */
893 #define GST_TAG_IMAGE                  "image"
894 /**
895  * GST_TAG_PREVIEW_IMAGE:
896  *
897  * image that is meant for preview purposes, e.g. small icon-sized version
898  * (sample) (sample taglist should specify the content type)
899  */
900 #define GST_TAG_PREVIEW_IMAGE          "preview-image"
901
902 /**
903  * GST_TAG_ATTACHMENT:
904  *
905  * generic file attachment (sample) (sample taglist should specify the content
906  * type and if possible set "filename" to the file name of the
907  * attachment)
908  */
909 #define GST_TAG_ATTACHMENT             "attachment"
910
911 /**
912  * GST_TAG_BEATS_PER_MINUTE:
913  *
914  * number of beats per minute in audio (double)
915  */
916 #define GST_TAG_BEATS_PER_MINUTE       "beats-per-minute"
917
918 /**
919  * GST_TAG_KEYWORDS:
920  *
921  * comma separated keywords describing the content (string).
922  */
923 #define GST_TAG_KEYWORDS               "keywords"
924
925 /**
926  * GST_TAG_GEO_LOCATION_NAME:
927  *
928  * human readable descriptive location of where the media has been recorded or
929  * produced. (string).
930  */
931 #define GST_TAG_GEO_LOCATION_NAME               "geo-location-name"
932
933 /**
934  * GST_TAG_GEO_LOCATION_LATITUDE:
935  *
936  * geo latitude location of where the media has been recorded or produced in
937  * degrees according to WGS84 (zero at the equator, negative values for southern
938  * latitudes) (double).
939  */
940 #define GST_TAG_GEO_LOCATION_LATITUDE               "geo-location-latitude"
941
942 /**
943  * GST_TAG_GEO_LOCATION_LONGITUDE:
944  *
945  * geo longitude location of where the media has been recorded or produced in
946  * degrees according to WGS84 (zero at the prime meridian in Greenwich/UK,
947  * negative values for western longitudes). (double).
948  */
949 #define GST_TAG_GEO_LOCATION_LONGITUDE               "geo-location-longitude"
950
951 /**
952  * GST_TAG_GEO_LOCATION_ELEVATION:
953  *
954  * geo elevation of where the media has been recorded or produced in meters
955  * according to WGS84 (zero is average sea level) (double).
956  */
957 #define GST_TAG_GEO_LOCATION_ELEVATION               "geo-location-elevation"
958 /**
959  * GST_TAG_GEO_LOCATION_COUNTRY:
960  *
961  * The country (english name) where the media has been produced (string).
962  */
963 #define GST_TAG_GEO_LOCATION_COUNTRY                 "geo-location-country"
964 /**
965  * GST_TAG_GEO_LOCATION_CITY:
966  *
967  * The city (english name) where the media has been produced (string).
968  */
969 #define GST_TAG_GEO_LOCATION_CITY                    "geo-location-city"
970 /**
971  * GST_TAG_GEO_LOCATION_SUBLOCATION:
972  *
973  * A location 'smaller' than GST_TAG_GEO_LOCATION_CITY that specifies better
974  * where the media has been produced. (e.g. the neighborhood) (string).
975  *
976  * This tag has been added as this is how it is handled/named in XMP's
977  * Iptc4xmpcore schema.
978  */
979 #define GST_TAG_GEO_LOCATION_SUBLOCATION             "geo-location-sublocation"
980 /**
981  * GST_TAG_GEO_LOCATION_HORIZONTAL_ERROR:
982  *
983  * Represents the expected error on the horizontal positioning in
984  * meters (double).
985  */
986 #define GST_TAG_GEO_LOCATION_HORIZONTAL_ERROR   "geo-location-horizontal-error"
987 /**
988  * GST_TAG_GEO_LOCATION_MOVEMENT_SPEED:
989  *
990  * Speed of the capturing device when performing the capture.
991  * Represented in m/s. (double)
992  *
993  * See also #GST_TAG_GEO_LOCATION_MOVEMENT_DIRECTION
994  */
995 #define GST_TAG_GEO_LOCATION_MOVEMENT_SPEED       "geo-location-movement-speed"
996 /**
997  * GST_TAG_GEO_LOCATION_MOVEMENT_DIRECTION:
998  *
999  * Indicates the movement direction of the device performing the capture
1000  * of a media. It is represented as degrees in floating point representation,
1001  * 0 means the geographic north, and increases clockwise (double from 0 to 360)
1002  *
1003  * See also #GST_TAG_GEO_LOCATION_CAPTURE_DIRECTION
1004  */
1005 #define GST_TAG_GEO_LOCATION_MOVEMENT_DIRECTION "geo-location-movement-direction"
1006 /**
1007  * GST_TAG_GEO_LOCATION_CAPTURE_DIRECTION:
1008  *
1009  * Indicates the direction the device is pointing to when capturing
1010  * a media. It is represented as degrees in floating point representation,
1011  * 0 means the geographic north, and increases clockwise (double from 0 to 360)
1012  *
1013  * See also #GST_TAG_GEO_LOCATION_MOVEMENT_DIRECTION
1014  */
1015 #define GST_TAG_GEO_LOCATION_CAPTURE_DIRECTION  "geo-location-capture-direction"
1016 /**
1017  * GST_TAG_SHOW_NAME:
1018  *
1019  * Name of the show, used for displaying (string)
1020  */
1021 #define GST_TAG_SHOW_NAME                         "show-name"
1022 /**
1023  * GST_TAG_SHOW_SORTNAME:
1024  *
1025  * Name of the show, used for sorting (string)
1026  */
1027 #define GST_TAG_SHOW_SORTNAME                     "show-sortname"
1028 /**
1029  * GST_TAG_SHOW_EPISODE_NUMBER:
1030  *
1031  * Number of the episode within a season/show (unsigned integer)
1032  */
1033 #define GST_TAG_SHOW_EPISODE_NUMBER               "show-episode-number"
1034 /**
1035  * GST_TAG_SHOW_SEASON_NUMBER:
1036  *
1037  * Number of the season of a show/series (unsigned integer)
1038  */
1039 #define GST_TAG_SHOW_SEASON_NUMBER                "show-season-number"
1040 /**
1041  * GST_TAG_LYRICS:
1042  *
1043  * The lyrics of the media (string)
1044  */
1045 #define GST_TAG_LYRICS                            "lyrics"
1046 /**
1047  * GST_TAG_COMPOSER_SORTNAME:
1048  *
1049  * The composer's name, used for sorting (string)
1050  */
1051 #define GST_TAG_COMPOSER_SORTNAME                 "composer-sortname"
1052 /**
1053  * GST_TAG_GROUPING:
1054  *
1055  * Groups together media that are related and spans multiple tracks. An
1056  * example are multiple pieces of a concerto. (string)
1057  */
1058 #define GST_TAG_GROUPING                          "grouping"
1059 /**
1060  * GST_TAG_USER_RATING:
1061  *
1062  * Rating attributed by a person (likely the application user).
1063  * The higher the value, the more the user likes this media
1064  * (unsigned int from 0 to 100)
1065  */
1066 #define GST_TAG_USER_RATING                       "user-rating"
1067 /**
1068  * GST_TAG_DEVICE_MANUFACTURER:
1069  *
1070  * Manufacturer of the device used to create the media (string)
1071  */
1072 #define GST_TAG_DEVICE_MANUFACTURER               "device-manufacturer"
1073 /**
1074  * GST_TAG_DEVICE_MODEL:
1075  *
1076  * Model of the device used to create the media (string)
1077  */
1078 #define GST_TAG_DEVICE_MODEL                      "device-model"
1079 /**
1080  * GST_TAG_APPLICATION_NAME:
1081  *
1082  * Name of the application used to create the media (string)
1083  */
1084 #define GST_TAG_APPLICATION_NAME                  "application-name"
1085 /**
1086  * GST_TAG_APPLICATION_DATA:
1087  *
1088  * Arbitrary application data (sample)
1089  *
1090  * Some formats allow applications to add their own arbitrary data
1091  * into files. This data is application dependent.
1092  */
1093 #define GST_TAG_APPLICATION_DATA          "application-data"
1094 /**
1095  * GST_TAG_IMAGE_ORIENTATION:
1096  *
1097  * Represents the 'Orientation' tag from EXIF. Defines how the image
1098  * should be rotated and mirrored for display. (string)
1099  *
1100  * This tag has a predefined set of allowed values:
1101  *   "rotate-0"
1102  *   "rotate-90"
1103  *   "rotate-180"
1104  *   "rotate-270"
1105  *   "flip-rotate-0"
1106  *   "flip-rotate-90"
1107  *   "flip-rotate-180"
1108  *   "flip-rotate-270"
1109  *
1110  * The naming is adopted according to a possible transformation to perform
1111  * on the image to fix its orientation, obviously equivalent operations will
1112  * yield the same result.
1113  *
1114  * Rotations indicated by the values are in clockwise direction and
1115  * 'flip' means an horizontal mirroring.
1116  */
1117 #define GST_TAG_IMAGE_ORIENTATION            "image-orientation"
1118 /**
1119  * GST_TAG_PUBLISHER:
1120  *
1121  * Name of the label or publisher (string)
1122  *
1123  * Since: 1.2
1124  */
1125 #define GST_TAG_PUBLISHER                         "publisher"
1126 /**
1127  * GST_TAG_INTERPRETED_BY:
1128  *
1129  * Information about the people behind a remix and similar
1130  * interpretations of another existing piece (string)
1131  *
1132  * Since: 1.2
1133  */
1134 #define GST_TAG_INTERPRETED_BY                    "interpreted-by"
1135 /**
1136  * GST_TAG_MIDI_BASE_NOTE:
1137  *
1138  * <ulink url="http://en.wikipedia.org/wiki/Note#Note_designation_in_accordance_with_octave_name">Midi note number</ulink>
1139  * of the audio track. This is useful for sample instruments and in particular
1140  * for multi-samples.
1141  *
1142  * Since: 1.4
1143  */
1144 #define GST_TAG_MIDI_BASE_NOTE                    "midi-base-note"
1145 /**
1146  * GST_TAG_PRIVATE_DATA:
1147  *
1148  * Any private data that may be contained in tags (sample).
1149  *
1150  * It is represented by #GstSample in which #GstBuffer contains the
1151  * binary data and the sample's info #GstStructure may contain any
1152  * extra information that identifies the origin or meaning of the data.
1153  *
1154  * Private frames in ID3v2 tags ('PRIV' frames) will be represented
1155  * using this tag, in which case the GstStructure will be named
1156  * "ID3PrivateFrame" and contain a field named "owner" of type string
1157  * which contains the owner-identification string from the tag.
1158  *
1159  * Since: 1.8
1160  */
1161 #define GST_TAG_PRIVATE_DATA                         "private-data"
1162
1163 #ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
1164 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstTagList, gst_tag_list_unref)
1165 #endif
1166
1167 G_END_DECLS
1168
1169 #endif /* __GST_TAGLIST_H__ */