gst_plugins_base/gst-libs/gst/tag/tag.h
changeset 0 0e761a78d257
child 8 4a7fac7dd34a
child 29 567bb019e3e3
equal deleted inserted replaced
-1:000000000000 0:0e761a78d257
       
     1 /* GStreamer
       
     2  * Copyright (C) 2003 Benjamin Otte <in7y118@public.uni-hamburg.de>
       
     3  *
       
     4  * This library is free software; you can redistribute it and/or
       
     5  * modify it under the terms of the GNU Library General Public
       
     6  * License as published by the Free Software Foundation; either
       
     7  * version 2 of the License, or (at your option) any later version.
       
     8  *
       
     9  * This library is distributed in the hope that it will be useful,
       
    10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
       
    12  * Library General Public License for more details.
       
    13  *
       
    14  * You should have received a copy of the GNU Library General Public
       
    15  * License along with this library; if not, write to the
       
    16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
       
    17  * Boston, MA 02111-1307, USA.
       
    18  */
       
    19 
       
    20 
       
    21 #ifndef __GST_TAG_TAG_H__
       
    22 #define __GST_TAG_TAG_H__
       
    23 
       
    24 #include <gst/gst.h>
       
    25 
       
    26 G_BEGIN_DECLS
       
    27 
       
    28 /* Tag names */
       
    29 
       
    30 /**
       
    31  * GST_TAG_MUSICBRAINZ_TRACKID
       
    32  *
       
    33  * MusicBrainz track ID
       
    34  */
       
    35 #define GST_TAG_MUSICBRAINZ_TRACKID	"musicbrainz-trackid"
       
    36 /**
       
    37  * GST_TAG_MUSICBRAINZ_ARTISTID
       
    38  *
       
    39  * MusicBrainz artist ID
       
    40  */
       
    41 #define GST_TAG_MUSICBRAINZ_ARTISTID	"musicbrainz-artistid"
       
    42 /**
       
    43  * GST_TAG_MUSICBRAINZ_ALBUMID
       
    44  *
       
    45  * MusicBrainz album ID
       
    46  */
       
    47 #define GST_TAG_MUSICBRAINZ_ALBUMID	"musicbrainz-albumid"
       
    48 /**
       
    49  * GST_TAG_MUSICBRAINZ_ALBUMARTISTID
       
    50  *
       
    51  * MusicBrainz album artist ID
       
    52  */
       
    53 #define GST_TAG_MUSICBRAINZ_ALBUMARTISTID	"musicbrainz-albumartistid"
       
    54 /**
       
    55  * GST_TAG_MUSICBRAINZ_TRMID
       
    56  *
       
    57  * MusicBrainz track TRM ID
       
    58  */
       
    59 #define GST_TAG_MUSICBRAINZ_TRMID	"musicbrainz-trmid"
       
    60 
       
    61 /* FIXME 0.11: remove GST_TAG_MUSICBRAINZ_SORTNAME */
       
    62 #ifndef GST_DISABLE_DEPRECATED
       
    63 /**
       
    64  * GST_TAG_MUSICBRAINZ_SORTNAME
       
    65  *
       
    66  * MusicBrainz artist sort name
       
    67  *
       
    68  * Deprecated.  Use GST_TAG_ARTIST_SORTNAME instead.
       
    69  */
       
    70 #define GST_TAG_MUSICBRAINZ_SORTNAME	GST_TAG_ARTIST_SORTNAME
       
    71 #endif
       
    72 
       
    73 /**
       
    74  * GST_TAG_CMML_STREAM
       
    75  *
       
    76  * Annodex CMML stream element tag
       
    77  */
       
    78 #define GST_TAG_CMML_STREAM "cmml-stream"
       
    79 /**
       
    80  * GST_TAG_CMML_HEAD
       
    81  *
       
    82  * Annodex CMML head element tag
       
    83  */
       
    84 
       
    85 #define GST_TAG_CMML_HEAD "cmml-head"
       
    86 /**
       
    87  * GST_TAG_CMML_CLIP
       
    88  *
       
    89  * Annodex CMML clip element tag
       
    90  */
       
    91 #define GST_TAG_CMML_CLIP "cmml-clip"
       
    92 
       
    93 /* CDDA tags */
       
    94 
       
    95 /**
       
    96  * GST_TAG_CDDA_CDDB_DISCID:
       
    97  *
       
    98  * CDDB disc id in its short form (e.g. 'aa063d0f')
       
    99  */
       
   100 #define GST_TAG_CDDA_CDDB_DISCID              "discid"
       
   101 
       
   102 /**
       
   103  * GST_TAG_CDDA_CDDB_DISCID_FULL:
       
   104  *
       
   105  * CDDB disc id including all details
       
   106  */
       
   107 #define GST_TAG_CDDA_CDDB_DISCID_FULL         "discid-full"
       
   108 
       
   109 /**
       
   110  * GST_TAG_CDDA_MUSICBRAINZ_DISCID:
       
   111  *
       
   112  * Musicbrainz disc id (e.g. 'ahg7JUcfR3vCYBphSDIogOOWrr0-')
       
   113  */
       
   114 #define GST_TAG_CDDA_MUSICBRAINZ_DISCID       "musicbrainz-discid"
       
   115 
       
   116 /**
       
   117  * GST_TAG_CDDA_MUSICBRAINZ_DISCID_FULL:
       
   118  *
       
   119  * Musicbrainz disc id details
       
   120  */
       
   121 #define GST_TAG_CDDA_MUSICBRAINZ_DISCID_FULL  "musicbrainz-discid-full"
       
   122 
       
   123 
       
   124 
       
   125 /* additional information for image tags */
       
   126 
       
   127 /**
       
   128  * GstTagImageType:
       
   129  * @GST_TAG_IMAGE_TYPE_UNDEFINED             : Undefined/other image type
       
   130  * @GST_TAG_IMAGE_TYPE_FRONT_COVER           : Cover (front)
       
   131  * @GST_TAG_IMAGE_TYPE_BACK_COVER            : Cover (back)
       
   132  * @GST_TAG_IMAGE_TYPE_LEAFLET_PAGE          : Leaflet page
       
   133  * @GST_TAG_IMAGE_TYPE_MEDIUM                : Medium (e.g. label side of CD)
       
   134  * @GST_TAG_IMAGE_TYPE_LEAD_ARTIST           : Lead artist/lead performer/soloist
       
   135  * @GST_TAG_IMAGE_TYPE_ARTIST                : Artist/performer
       
   136  * @GST_TAG_IMAGE_TYPE_CONDUCTOR             : Conductor
       
   137  * @GST_TAG_IMAGE_TYPE_BAND_ORCHESTRA        : Band/orchestra
       
   138  * @GST_TAG_IMAGE_TYPE_COMPOSER              : Composer
       
   139  * @GST_TAG_IMAGE_TYPE_LYRICIST              : Lyricist/text writer
       
   140  * @GST_TAG_IMAGE_TYPE_RECORDING_LOCATION    : Recording location
       
   141  * @GST_TAG_IMAGE_TYPE_DURING_RECORDING      : During recording
       
   142  * @GST_TAG_IMAGE_TYPE_DURING_PERFORMANCE    : During performance
       
   143  * @GST_TAG_IMAGE_TYPE_VIDEO_CAPTURE         : Movie/video screen capture
       
   144  * @GST_TAG_IMAGE_TYPE_FISH                  : A fish as funny as the ID3v2 spec
       
   145  * @GST_TAG_IMAGE_TYPE_ILLUSTRATION          : Illustration
       
   146  * @GST_TAG_IMAGE_TYPE_BAND_ARTIST_LOGO      : Band/artist logotype
       
   147  * @GST_TAG_IMAGE_TYPE_PUBLISHER_STUDIO_LOGO : Publisher/studio logotype
       
   148  *
       
   149  * Type of image contained in an image tag (specified as field in
       
   150  * the image buffer's caps structure)
       
   151  *
       
   152  * Since: 0.10.9
       
   153  */
       
   154 typedef enum {
       
   155   GST_TAG_IMAGE_TYPE_UNDEFINED,
       
   156   GST_TAG_IMAGE_TYPE_FRONT_COVER,
       
   157   GST_TAG_IMAGE_TYPE_BACK_COVER,
       
   158   GST_TAG_IMAGE_TYPE_LEAFLET_PAGE,
       
   159   GST_TAG_IMAGE_TYPE_MEDIUM,
       
   160   GST_TAG_IMAGE_TYPE_LEAD_ARTIST,
       
   161   GST_TAG_IMAGE_TYPE_ARTIST,
       
   162   GST_TAG_IMAGE_TYPE_CONDUCTOR,
       
   163   GST_TAG_IMAGE_TYPE_BAND_ORCHESTRA,
       
   164   GST_TAG_IMAGE_TYPE_COMPOSER,
       
   165   GST_TAG_IMAGE_TYPE_LYRICIST,
       
   166   GST_TAG_IMAGE_TYPE_RECORDING_LOCATION,
       
   167   GST_TAG_IMAGE_TYPE_DURING_RECORDING,
       
   168   GST_TAG_IMAGE_TYPE_DURING_PERFORMANCE,
       
   169   GST_TAG_IMAGE_TYPE_VIDEO_CAPTURE,
       
   170   GST_TAG_IMAGE_TYPE_FISH,
       
   171   GST_TAG_IMAGE_TYPE_ILLUSTRATION,
       
   172   GST_TAG_IMAGE_TYPE_BAND_ARTIST_LOGO,
       
   173   GST_TAG_IMAGE_TYPE_PUBLISHER_STUDIO_LOGO
       
   174 } GstTagImageType;
       
   175 
       
   176 #define GST_TYPE_TAG_IMAGE_TYPE  (gst_tag_image_type_get_type ())
       
   177 GType   gst_tag_image_type_get_type (void);
       
   178 
       
   179 
       
   180 /* functions for vorbis comment manipulation */
       
   181 #ifdef __SYMBIAN32__
       
   182 IMPORT_C
       
   183 #endif
       
   184 
       
   185 
       
   186 G_CONST_RETURN gchar *  gst_tag_from_vorbis_tag                 (const gchar *          vorbis_tag);
       
   187 #ifdef __SYMBIAN32__
       
   188 IMPORT_C
       
   189 #endif
       
   190 
       
   191 G_CONST_RETURN gchar *  gst_tag_to_vorbis_tag                   (const gchar *          gst_tag);
       
   192 #ifdef __SYMBIAN32__
       
   193 IMPORT_C
       
   194 #endif
       
   195 
       
   196 void                    gst_vorbis_tag_add                      (GstTagList *           list, 
       
   197                                                                  const gchar *          tag, 
       
   198                                                                  const gchar *          value);
       
   199 #ifdef __SYMBIAN32__
       
   200 IMPORT_C
       
   201 #endif
       
   202 
       
   203 
       
   204 GList *                 gst_tag_to_vorbis_comments              (const GstTagList *     list, 
       
   205                                                                  const gchar *          tag);
       
   206 
       
   207 /* functions to convert GstBuffers with vorbiscomment contents to GstTagLists and back */
       
   208 #ifdef __SYMBIAN32__
       
   209 IMPORT_C
       
   210 #endif
       
   211 
       
   212 GstTagList *            gst_tag_list_from_vorbiscomment_buffer  (const GstBuffer *      buffer,
       
   213                                                                  const guint8 *         id_data,
       
   214                                                                  const guint            id_data_length,
       
   215                                                                  gchar **               vendor_string);
       
   216 #ifdef __SYMBIAN32__
       
   217 IMPORT_C
       
   218 #endif
       
   219 
       
   220 GstBuffer *             gst_tag_list_to_vorbiscomment_buffer    (const GstTagList *     list,
       
   221                                                                  const guint8 *         id_data,
       
   222                                                                  const guint            id_data_length,
       
   223                                                                  const gchar *          vendor_string);
       
   224 
       
   225 /* functions for ID3 tag manipulation */
       
   226 #ifdef __SYMBIAN32__
       
   227 IMPORT_C
       
   228 #endif
       
   229 
       
   230 
       
   231 guint                   gst_tag_id3_genre_count                 (void);
       
   232 #ifdef __SYMBIAN32__
       
   233 IMPORT_C
       
   234 #endif
       
   235 
       
   236 G_CONST_RETURN gchar *  gst_tag_id3_genre_get                   (const guint            id);
       
   237 #ifdef __SYMBIAN32__
       
   238 IMPORT_C
       
   239 #endif
       
   240 
       
   241 GstTagList *            gst_tag_list_new_from_id3v1             (const guint8 *         data);
       
   242 #ifdef __SYMBIAN32__
       
   243 IMPORT_C
       
   244 #endif
       
   245 
       
   246 
       
   247 G_CONST_RETURN gchar *  gst_tag_from_id3_tag                    (const gchar *          id3_tag);
       
   248 #ifdef __SYMBIAN32__
       
   249 IMPORT_C
       
   250 #endif
       
   251 
       
   252 G_CONST_RETURN gchar *  gst_tag_from_id3_user_tag               (const gchar *          type,
       
   253                                                                  const gchar *          id3_user_tag);
       
   254 #ifdef __SYMBIAN32__
       
   255 IMPORT_C
       
   256 #endif
       
   257 
       
   258 G_CONST_RETURN gchar *  gst_tag_to_id3_tag                      (const gchar *          gst_tag);
       
   259 
       
   260 /* other tag-related functions */
       
   261 #ifdef __SYMBIAN32__
       
   262 IMPORT_C
       
   263 #endif
       
   264 
       
   265 
       
   266 gboolean                gst_tag_parse_extended_comment (const gchar  * ext_comment,
       
   267                                                         gchar       ** key,
       
   268                                                         gchar       ** lang,
       
   269                                                         gchar       ** value,
       
   270                                                         gboolean       fail_if_no_key);
       
   271 #ifdef __SYMBIAN32__
       
   272 IMPORT_C
       
   273 #endif
       
   274 
       
   275 
       
   276 gchar                 * gst_tag_freeform_string_to_utf8 (const gchar  * data,
       
   277                                                          gint           size,
       
   278                                                          const gchar ** env_vars);
       
   279 
       
   280 /* FIXME 0.11: replace with a more general gst_tag_library_init() */
       
   281 #ifdef __SYMBIAN32__
       
   282 IMPORT_C
       
   283 #endif
       
   284 
       
   285 void                    gst_tag_register_musicbrainz_tags (void);
       
   286 
       
   287 G_END_DECLS
       
   288 
       
   289 #endif /* __GST_TAG_TAG_H__ */