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