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