1 /* GStreamer
2  * Copyright (C) 2003 Benjamin Otte <in7y118@public.uni-hamburg.de>
3  * Copyright (C) 2006-2011 Tim-Philipp Müller <tim centricular net>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public
16  * License along with this library; if not, write to the
17  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  */
20 
21 
22 #ifndef __GST_TAG_TAG_H__
23 #define __GST_TAG_TAG_H__
24 
25 #include <gst/gst.h>
26 #include <gst/tag/tag-prelude.h>
27 #include <gst/tag/gsttagdemux.h>
28 #include <gst/tag/gsttagmux.h>
29 #include <gst/tag/xmpwriter.h>
30 #include <gst/tag/tag-enumtypes.h>
31 
32 G_BEGIN_DECLS
33 
34 /* Tag names */
35 
36 /**
37  * GST_TAG_MUSICBRAINZ_TRACKID:
38  *
39  * MusicBrainz track ID
40  */
41 #define GST_TAG_MUSICBRAINZ_TRACKID	"musicbrainz-trackid"
42 /**
43  * GST_TAG_MUSICBRAINZ_ARTISTID:
44  *
45  * MusicBrainz artist ID
46  */
47 #define GST_TAG_MUSICBRAINZ_ARTISTID	"musicbrainz-artistid"
48 /**
49  * GST_TAG_MUSICBRAINZ_ALBUMID:
50  *
51  * MusicBrainz album ID
52  */
53 #define GST_TAG_MUSICBRAINZ_ALBUMID	"musicbrainz-albumid"
54 /**
55  * GST_TAG_MUSICBRAINZ_ALBUMARTISTID:
56  *
57  * MusicBrainz album artist ID
58  */
59 #define GST_TAG_MUSICBRAINZ_ALBUMARTISTID	"musicbrainz-albumartistid"
60 /**
61  * GST_TAG_MUSICBRAINZ_TRMID:
62  *
63  * MusicBrainz track TRM ID
64  */
65 #define GST_TAG_MUSICBRAINZ_TRMID	"musicbrainz-trmid"
66 
67 /**
68  * GST_TAG_CMML_STREAM:
69  *
70  * Annodex CMML stream element tag
71  */
72 #define GST_TAG_CMML_STREAM "cmml-stream"
73 /**
74  * GST_TAG_CMML_HEAD:
75  *
76  * Annodex CMML head element tag
77  */
78 
79 #define GST_TAG_CMML_HEAD "cmml-head"
80 /**
81  * GST_TAG_CMML_CLIP:
82  *
83  * Annodex CMML clip element tag
84  */
85 #define GST_TAG_CMML_CLIP "cmml-clip"
86 /**
87  * GST_TAG_MUSICAL_KEY:
88  *
89  * Musical key in which the sound starts. It is represented as a string
90  * with a maximum length of three characters. The ground keys are
91  * represented with "A","B","C","D","E", "F" and "G" and halfkeys
92  * represented with "b" and "#". Minor is represented as "m" (e.g. "Dbm").
93  * Off key is represented with an "o" only.
94  * This notation might be extended in the future to support non-minor/major
95  * keys.
96  *
97  * Since: 1.2
98  */
99 #define GST_TAG_MUSICAL_KEY                   "musical-key"
100 
101 
102 /* CDDA tags */
103 
104 /**
105  * GST_TAG_CDDA_CDDB_DISCID:
106  *
107  * CDDB disc id in its short form (e.g. 'aa063d0f')
108  */
109 #define GST_TAG_CDDA_CDDB_DISCID              "discid"
110 
111 /**
112  * GST_TAG_CDDA_CDDB_DISCID_FULL:
113  *
114  * CDDB disc id including all details
115  */
116 #define GST_TAG_CDDA_CDDB_DISCID_FULL         "discid-full"
117 
118 /**
119  * GST_TAG_CDDA_MUSICBRAINZ_DISCID:
120  *
121  * Musicbrainz disc id (e.g. 'ahg7JUcfR3vCYBphSDIogOOWrr0-')
122  */
123 #define GST_TAG_CDDA_MUSICBRAINZ_DISCID       "musicbrainz-discid"
124 
125 /**
126  * GST_TAG_CDDA_MUSICBRAINZ_DISCID_FULL:
127  *
128  * Musicbrainz disc id details
129  */
130 #define GST_TAG_CDDA_MUSICBRAINZ_DISCID_FULL  "musicbrainz-discid-full"
131 
132 /**
133  * GST_TAG_CAPTURING_SHUTTER_SPEED:
134  *
135  * Shutter speed used when capturing an image, in seconds. (fraction)
136  */
137 #define GST_TAG_CAPTURING_SHUTTER_SPEED        "capturing-shutter-speed"
138 
139 /**
140  * GST_TAG_CAPTURING_FOCAL_RATIO:
141  *
142  * Focal ratio (f-number) used when capturing an image. (double)
143  *
144  * The value stored is the denominator of the focal ratio (f-number).
145  * For example, if this tag value is 2, the focal ratio is f/2.
146  */
147 #define GST_TAG_CAPTURING_FOCAL_RATIO          "capturing-focal-ratio"
148 
149 /**
150  * GST_TAG_CAPTURING_FOCAL_LENGTH:
151  *
152  * Focal length used when capturing an image, in mm. (double)
153  */
154 #define GST_TAG_CAPTURING_FOCAL_LENGTH         "capturing-focal-length"
155 
156 /**
157  * GST_TAG_CAPTURING_FOCAL_LENGTH_35_MM:
158  *
159  * 35 mm equivalent focal length used when capturing an image, in mm. (double)
160  *
161  * Since: 1.10
162  */
163 #define GST_TAG_CAPTURING_FOCAL_LENGTH_35_MM   "capturing-focal-length-35mm"
164 
165 /**
166  * GST_TAG_CAPTURING_DIGITAL_ZOOM_RATIO:
167  *
168  * Digital zoom ratio used when capturing an image. (double)
169  */
170 #define GST_TAG_CAPTURING_DIGITAL_ZOOM_RATIO   "capturing-digital-zoom-ratio"
171 
172 /**
173  * GST_TAG_CAPTURING_ISO_SPEED:
174  *
175  * ISO speed used when capturing an image. (integer)
176  */
177 #define GST_TAG_CAPTURING_ISO_SPEED           "capturing-iso-speed"
178 
179 /**
180  * GST_TAG_CAPTURING_EXPOSURE_PROGRAM:
181  *
182  * Type of exposure control used when capturing an image. (string)
183  *
184  * The allowed values are:
185  *   "undefined"
186  *   "manual"
187  *   "normal" - automatically controlled
188  *   "aperture-priority" - user selects aperture value
189  *   "shutter-priority" - user selects shutter speed
190  *   "creative" - biased towards depth of field
191  *   "action" - biased towards fast shutter speed
192  *   "portrait" - closeup, leaving background out of focus
193  *   "landscape" - landscape photos, background in focus
194  */
195 #define GST_TAG_CAPTURING_EXPOSURE_PROGRAM     "capturing-exposure-program"
196 
197 /**
198  * GST_TAG_CAPTURING_EXPOSURE_MODE:
199  *
200  * Exposure mode used when capturing an image. (string)
201  *
202  * The allowed values are:
203  *   "auto-exposure"
204  *   "manual-exposure"
205  *   "auto-bracket"
206  */
207 #define GST_TAG_CAPTURING_EXPOSURE_MODE       "capturing-exposure-mode"
208 
209 /**
210  * GST_TAG_CAPTURING_EXPOSURE_COMPENSATION:
211  *
212  * Exposure compensation using when capturing an image in EV. (double)
213  */
214 #define GST_TAG_CAPTURING_EXPOSURE_COMPENSATION "capturing-exposure-compensation"
215 
216 /**
217  * GST_TAG_CAPTURING_SCENE_CAPTURE_TYPE:
218  *
219  * Scene mode used when capturing an image. (string)
220  *
221  * The allowed values are:
222  *   "standard"
223  *   "landscape"
224  *   "portrait"
225  *   "night-scene"
226  */
227 #define GST_TAG_CAPTURING_SCENE_CAPTURE_TYPE  "capturing-scene-capture-type"
228 
229 /**
230  * GST_TAG_CAPTURING_GAIN_ADJUSTMENT:
231  *
232  * Gain adjustment applied to an image. (string)
233  *
234  * The allowed values are:
235  *   "none"
236  *   "low-gain-up"
237  *   "high-gain-up"
238  *   "low-gain-down"
239  *   "high-gain-down"
240  */
241 #define GST_TAG_CAPTURING_GAIN_ADJUSTMENT     "capturing-gain-adjustment"
242 
243 /**
244  * GST_TAG_CAPTURING_WHITE_BALANCE:
245  *
246  * White balance mode used when capturing an image. (string)
247  *
248  * The allowed values are:
249  *   "auto"
250  *   "manual"
251  *   "daylight"
252  *   "cloudy"
253  *   "tungsten"
254  *   "fluorescent"
255  *   "fluorescent h" (newer daylight-calibrated fluorescents)
256  *   "flash"
257  */
258 #define GST_TAG_CAPTURING_WHITE_BALANCE       "capturing-white-balance"
259 
260 /**
261  * GST_TAG_CAPTURING_CONTRAST:
262  *
263  * Direction of contrast processing applied when capturing an image. (string)
264  *
265  * The allowed values are:
266  *  "normal"
267  *  "soft"
268  *  "hard"
269  */
270 #define GST_TAG_CAPTURING_CONTRAST            "capturing-contrast"
271 
272 /**
273  * GST_TAG_CAPTURING_SATURATION:
274  *
275  * Direction of saturation processing applied when capturing an image. (string)
276  *
277  * The allowed values are:
278  *  "normal"
279  *  "low-saturation"
280  *  "high-saturation"
281  */
282 #define GST_TAG_CAPTURING_SATURATION          "capturing-saturation"
283 
284 /**
285  * GST_TAG_CAPTURING_SHARPNESS:
286  *
287  * Direction of sharpness processing applied when capturing an image. (string)
288  *
289  * The allowed values are:
290  *  "normal"
291  *  "soft"
292  *  "hard"
293  */
294 #define GST_TAG_CAPTURING_SHARPNESS          "capturing-sharpness"
295 
296 /**
297  * GST_TAG_CAPTURING_FLASH_FIRED:
298  *
299  * If flash was fired during the capture of an image. (boolean)
300  *
301  * Note that if this tag isn't present, it should not be assumed that
302  * the flash did not fire. It should be treated as unknown.
303  */
304 #define GST_TAG_CAPTURING_FLASH_FIRED         "capturing-flash-fired"
305 
306 /**
307  * GST_TAG_CAPTURING_FLASH_MODE:
308  *
309  * The flash mode selected during the capture of an image. (string)
310  *
311  * The allowed values are:
312  *  "auto"
313  *  "always"
314  *  "never"
315  */
316 #define GST_TAG_CAPTURING_FLASH_MODE         "capturing-flash-mode"
317 
318 /**
319  * GST_TAG_CAPTURING_METERING_MODE:
320  *
321  * Defines the way a camera determines the exposure. (string)
322  *
323  * The allowed values are:
324  *   "unknown"
325  *   "average"
326  *   "center-weighted-average"
327  *   "spot"
328  *   "multi-spot"
329  *   "pattern"
330  *   "partial"
331  *   "other"
332  */
333 #define GST_TAG_CAPTURING_METERING_MODE      "capturing-metering-mode"
334 
335 /**
336  * GST_TAG_CAPTURING_SOURCE:
337  *
338  * Indicates the source of capture. The device/medium used to do the
339  * capture. (string)
340  *
341  * Allowed values are:
342  *   "dsc" (= digital still camera)
343  *   "transparent-scanner"
344  *   "reflex-scanner"
345  *   "other"
346  */
347 #define GST_TAG_CAPTURING_SOURCE             "capturing-source"
348 
349 /**
350  * GST_TAG_IMAGE_HORIZONTAL_PPI:
351  *
352  * Media (image/video) intended horizontal pixel density in ppi. (double)
353  */
354 #define GST_TAG_IMAGE_HORIZONTAL_PPI         "image-horizontal-ppi"
355 /**
356  * GST_TAG_IMAGE_VERTICAL_PPI:
357  *
358  * Media (image/video) intended vertical pixel density in ppi. (double)
359  */
360 #define GST_TAG_IMAGE_VERTICAL_PPI           "image-vertical-ppi"
361 
362 
363 /* additional information for image tags */
364 
365 /**
366  * GstTagImageType:
367  * @GST_TAG_IMAGE_TYPE_NONE                  : No image type. Can be used to
368  *      tell functions such as gst_tag_image_data_to_image_sample() that no
369  *      image type should be set.
370  * @GST_TAG_IMAGE_TYPE_UNDEFINED             : Undefined/other image type
371  * @GST_TAG_IMAGE_TYPE_FRONT_COVER           : Cover (front)
372  * @GST_TAG_IMAGE_TYPE_BACK_COVER            : Cover (back)
373  * @GST_TAG_IMAGE_TYPE_LEAFLET_PAGE          : Leaflet page
374  * @GST_TAG_IMAGE_TYPE_MEDIUM                : Medium (e.g. label side of CD)
375  * @GST_TAG_IMAGE_TYPE_LEAD_ARTIST           : Lead artist/lead performer/soloist
376  * @GST_TAG_IMAGE_TYPE_ARTIST                : Artist/performer
377  * @GST_TAG_IMAGE_TYPE_CONDUCTOR             : Conductor
378  * @GST_TAG_IMAGE_TYPE_BAND_ORCHESTRA        : Band/orchestra
379  * @GST_TAG_IMAGE_TYPE_COMPOSER              : Composer
380  * @GST_TAG_IMAGE_TYPE_LYRICIST              : Lyricist/text writer
381  * @GST_TAG_IMAGE_TYPE_RECORDING_LOCATION    : Recording location
382  * @GST_TAG_IMAGE_TYPE_DURING_RECORDING      : During recording
383  * @GST_TAG_IMAGE_TYPE_DURING_PERFORMANCE    : During performance
384  * @GST_TAG_IMAGE_TYPE_VIDEO_CAPTURE         : Movie/video screen capture
385  * @GST_TAG_IMAGE_TYPE_FISH                  : A fish as funny as the ID3v2 spec
386  * @GST_TAG_IMAGE_TYPE_ILLUSTRATION          : Illustration
387  * @GST_TAG_IMAGE_TYPE_BAND_ARTIST_LOGO      : Band/artist logotype
388  * @GST_TAG_IMAGE_TYPE_PUBLISHER_STUDIO_LOGO : Publisher/studio logotype
389  *
390  * Type of image contained in an image tag (specified as "image-type" field in
391  * the info structure in the image's #GstSample)
392  */
393 /* Note: keep in sync with register_tag_image_type_enum() */
394 typedef enum {
395   GST_TAG_IMAGE_TYPE_NONE = -1,
396   GST_TAG_IMAGE_TYPE_UNDEFINED = 0,
397   GST_TAG_IMAGE_TYPE_FRONT_COVER,
398   GST_TAG_IMAGE_TYPE_BACK_COVER,
399   GST_TAG_IMAGE_TYPE_LEAFLET_PAGE,
400   GST_TAG_IMAGE_TYPE_MEDIUM,
401   GST_TAG_IMAGE_TYPE_LEAD_ARTIST,
402   GST_TAG_IMAGE_TYPE_ARTIST,
403   GST_TAG_IMAGE_TYPE_CONDUCTOR,
404   GST_TAG_IMAGE_TYPE_BAND_ORCHESTRA,
405   GST_TAG_IMAGE_TYPE_COMPOSER,
406   GST_TAG_IMAGE_TYPE_LYRICIST,
407   GST_TAG_IMAGE_TYPE_RECORDING_LOCATION,
408   GST_TAG_IMAGE_TYPE_DURING_RECORDING,
409   GST_TAG_IMAGE_TYPE_DURING_PERFORMANCE,
410   GST_TAG_IMAGE_TYPE_VIDEO_CAPTURE,
411   GST_TAG_IMAGE_TYPE_FISH,
412   GST_TAG_IMAGE_TYPE_ILLUSTRATION,
413   GST_TAG_IMAGE_TYPE_BAND_ARTIST_LOGO,
414   GST_TAG_IMAGE_TYPE_PUBLISHER_STUDIO_LOGO
415 } GstTagImageType;
416 
417 /**
418  * GST_TAG_ID3V2_HEADER_SIZE:
419  *
420  * ID3V2 header size considered minimum input for some functions such as
421  * gst_tag_list_from_id3v2_tag() and gst_tag_get_id3v2_tag_size() for example.
422  */
423 #define GST_TAG_ID3V2_HEADER_SIZE            10
424 
425 /* functions for vorbis comment manipulation */
426 
427 GST_TAG_API
428 const gchar *           gst_tag_from_vorbis_tag                 (const gchar *          vorbis_tag);
429 
430 GST_TAG_API
431 const gchar *           gst_tag_to_vorbis_tag                   (const gchar *          gst_tag);
432 
433 GST_TAG_API
434 void                    gst_vorbis_tag_add                      (GstTagList *           list,
435                                                                  const gchar *          tag,
436                                                                  const gchar *          value);
437 
438 GST_TAG_API
439 GList *                 gst_tag_to_vorbis_comments              (const GstTagList *     list,
440                                                                  const gchar *          tag);
441 
442 /* functions to convert GstBuffers with vorbiscomment contents to GstTagLists and back */
443 
444 GST_TAG_API
445 GstTagList *            gst_tag_list_from_vorbiscomment         (const guint8 *         data,
446                                                                  gsize                  size,
447                                                                  const guint8 *         id_data,
448                                                                  const guint            id_data_length,
449                                                                  gchar **               vendor_string);
450 
451 GST_TAG_API
452 GstTagList *            gst_tag_list_from_vorbiscomment_buffer  (GstBuffer *            buffer,
453                                                                  const guint8 *         id_data,
454                                                                  const guint            id_data_length,
455                                                                  gchar **               vendor_string);
456 
457 GST_TAG_API
458 GstBuffer *             gst_tag_list_to_vorbiscomment_buffer    (const GstTagList *     list,
459                                                                  const guint8 *         id_data,
460                                                                  const guint            id_data_length,
461                                                                  const gchar *          vendor_string);
462 
463 /* functions for ID3 tag manipulation */
464 
465 /* FIXME 0.11: inconsistent API naming: gst_tag_list_new_from_id3v1(), gst_tag_list_from_*_buffer(),
466  * gst_tag_list_from_id3v2_tag(). Also, note gst.tag.list_xyz() namespace vs. gst.tag_list_xyz(),
467  * which is a bit confusing and possibly doesn't map too well */
468 
469 GST_TAG_API
470 guint                   gst_tag_id3_genre_count                 (void);
471 
472 GST_TAG_API
473 const gchar *           gst_tag_id3_genre_get                   (const guint            id);
474 
475 GST_TAG_API
476 GstTagList *            gst_tag_list_new_from_id3v1             (const guint8 *         data);
477 
478 GST_TAG_API
479 const gchar *           gst_tag_from_id3_tag                    (const gchar *          id3_tag);
480 
481 GST_TAG_API
482 const gchar *           gst_tag_from_id3_user_tag               (const gchar *          type,
483                                                                  const gchar *          id3_user_tag);
484 
485 GST_TAG_API
486 const gchar *           gst_tag_to_id3_tag                      (const gchar *          gst_tag);
487 
488 GST_TAG_API
489 gboolean                gst_tag_list_add_id3_image (GstTagList   * tag_list,
490                                                     const guint8 * image_data,
491                                                     guint          image_data_len,
492                                                     guint          id3_picture_type);
493 
494 GST_TAG_API
495 GstTagList *            gst_tag_list_from_id3v2_tag (GstBuffer * buffer);
496 
497 GST_TAG_API
498 guint                   gst_tag_get_id3v2_tag_size  (GstBuffer * buffer);
499 
500 /* functions to  convert GstBuffers with xmp packets contents to GstTagLists and back */
501 
502 GST_TAG_API
503 GstTagList *            gst_tag_list_from_xmp_buffer (GstBuffer *  buffer);
504 
505 GST_TAG_API
506 GstBuffer *		          gst_tag_list_to_xmp_buffer   (const GstTagList * list,
507 							                                        gboolean read_only,
508 							                                        const gchar ** schemas);
509 
510 GST_TAG_API
511 const gchar**		        gst_tag_xmp_list_schemas     (void);
512 
513 /* functions related to exif */
514 
515 GST_TAG_API
516 GstBuffer *             gst_tag_list_to_exif_buffer (const GstTagList * taglist,
517                                                      gint byte_order,
518                                                      guint32 base_offset);
519 
520 GST_TAG_API
521 GstBuffer *             gst_tag_list_to_exif_buffer_with_tiff_header (const GstTagList * taglist);
522 
523 GST_TAG_API
524 GstTagList *            gst_tag_list_from_exif_buffer (GstBuffer * buffer,
525                                                        gint byte_order,
526                                                        guint32 base_offset);
527 
528 GST_TAG_API
529 GstTagList *            gst_tag_list_from_exif_buffer_with_tiff_header (
530                                                       GstBuffer * buffer);
531 
532 /* other tag-related functions */
533 
534 GST_TAG_API
535 gboolean                gst_tag_parse_extended_comment (const gchar  * ext_comment,
536                                                         gchar       ** key,
537                                                         gchar       ** lang,
538                                                         gchar       ** value,
539                                                         gboolean       fail_if_no_key);
540 
541 GST_TAG_API
542 gchar                 * gst_tag_freeform_string_to_utf8 (const gchar  * data,
543                                                          gint           size,
544                                                          const gchar ** env_vars);
545 
546 GST_TAG_API
547 GstSample             * gst_tag_image_data_to_image_sample (const guint8   * image_data,
548                                                             guint            image_data_len,
549                                                             GstTagImageType  image_type);
550 
551 /* FIXME 0.11: get rid of this awkward register/init function, see tags.c */
552 
553 GST_TAG_API
554 void                    gst_tag_register_musicbrainz_tags (void);
555 
556 
557 /* language tag related functions */
558 
559 GST_TAG_API
560 gchar **       gst_tag_get_language_codes (void);
561 
562 GST_TAG_API
563 const gchar *  gst_tag_get_language_name (const gchar * language_code);
564 
565 GST_TAG_API
566 const gchar *  gst_tag_get_language_code_iso_639_1 (const gchar * lang_code);
567 
568 GST_TAG_API
569 const gchar *  gst_tag_get_language_code_iso_639_2B (const gchar * lang_code);
570 
571 GST_TAG_API
572 const gchar *  gst_tag_get_language_code_iso_639_2T (const gchar * lang_code);
573 
574 GST_TAG_API
575 gboolean       gst_tag_check_language_code          (const gchar * lang_code);
576 
577 /**
578  * gst_tag_get_language_code:
579  * @lang_code: ISO-639 language code (e.g. "deu" or "ger" or "de")
580  *
581  * Convenience macro wrapping gst_tag_get_language_code_iso_639_1().
582  */
583 #define gst_tag_get_language_code(lang_code) \
584     gst_tag_get_language_code_iso_639_1(lang_code)
585 
586 
587 /* functions to deal with (mostly) Creative Commons licenses */
588 
589 /**
590  * GstTagLicenseFlags:
591  * @GST_TAG_LICENSE_PERMITS_REPRODUCTION: making multiple copies
592  *     is allowed
593  * @GST_TAG_LICENSE_PERMITS_DISTRIBUTION: distribution, public display
594  *     and public performance are allowed
595  * @GST_TAG_LICENSE_PERMITS_DERIVATIVE_WORKS: distribution of derivative
596  *     works is allowed
597  * @GST_TAG_LICENSE_PERMITS_SHARING: commercial derivatives are allowed,
598  *     but only non-commercial distribution is allowed
599  * @GST_TAG_LICENSE_REQUIRES_NOTICE: copyright and license notices
600  *     must be kept intact
601  * @GST_TAG_LICENSE_REQUIRES_ATTRIBUTION: credit must be given to
602  *     copyright holder and/or author
603  * @GST_TAG_LICENSE_REQUIRES_SHARE_ALIKE: derivative works must be
604  *     licensed under the same terms or compatible terms as the original work
605  * @GST_TAG_LICENSE_REQUIRES_SOURCE_CODE: source code (the preferred
606  *     form for making modifications) must be provided when exercising some
607  *     rights granted by the license
608  * @GST_TAG_LICENSE_REQUIRES_COPYLEFT: derivative and combined works
609  *     must be licensed under specified terms, similar to those of the original
610  *     work
611  * @GST_TAG_LICENSE_REQUIRES_LESSER_COPYLEFT: derivative works must be
612  *     licensed under specified terms, with at least the same conditions as
613  *     the original work; combinations with the work may be licensed under
614  *     different terms
615  * @GST_TAG_LICENSE_PROHIBITS_COMMERCIAL_USE: exercising rights for
616  *     commercial purposes is prohibited
617  * @GST_TAG_LICENSE_PROHIBITS_HIGH_INCOME_NATION_USE: use in a
618  *     non-developing country is prohibited
619  * @GST_TAG_LICENSE_CREATIVE_COMMONS_LICENSE: this license was created
620  *     by the Creative Commons project
621  * @GST_TAG_LICENSE_FREE_SOFTWARE_FOUNDATION_LICENSE: this license was
622  *     created by the Free Software Foundation (FSF)
623  *
624  * See http://creativecommons.org/ns for more information.
625  */
626 typedef enum {
627   GST_TAG_LICENSE_PERMITS_REPRODUCTION             = (1 << 0),
628   GST_TAG_LICENSE_PERMITS_DISTRIBUTION             = (1 << 1),
629   GST_TAG_LICENSE_PERMITS_DERIVATIVE_WORKS         = (1 << 2),
630   GST_TAG_LICENSE_PERMITS_SHARING                  = (1 << 3),
631 
632   GST_TAG_LICENSE_REQUIRES_NOTICE                  = (1 << 8),
633   GST_TAG_LICENSE_REQUIRES_ATTRIBUTION             = (1 << 9),
634   GST_TAG_LICENSE_REQUIRES_SHARE_ALIKE             = (1 << 10),
635   GST_TAG_LICENSE_REQUIRES_SOURCE_CODE             = (1 << 11),
636   GST_TAG_LICENSE_REQUIRES_COPYLEFT                = (1 << 12),
637   GST_TAG_LICENSE_REQUIRES_LESSER_COPYLEFT         = (1 << 13),
638 
639   GST_TAG_LICENSE_PROHIBITS_COMMERCIAL_USE         = (1 << 16),
640   GST_TAG_LICENSE_PROHIBITS_HIGH_INCOME_NATION_USE = (1 << 17),
641 
642   GST_TAG_LICENSE_CREATIVE_COMMONS_LICENSE         = (1 << 24),
643   GST_TAG_LICENSE_FREE_SOFTWARE_FOUNDATION_LICENSE = (1 << 25)
644 } GstTagLicenseFlags;
645 
646 GST_TAG_API
647 gchar **            gst_tag_get_licenses (void);
648 
649 GST_TAG_API
650 GstTagLicenseFlags  gst_tag_get_license_flags (const gchar * license_ref);
651 
652 GST_TAG_API
653 const gchar *       gst_tag_get_license_nick  (const gchar * license_ref);
654 
655 GST_TAG_API
656 const gchar *       gst_tag_get_license_title (const gchar * license_ref);
657 
658 GST_TAG_API
659 const gchar *       gst_tag_get_license_version (const gchar * license_ref);
660 
661 GST_TAG_API
662 const gchar *       gst_tag_get_license_description  (const gchar * license_ref);
663 
664 GST_TAG_API
665 const gchar *       gst_tag_get_license_jurisdiction (const gchar * license_ref);
666 
667 G_END_DECLS
668 
669 #endif /* __GST_TAG_TAG_H__ */
670