gstfunnel: avoid access of freed pad
[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., 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, 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 #define GST_TAG_LIST(x)       ((GstTagList *) (x))
158 #define GST_TYPE_TAG_LIST     (gst_tag_list_get_type ())
159 #define GST_IS_TAG_LIST(obj)  (GST_IS_MINI_OBJECT_TYPE((obj), GST_TYPE_TAG_LIST))
160
161 /**
162  * GstTagForeachFunc:
163  * @list: the #GstTagList
164  * @tag: a name of a tag in @list
165  * @user_data: user data
166  *
167  * A function that will be called in gst_tag_list_foreach(). The function may
168  * not modify the tag list.
169  */
170 typedef void (*GstTagForeachFunc) (const GstTagList * list,
171                                    const gchar      * tag,
172                                    gpointer           user_data);
173
174 /**
175  * GstTagMergeFunc:
176  * @dest: the destination #GValue
177  * @src: the source #GValue
178  *
179  * A function for merging multiple values of a tag used when registering
180  * tags.
181  */
182 typedef void (* GstTagMergeFunc) (GValue *dest, const GValue *src);
183
184 GType        gst_tag_list_get_type (void);
185
186 /* tag registration */
187 void         gst_tag_register      (const gchar     * name,
188                                     GstTagFlag        flag,
189                                     GType             type,
190                                     const gchar     * nick,
191                                     const gchar     * blurb,
192                                     GstTagMergeFunc   func);
193
194 void         gst_tag_register_static (const gchar   * name,
195                                       GstTagFlag      flag,
196                                       GType           type,
197                                       const gchar   * nick,
198                                       const gchar   * blurb,
199                                       GstTagMergeFunc func);
200
201 /* some default merging functions */
202 void      gst_tag_merge_use_first          (GValue * dest, const GValue * src);
203 void      gst_tag_merge_strings_with_comma (GValue * dest, const GValue * src);
204
205 /* basic tag support */
206 gboolean               gst_tag_exists          (const gchar * tag);
207 GType                  gst_tag_get_type        (const gchar * tag);
208 const gchar *          gst_tag_get_nick        (const gchar * tag);
209 const gchar *          gst_tag_get_description (const gchar * tag);
210 GstTagFlag             gst_tag_get_flag        (const gchar * tag);
211 gboolean               gst_tag_is_fixed        (const gchar * tag);
212
213 /* tag lists */
214 GstTagList * gst_tag_list_new_empty         (void) G_GNUC_MALLOC;
215 GstTagList * gst_tag_list_new               (const gchar * tag, ...) G_GNUC_MALLOC;
216 GstTagList * gst_tag_list_new_valist        (va_list var_args) G_GNUC_MALLOC;
217
218 gchar      * gst_tag_list_to_string         (const GstTagList * list) G_GNUC_MALLOC;
219 GstTagList * gst_tag_list_new_from_string   (const gchar      * str) G_GNUC_MALLOC;
220
221 gint         gst_tag_list_n_tags            (const GstTagList * list);
222 const gchar* gst_tag_list_nth_tag_name      (const GstTagList * list, guint index);
223 gboolean     gst_tag_list_is_empty          (const GstTagList * list);
224 gboolean     gst_tag_list_is_equal          (const GstTagList * list1,
225                                              const GstTagList * list2);
226 void         gst_tag_list_insert            (GstTagList       * into,
227                                              const GstTagList * from,
228                                              GstTagMergeMode    mode);
229 GstTagList * gst_tag_list_merge             (const GstTagList * list1,
230                                              const GstTagList * list2,
231                                              GstTagMergeMode    mode) G_GNUC_MALLOC;
232 guint        gst_tag_list_get_tag_size      (const GstTagList * list,
233                                              const gchar      * tag);
234 void         gst_tag_list_add               (GstTagList       * list,
235                                              GstTagMergeMode    mode,
236                                              const gchar      * tag,
237                                              ...) G_GNUC_NULL_TERMINATED;
238 void         gst_tag_list_add_values        (GstTagList       * list,
239                                              GstTagMergeMode    mode,
240                                              const gchar      * tag,
241                                              ...) G_GNUC_NULL_TERMINATED;
242 void         gst_tag_list_add_valist        (GstTagList       * list,
243                                              GstTagMergeMode    mode,
244                                              const gchar      * tag,
245                                              va_list        var_args);
246 void         gst_tag_list_add_valist_values (GstTagList       * list,
247                                              GstTagMergeMode    mode,
248                                              const gchar      * tag,
249                                              va_list            var_args);
250 void         gst_tag_list_add_value         (GstTagList       * list,
251                                              GstTagMergeMode    mode,
252                                              const gchar      * tag,
253                                              const GValue     * value);
254 void         gst_tag_list_remove_tag        (GstTagList       * list,
255                                              const gchar      * tag);
256 void         gst_tag_list_foreach           (const GstTagList * list,
257                                              GstTagForeachFunc  func,
258                                              gpointer           user_data);
259
260 const GValue *
261              gst_tag_list_get_value_index   (const GstTagList * list,
262                                              const gchar      * tag,
263                                              guint              index);
264 gboolean     gst_tag_list_copy_value        (GValue           * dest,
265                                              const GstTagList * list,
266                                              const gchar      * tag);
267
268 /* simplifications (FIXME: do we want them?) */
269 gboolean     gst_tag_list_get_boolean       (const GstTagList * list,
270                                              const gchar      * tag,
271                                              gboolean         * value);
272 gboolean     gst_tag_list_get_boolean_index (const GstTagList * list,
273                                              const gchar      * tag,
274                                              guint              index,
275                                              gboolean         * value);
276 gboolean     gst_tag_list_get_int           (const GstTagList * list,
277                                              const gchar      * tag,
278                                              gint             * value);
279 gboolean     gst_tag_list_get_int_index     (const GstTagList * list,
280                                              const gchar      * tag,
281                                              guint              index,
282                                              gint             * value);
283 gboolean     gst_tag_list_get_uint          (const GstTagList * list,
284                                              const gchar      * tag,
285                                              guint            * value);
286 gboolean     gst_tag_list_get_uint_index    (const GstTagList * list,
287                                              const gchar      * tag,
288                                              guint              index,
289                                              guint            * value);
290 gboolean     gst_tag_list_get_int64         (const GstTagList * list,
291                                              const gchar      * tag,
292                                              gint64           * value);
293 gboolean     gst_tag_list_get_int64_index   (const GstTagList * list,
294                                              const gchar      * tag,
295                                              guint              index,
296                                              gint64           * value);
297 gboolean     gst_tag_list_get_uint64        (const GstTagList * list,
298                                              const gchar      * tag,
299                                              guint64          * value);
300 gboolean     gst_tag_list_get_uint64_index  (const GstTagList * list,
301                                              const gchar      * tag,
302                                              guint              index,
303                                              guint64          * value);
304 gboolean     gst_tag_list_get_float         (const GstTagList * list,
305                                              const gchar      * tag,
306                                              gfloat           * value);
307 gboolean     gst_tag_list_get_float_index   (const GstTagList * list,
308                                              const gchar      * tag,
309                                              guint              index,
310                                              gfloat           * value);
311 gboolean     gst_tag_list_get_double        (const GstTagList * list,
312                                              const gchar      * tag,
313                                              gdouble          * value);
314 gboolean     gst_tag_list_get_double_index  (const GstTagList * list,
315                                              const gchar      * tag,
316                                              guint              index,
317                                              gdouble          * value);
318 gboolean     gst_tag_list_get_string        (const GstTagList * list,
319                                              const gchar      * tag,
320                                              gchar           ** value);
321 gboolean     gst_tag_list_get_string_index  (const GstTagList * list,
322                                              const gchar      * tag,
323                                              guint              index,
324                                              gchar           ** value);
325 gboolean     gst_tag_list_peek_string_index (const GstTagList * list,
326                                              const gchar      * tag,
327                                              guint              index,
328                                              const gchar     ** value);
329 gboolean     gst_tag_list_get_pointer       (const GstTagList * list,
330                                              const gchar      * tag,
331                                              gpointer         * value);
332 gboolean     gst_tag_list_get_pointer_index (const GstTagList * list,
333                                              const gchar      * tag,
334                                              guint              index,
335                                              gpointer         * value);
336 gboolean     gst_tag_list_get_date          (const GstTagList * list,
337                                              const gchar      * tag,
338                                              GDate           ** value);
339 gboolean     gst_tag_list_get_date_index    (const GstTagList * list,
340                                              const gchar      * tag,
341                                              guint              index,
342                                              GDate           ** value);
343 gboolean     gst_tag_list_get_date_time     (const GstTagList * list,
344                                              const gchar      * tag,
345                                              GstDateTime     ** value);
346 gboolean     gst_tag_list_get_date_time_index (const GstTagList * list,
347                                              const gchar      * tag,
348                                              guint              index,
349                                              GstDateTime     ** value);
350 gboolean     gst_tag_list_get_buffer        (const GstTagList * list,
351                                              const gchar      * tag,
352                                              GstBuffer       ** value);
353 gboolean     gst_tag_list_get_buffer_index  (const GstTagList * list,
354                                              const gchar      * tag,
355                                              guint              index,
356                                              GstBuffer       ** value);
357
358 /* refcounting */
359 /**
360  * gst_tag_list_ref:
361  * @taglist: the #GstTagList to reference
362  *
363  * Add a reference to a #GstTagList mini object.
364  *
365  * From this point on, until the caller calls gst_tag_list_unref() or
366  * gst_tag_list_make_writable(), it is guaranteed that the taglist object will
367  * not change. To use a #GstTagList object, you must always have a refcount on
368  * it -- either the one made implicitly by e.g. gst_tag_list_new(), or via
369  * taking one explicitly with this function.
370  *
371  * Returns: the same #GstTagList mini object.
372  */
373 #ifdef _FOOL_GTK_DOC_
374 G_INLINE_FUNC GstTagList * gst_tag_list_ref (GstTagList * taglist);
375 #endif
376
377 static inline GstTagList *
378 gst_tag_list_ref (GstTagList * taglist)
379 {
380   return (GstTagList *) gst_mini_object_ref (GST_MINI_OBJECT_CAST (taglist));
381 }
382
383 /**
384  * gst_tag_list_unref:
385  * @taglist: a #GstTagList.
386  *
387  * Unref a #GstTagList, and and free all its memory when the refcount reaches 0.
388  */
389 #ifdef _FOOL_GTK_DOC_
390 G_INLINE_FUNC void gst_tag_list_unref (GstTagList * taglist);
391 #endif
392
393 static inline void
394 gst_tag_list_unref (GstTagList * taglist)
395 {
396   gst_mini_object_unref (GST_MINI_OBJECT_CAST (taglist));
397 }
398
399 /**
400  * gst_tag_list_copy:
401  * @taglist: a #GstTagList.
402  *
403  * Creates a new #GstTagList as a copy of the old @taglist. The new taglist
404  * will have a refcount of 1, owned by the caller, and will be writable as
405  * a result.
406  *
407  * Note that this function is the semantic equivalent of a gst_tag_list_ref()
408  * followed by a gst_tag_list_make_writable(). If you only want to hold on to a
409  * reference to the data, you should use gst_tag_list_ref().
410  *
411  * When you are finished with the taglist, call gst_tag_list_unref() on it.
412  *
413  * Returns: the new #GstTagList
414  */
415 #ifdef _FOOL_GTK_DOC_
416 G_INLINE_FUNC GstTagList * gst_tag_list_copy (const GstTagList * taglist);
417 #endif
418
419 static inline GstTagList *
420 gst_tag_list_copy (const GstTagList * taglist)
421 {
422   return GST_TAG_LIST (gst_mini_object_copy (GST_MINI_OBJECT_CAST (taglist)));
423 }
424
425 /**
426  * gst_tag_list_is_writable:
427  * @taglist: a #GstTagList
428  *
429  * Tests if you can safely modify @taglist. It is only safe to modify taglist
430  * when there is only one owner of the taglist - ie, the refcount is 1.
431  */
432 #define gst_tag_list_is_writable(taglist)    gst_mini_object_is_writable (GST_MINI_OBJECT_CAST (taglist))
433
434 /**
435  * gst_tag_list_make_writable:
436  * @taglist: (transfer full): a #GstTagList
437  *
438  * Returns a writable copy of @taglist.
439  *
440  * If there is only one reference count on @taglist, the caller must be the
441  * owner, and so this function will return the taglist object unchanged. If on
442  * the other hand there is more than one reference on the object, a new taglist
443  * object will be returned (which will be a copy of @taglist). The caller's
444  * reference on @taglist will be removed, and instead the caller will own a
445  * reference to the returned object.
446  *
447  * In short, this function unrefs the taglist in the argument and refs the
448  * taglist that it returns. Don't access the argument after calling this
449  * function. See also: gst_tag_list_ref().
450  *
451  * Returns: (transfer full): a writable taglist which may or may not be the
452  *     same as @taglist
453  */
454 #define gst_tag_list_make_writable(taglist)   GST_TAG_LIST (gst_mini_object_make_writable (GST_MINI_OBJECT_CAST (taglist)))
455
456 /* GStreamer core tags */
457 /**
458  * GST_TAG_TITLE:
459  *
460  * commonly used title (string)
461  *
462  * The title as it should be displayed, e.g. 'The Doll House'
463  */
464 #define GST_TAG_TITLE                  "title"
465 /**
466  * GST_TAG_TITLE_SORTNAME:
467  *
468  * commonly used title, as used for sorting (string)
469  *
470  * The title as it should be sorted, e.g. 'Doll House, The'
471  *
472  * Since: 0.10.15
473  */
474 #define GST_TAG_TITLE_SORTNAME         "title-sortname"
475 /**
476  * GST_TAG_ARTIST:
477  *
478  * person(s) responsible for the recording (string)
479  *
480  * The artist name as it should be displayed, e.g. 'Jimi Hendrix' or
481  * 'The Guitar Heroes'
482  */
483 #define GST_TAG_ARTIST                 "artist"
484 /**
485  * GST_TAG_ARTIST_SORTNAME:
486  *
487  * person(s) responsible for the recording, as used for sorting (string)
488  *
489  * The artist name as it should be sorted, e.g. 'Hendrix, Jimi' or
490  * 'Guitar Heroes, The'
491  *
492  * Since: 0.10.15
493  */
494 #define GST_TAG_ARTIST_SORTNAME        "artist-sortname"
495 /**
496  * GST_TAG_ALBUM:
497  *
498  * album containing this data (string)
499  *
500  * The album name as it should be displayed, e.g. 'The Jazz Guitar'
501  */
502 #define GST_TAG_ALBUM                  "album"
503 /**
504  * GST_TAG_ALBUM_SORTNAME:
505  *
506  * album containing this data, as used for sorting (string)
507  *
508  * The album name as it should be sorted, e.g. 'Jazz Guitar, The'
509  *
510  * Since: 0.10.15
511  */
512 #define GST_TAG_ALBUM_SORTNAME         "album-sortname"
513 /**
514  * GST_TAG_ALBUM_ARTIST:
515  *
516  * The artist of the entire album, as it should be displayed.
517  *
518  * Since: 0.10.25
519  */
520 #define GST_TAG_ALBUM_ARTIST           "album-artist"
521 /**
522  * GST_TAG_ALBUM_ARTIST_SORTNAME:
523  *
524  * The artist of the entire album, as it should be sorted.
525  *
526  * Since: 0.10.25
527  */
528 #define GST_TAG_ALBUM_ARTIST_SORTNAME  "album-artist-sortname"
529 /**
530  * GST_TAG_COMPOSER:
531  *
532  * person(s) who composed the recording (string)
533  *
534  * Since: 0.10.15
535  */
536 #define GST_TAG_COMPOSER               "composer"
537 /**
538  * GST_TAG_DATE:
539  *
540  * date the data was created (#GDate structure)
541  */
542 #define GST_TAG_DATE                   "date"
543 /**
544  * GST_TAG_DATE_TIME:
545  *
546  * date and time the data was created (#GstDateTime structure)
547  *
548  * Since: 0.10.31
549  */
550 #define GST_TAG_DATE_TIME              "datetime"
551 /**
552  * GST_TAG_GENRE:
553  *
554  * genre this data belongs to (string)
555  */
556 #define GST_TAG_GENRE                  "genre"
557 /**
558  * GST_TAG_COMMENT:
559  *
560  * free text commenting the data (string)
561  */
562 #define GST_TAG_COMMENT                "comment"
563 /**
564  * GST_TAG_EXTENDED_COMMENT:
565  *
566  * key/value text commenting the data (string)
567  *
568  * Must be in the form of 'key=comment' or
569  * 'key[lc]=comment' where 'lc' is an ISO-639
570  * language code.
571  *
572  * This tag is used for unknown Vorbis comment tags,
573  * unknown APE tags and certain ID3v2 comment fields.
574  *
575  * Since: 0.10.10
576  */
577 #define GST_TAG_EXTENDED_COMMENT       "extended-comment"
578 /**
579  * GST_TAG_TRACK_NUMBER:
580  *
581  * track number inside a collection (unsigned integer)
582  */
583 #define GST_TAG_TRACK_NUMBER           "track-number"
584 /**
585  * GST_TAG_TRACK_COUNT:
586  *
587  * count of tracks inside collection this track belongs to (unsigned integer)
588  */
589 #define GST_TAG_TRACK_COUNT            "track-count"
590 /**
591  * GST_TAG_ALBUM_VOLUME_NUMBER:
592  *
593  * disc number inside a collection (unsigned integer)
594  */
595 #define GST_TAG_ALBUM_VOLUME_NUMBER    "album-disc-number"
596 /**
597  * GST_TAG_ALBUM_VOLUME_COUNT:
598  *
599  * count of discs inside collection this disc belongs to (unsigned integer)
600  */
601 #define GST_TAG_ALBUM_VOLUME_COUNT    "album-disc-count"
602 /**
603  * GST_TAG_LOCATION:
604  *
605  * Origin of media as a URI (location, where the original of the file or stream
606  * is hosted) (string)
607  */
608 #define GST_TAG_LOCATION               "location"
609 /**
610  * GST_TAG_HOMEPAGE:
611  *
612  * Homepage for this media (i.e. artist or movie homepage) (string)
613  *
614  * Since: 0.10.23
615  */
616 #define GST_TAG_HOMEPAGE               "homepage"
617 /**
618  * GST_TAG_DESCRIPTION:
619  *
620  * short text describing the content of the data (string)
621  */
622 #define GST_TAG_DESCRIPTION            "description"
623 /**
624  * GST_TAG_VERSION:
625  *
626  * version of this data (string)
627  */
628 #define GST_TAG_VERSION                "version"
629 /**
630  * GST_TAG_ISRC:
631  *
632  * International Standard Recording Code - see http://www.ifpi.org/isrc/ (string)
633  */
634 #define GST_TAG_ISRC                   "isrc"
635 /**
636  * GST_TAG_ORGANIZATION:
637  *
638  * organization (string)
639  */
640 #define GST_TAG_ORGANIZATION           "organization"
641 /**
642  * GST_TAG_COPYRIGHT:
643  *
644  * copyright notice of the data (string)
645  */
646 #define GST_TAG_COPYRIGHT              "copyright"
647 /**
648  * GST_TAG_COPYRIGHT_URI:
649  *
650  * URI to location where copyright details can be found (string)
651  *
652  * Since: 0.10.14
653  */
654 #define GST_TAG_COPYRIGHT_URI          "copyright-uri"
655 /**
656  * GST_TAG_ENCODED_BY:
657  *
658  * name of the person or organisation that encoded the file. May contain a
659  * copyright message if the person or organisation also holds the copyright
660  * (string)
661  *
662  * Note: do not use this field to describe the encoding application. Use
663  * #GST_TAG_APPLICATION_NAME or #GST_TAG_COMMENT for that.
664  *
665  * Since: 0.10.33
666  */
667 #define GST_TAG_ENCODED_BY             "encoded-by"
668 /**
669  * GST_TAG_CONTACT:
670  *
671  * contact information (string)
672  */
673 #define GST_TAG_CONTACT                "contact"
674 /**
675  * GST_TAG_LICENSE:
676  *
677  * license of data (string)
678  */
679 #define GST_TAG_LICENSE                "license"
680 /**
681  * GST_TAG_LICENSE_URI:
682  *
683  * URI to location where license details can be found (string)
684  *
685  * Since: 0.10.14
686  */
687 #define GST_TAG_LICENSE_URI            "license-uri"
688 /**
689  * GST_TAG_PERFORMER:
690  *
691  * person(s) performing (string)
692  */
693 #define GST_TAG_PERFORMER              "performer"
694 /**
695  * GST_TAG_DURATION:
696  *
697  * length in GStreamer time units (nanoseconds) (unsigned 64-bit integer)
698  */
699 #define GST_TAG_DURATION               "duration"
700 /**
701  * GST_TAG_CODEC:
702  *
703  * codec the data is stored in (string)
704  */
705 #define GST_TAG_CODEC                  "codec"
706 /**
707  * GST_TAG_VIDEO_CODEC:
708  *
709  * codec the video data is stored in (string)
710  */
711 #define GST_TAG_VIDEO_CODEC            "video-codec"
712 /**
713  * GST_TAG_AUDIO_CODEC:
714  *
715  * codec the audio data is stored in (string)
716  */
717 #define GST_TAG_AUDIO_CODEC            "audio-codec"
718 /**
719  * GST_TAG_SUBTITLE_CODEC:
720  *
721  * codec/format the subtitle data is stored in (string)
722  *
723  * Since: 0.10.23
724  */
725 #define GST_TAG_SUBTITLE_CODEC         "subtitle-codec"
726 /**
727  * GST_TAG_CONTAINER_FORMAT:
728  *
729  * container format the data is stored in (string)
730  *
731  * Since: 0.10.24
732  */
733 #define GST_TAG_CONTAINER_FORMAT       "container-format"
734 /**
735  * GST_TAG_BITRATE:
736  *
737  * exact or average bitrate in bits/s (unsigned integer)
738  */
739 #define GST_TAG_BITRATE                "bitrate"
740 /**
741  * GST_TAG_NOMINAL_BITRATE:
742  *
743  * nominal bitrate in bits/s (unsigned integer). The actual bitrate might be
744  * different from this target bitrate.
745  */
746 #define GST_TAG_NOMINAL_BITRATE        "nominal-bitrate"
747 /**
748  * GST_TAG_MINIMUM_BITRATE:
749  *
750  * minimum bitrate in bits/s (unsigned integer)
751  */
752 #define GST_TAG_MINIMUM_BITRATE        "minimum-bitrate"
753 /**
754  * GST_TAG_MAXIMUM_BITRATE:
755  *
756  * maximum bitrate in bits/s (unsigned integer)
757  */
758 #define GST_TAG_MAXIMUM_BITRATE        "maximum-bitrate"
759 /**
760  * GST_TAG_SERIAL:
761  *
762  * serial number of track (unsigned integer)
763  */
764 #define GST_TAG_SERIAL                 "serial"
765 /**
766  * GST_TAG_ENCODER:
767  *
768  * encoder used to encode this stream (string)
769  */
770 #define GST_TAG_ENCODER                "encoder"
771 /**
772  * GST_TAG_ENCODER_VERSION:
773  *
774  * version of the encoder used to encode this stream (unsigned integer)
775  */
776 #define GST_TAG_ENCODER_VERSION        "encoder-version"
777 /**
778  * GST_TAG_TRACK_GAIN:
779  *
780  * track gain in db (double)
781  */
782 #define GST_TAG_TRACK_GAIN             "replaygain-track-gain"
783 /**
784  * GST_TAG_TRACK_PEAK:
785  *
786  * peak of the track (double)
787  */
788 #define GST_TAG_TRACK_PEAK             "replaygain-track-peak"
789 /**
790  * GST_TAG_ALBUM_GAIN:
791  *
792  * album gain in db (double)
793  */
794 #define GST_TAG_ALBUM_GAIN             "replaygain-album-gain"
795 /**
796  * GST_TAG_ALBUM_PEAK:
797  *
798  * peak of the album (double)
799  */
800 #define GST_TAG_ALBUM_PEAK             "replaygain-album-peak"
801 /**
802  * GST_TAG_REFERENCE_LEVEL:
803  *
804  * reference level of track and album gain values (double)
805  *
806  * Since: 0.10.12
807  */
808 #define GST_TAG_REFERENCE_LEVEL        "replaygain-reference-level"
809 /**
810  * GST_TAG_LANGUAGE_CODE:
811  *
812  * ISO-639-2 or ISO-639-1 code for the language the content is in (string)
813  *
814  * There is utility API in libgsttag in gst-plugins-base to obtain a translated
815  * language name from the language code: gst_tag_get_language_name()
816  */
817 #define GST_TAG_LANGUAGE_CODE          "language-code"
818 /**
819  * GST_TAG_LANGUAGE_NAME:
820  *
821  * Name of the language the content is in (string)
822  *
823  * Free-form name of the language the content is in, if a language code
824  * is not available. This tag should not be set in addition to a language
825  * code. It is undefined what language or locale the language name is in.
826  *
827  * Since: 0.10.37
828  */
829 #define GST_TAG_LANGUAGE_NAME          "language-name"
830 /**
831  * GST_TAG_IMAGE:
832  *
833  * image (sample) (sample taglist should specify the content type and preferably
834  * also set "image-type" field as #GstTagImageType)
835  *
836  * Since: 0.10.6
837  */
838 #define GST_TAG_IMAGE                  "image"
839 /**
840  * GST_TAG_PREVIEW_IMAGE:
841  *
842  * image that is meant for preview purposes, e.g. small icon-sized version
843  * (sample) (sample taglist should specify the content type)
844  *
845  * Since: 0.10.7
846  */
847 #define GST_TAG_PREVIEW_IMAGE          "preview-image"
848
849 /**
850  * GST_TAG_ATTACHMENT:
851  *
852  * generic file attachment (sample) (sample taglist should specify the content
853  * type and if possible set "filename" to the file name of the
854  * attachment)
855  *
856  * Since: 0.10.21
857  */
858 #define GST_TAG_ATTACHMENT             "attachment"
859
860 /**
861  * GST_TAG_BEATS_PER_MINUTE:
862  *
863  * number of beats per minute in audio (double)
864  *
865  * Since: 0.10.12
866  */
867 #define GST_TAG_BEATS_PER_MINUTE       "beats-per-minute"
868
869 /**
870  * GST_TAG_KEYWORDS:
871  *
872  * comma separated keywords describing the content (string).
873  *
874  * Since: 0.10.21
875  */
876 #define GST_TAG_KEYWORDS               "keywords"
877
878 /**
879  * GST_TAG_GEO_LOCATION_NAME:
880  *
881  * human readable descriptive location of where the media has been recorded or
882  * produced. (string).
883  *
884  * Since: 0.10.21
885  */
886 #define GST_TAG_GEO_LOCATION_NAME               "geo-location-name"
887
888 /**
889  * GST_TAG_GEO_LOCATION_LATITUDE:
890  *
891  * geo latitude location of where the media has been recorded or produced in
892  * degrees according to WGS84 (zero at the equator, negative values for southern
893  * latitudes) (double).
894  *
895  * Since: 0.10.21
896  */
897 #define GST_TAG_GEO_LOCATION_LATITUDE               "geo-location-latitude"
898
899 /**
900  * GST_TAG_GEO_LOCATION_LONGITUDE:
901  *
902  * geo longitude location of where the media has been recorded or produced in
903  * degrees according to WGS84 (zero at the prime meridian in Greenwich/UK,
904  * negative values for western longitudes). (double).
905  *
906  * Since: 0.10.21
907  */
908 #define GST_TAG_GEO_LOCATION_LONGITUDE               "geo-location-longitude"
909
910 /**
911  * GST_TAG_GEO_LOCATION_ELEVATION:
912  *
913  * geo elevation of where the media has been recorded or produced in meters
914  * according to WGS84 (zero is average sea level) (double).
915  *
916  * Since: 0.10.21
917  */
918 #define GST_TAG_GEO_LOCATION_ELEVATION               "geo-location-elevation"
919 /**
920  * GST_TAG_GEO_LOCATION_COUNTRY:
921  *
922  * The country (english name) where the media has been produced (string).
923  *
924  * Since: 0.10.29
925  */
926 #define GST_TAG_GEO_LOCATION_COUNTRY                 "geo-location-country"
927 /**
928  * GST_TAG_GEO_LOCATION_CITY:
929  *
930  * The city (english name) where the media has been produced (string).
931  *
932  * Since: 0.10.29
933  */
934 #define GST_TAG_GEO_LOCATION_CITY                    "geo-location-city"
935 /**
936  * GST_TAG_GEO_LOCATION_SUBLOCATION:
937  *
938  * A location 'smaller' than GST_TAG_GEO_LOCATION_CITY that specifies better
939  * where the media has been produced. (e.g. the neighborhood) (string).
940  *
941  * This tag has been added as this is how it is handled/named in XMP's
942  * Iptc4xmpcore schema.
943  *
944  * Since: 0.10.29
945  */
946 #define GST_TAG_GEO_LOCATION_SUBLOCATION             "geo-location-sublocation"
947 /**
948  * GST_TAG_GEO_LOCATION_HORIZONTAL_ERROR:
949  *
950  * Represents the expected error on the horizontal positioning in
951  * meters (double).
952  *
953  * Since: 0.10.31
954  */
955 #define GST_TAG_GEO_LOCATION_HORIZONTAL_ERROR   "geo-location-horizontal-error"
956 /**
957  * GST_TAG_GEO_LOCATION_MOVEMENT_SPEED:
958  *
959  * Speed of the capturing device when performing the capture.
960  * Represented in m/s. (double)
961  *
962  * See also #GST_TAG_GEO_LOCATION_MOVEMENT_DIRECTION
963  *
964  * Since 0.10.30
965  */
966 #define GST_TAG_GEO_LOCATION_MOVEMENT_SPEED       "geo-location-movement-speed"
967 /**
968  * GST_TAG_GEO_LOCATION_MOVEMENT_DIRECTION:
969  *
970  * Indicates the movement direction of the device performing the capture
971  * of a media. It is represented as degrees in floating point representation,
972  * 0 means the geographic north, and increases clockwise (double from 0 to 360)
973  *
974  * See also #GST_TAG_GEO_LOCATION_CAPTURE_DIRECTION
975  *
976  * Since: 0.10.30
977  */
978 #define GST_TAG_GEO_LOCATION_MOVEMENT_DIRECTION "geo-location-movement-direction"
979 /**
980  * GST_TAG_GEO_LOCATION_CAPTURE_DIRECTION:
981  *
982  * Indicates the direction the device is pointing to when capturing
983  * a media. It is represented as degrees in floating point representation,
984  * 0 means the geographic north, and increases clockwise (double from 0 to 360)
985  *
986  * See also #GST_TAG_GEO_LOCATION_MOVEMENT_DIRECTION
987  *
988  * Since: 0.10.30
989  */
990 #define GST_TAG_GEO_LOCATION_CAPTURE_DIRECTION  "geo-location-capture-direction"
991 /**
992  * GST_TAG_SHOW_NAME:
993  *
994  * Name of the show, used for displaying (string)
995  *
996  * Since: 0.10.26
997  */
998 #define GST_TAG_SHOW_NAME                         "show-name"
999 /**
1000  * GST_TAG_SHOW_SORTNAME:
1001  *
1002  * Name of the show, used for sorting (string)
1003  *
1004  * Since: 0.10.26
1005  */
1006 #define GST_TAG_SHOW_SORTNAME                     "show-sortname"
1007 /**
1008  * GST_TAG_SHOW_EPISODE_NUMBER:
1009  *
1010  * Number of the episode within a season/show (unsigned integer)
1011  *
1012  * Since: 0.10.26
1013  */
1014 #define GST_TAG_SHOW_EPISODE_NUMBER               "show-episode-number"
1015 /**
1016  * GST_TAG_SHOW_SEASON_NUMBER:
1017  *
1018  * Number of the season of a show/series (unsigned integer)
1019  *
1020  * Since: 0.10.26
1021  */
1022 #define GST_TAG_SHOW_SEASON_NUMBER                "show-season-number"
1023 /**
1024  * GST_TAG_LYRICS:
1025  *
1026  * The lyrics of the media (string)
1027  *
1028  * Since: 0.10.26
1029  */
1030 #define GST_TAG_LYRICS                            "lyrics"
1031 /**
1032  * GST_TAG_COMPOSER_SORTNAME:
1033  *
1034  * The composer's name, used for sorting (string)
1035  *
1036  * Since: 0.10.26
1037  */
1038 #define GST_TAG_COMPOSER_SORTNAME                 "composer-sortname"
1039 /**
1040  * GST_TAG_GROUPING:
1041  *
1042  * Groups together media that are related and spans multiple tracks. An
1043  * example are multiple pieces of a concerto. (string)
1044  *
1045  * Since: 0.10.26
1046  */
1047 #define GST_TAG_GROUPING                          "grouping"
1048 /**
1049  * GST_TAG_USER_RATING:
1050  *
1051  * Rating attributed by a person (likely the application user).
1052  * The higher the value, the more the user likes this media
1053  * (unsigned int from 0 to 100)
1054  *
1055  * Since: 0.10.29
1056  */
1057 #define GST_TAG_USER_RATING                       "user-rating"
1058 /**
1059  * GST_TAG_DEVICE_MANUFACTURER:
1060  *
1061  * Manufacturer of the device used to create the media (string)
1062  *
1063  * Since: 0.10.30
1064  */
1065 #define GST_TAG_DEVICE_MANUFACTURER               "device-manufacturer"
1066 /**
1067  * GST_TAG_DEVICE_MODEL:
1068  *
1069  * Model of the device used to create the media (string)
1070  *
1071  * Since: 0.10.30
1072  */
1073 #define GST_TAG_DEVICE_MODEL                      "device-model"
1074 /**
1075  * GST_TAG_APPLICATION_NAME:
1076  *
1077  * Name of the application used to create the media (string)
1078  *
1079  * Since: 0.10.31
1080  */
1081 #define GST_TAG_APPLICATION_NAME                  "application-name"
1082 /**
1083  * GST_TAG_APPLICATION_DATA:
1084  *
1085  * Arbitrary application data (buffer)
1086  *
1087  * Some formats allow application's to add their own arbitrary data
1088  * into files. This data is application's dependent.
1089  *
1090  * Since: 0.10.31
1091  */
1092 #define GST_TAG_APPLICATION_DATA          "application-data"
1093 /**
1094  * GST_TAG_IMAGE_ORIENTATION:
1095  *
1096  * Represents the 'Orientation' tag from EXIF. Defines how the image
1097  * should be rotated and mirrored for display. (string)
1098  *
1099  * This tag has a predefined set of allowed values:
1100  *   "rotate-0"
1101  *   "rotate-90"
1102  *   "rotate-180"
1103  *   "rotate-270"
1104  *   "flip-rotate-0"
1105  *   "flip-rotate-90"
1106  *   "flip-rotate-180"
1107  *   "flip-rotate-270"
1108  *
1109  * The naming is adopted according to a possible transformation to perform
1110  * on the image to fix its orientation, obviously equivalent operations will
1111  * yield the same result.
1112  *
1113  * Rotations indicated by the values are in clockwise direction and
1114  * 'flip' means an horizontal mirroring.
1115  *
1116  * Since: 0.10.30
1117  */
1118 #define GST_TAG_IMAGE_ORIENTATION            "image-orientation"
1119
1120 G_END_DECLS
1121
1122 #endif /* __GST_TAGLIST_H__ */