# ID3 tag utils

Contains various utility functions for plugins to parse or create ID3 tags and map ID3v2 identifiers to and from GStreamer identifiers.

## Functions

### gst_tag_from_id3_tag

    const gchar *
    gst_tag_from_id3_tag (const gchar * id3_tag)

Looks up the GStreamer tag for a ID3v2 tag.

Parameters:

`id3_tag` –

ID3v2 tag to convert to GStreamer tag

Returns ( [nullable]) –

The corresponding GStreamer tag or NULL if none exists.

### GstTag.prototype.tag_from_id3_tag

    function GstTag.prototype.tag_from_id3_tag(id3_tag: String): {
        // javascript wrapper for 'gst_tag_from_id3_tag'
    }

Looks up the GStreamer tag for a ID3v2 tag.

Parameters:

`id3_tag` (String) –

ID3v2 tag to convert to GStreamer tag

Returns (String) –

The corresponding GStreamer tag or NULL if none exists.

### GstTag.tag_from_id3_tag

    def GstTag.tag_from_id3_tag (id3_tag):
        #python wrapper for 'gst_tag_from_id3_tag'

Looks up the GStreamer tag for a ID3v2 tag.

Parameters:

`id3_tag` (str) –

ID3v2 tag to convert to GStreamer tag

Returns (str) –

The corresponding GStreamer tag or NULL if none exists.

### gst_tag_from_id3_user_tag

    const gchar *
    gst_tag_from_id3_user_tag (const gchar * type,
                               const gchar * id3_user_tag)

Looks up the GStreamer tag for an ID3v2 user tag (e.g. description in TXXX frame or owner in UFID frame).

Parameters:

`type` –

the type of ID3v2 user tag (e.g. "TXXX" or "UDIF")

`id3_user_tag` –

ID3v2 user tag to convert to GStreamer tag

Returns ( [nullable]) –

The corresponding GStreamer tag or NULL if none exists.

### GstTag.prototype.tag_from_id3_user_tag

    function GstTag.prototype.tag_from_id3_user_tag(type: String, id3_user_tag: String): {
        // javascript wrapper for 'gst_tag_from_id3_user_tag'
    }

Looks up the GStreamer tag for an ID3v2 user tag (e.g. description in TXXX frame or owner in UFID frame).

Parameters:

`type` (String) –

the type of ID3v2 user tag (e.g. "TXXX" or "UDIF")

`id3_user_tag` (String) –

ID3v2 user tag to convert to GStreamer tag

Returns (String) –

The corresponding GStreamer tag or NULL if none exists.

### GstTag.tag_from_id3_user_tag

    def GstTag.tag_from_id3_user_tag (type, id3_user_tag):
        #python wrapper for 'gst_tag_from_id3_user_tag'

Looks up the GStreamer tag for an ID3v2 user tag (e.g. description in TXXX frame or owner in UFID frame).

Parameters:

`type` (str) –

the type of ID3v2 user tag (e.g. "TXXX" or "UDIF")

`id3_user_tag` (str) –

ID3v2 user tag to convert to GStreamer tag

Returns (str) –

The corresponding GStreamer tag or NULL if none exists.

### gst_tag_id3_genre_count

    guint
    gst_tag_id3_genre_count ()

Gets the number of ID3v1 genres that can be identified. Winamp genres are included.

Returns –

the number of ID3v1 genres that can be identified

### GstTag.prototype.tag_id3_genre_count

    function GstTag.prototype.tag_id3_genre_count(): {
        // javascript wrapper for 'gst_tag_id3_genre_count'
    }

Gets the number of ID3v1 genres that can be identified. Winamp genres are included.

Returns (Number) –

the number of ID3v1 genres that can be identified

### GstTag.tag_id3_genre_count

    def GstTag.tag_id3_genre_count ():
        #python wrapper for 'gst_tag_id3_genre_count'

Gets the number of ID3v1 genres that can be identified. Winamp genres are included.

Returns (int) –

the number of ID3v1 genres that can be identified

### gst_tag_id3_genre_get

    const gchar *
    gst_tag_id3_genre_get (const guint id)

Gets the ID3v1 genre name for a given ID.

Parameters:

`id` –

ID of genre to query

Returns ( [nullable]) –

the genre or NULL if no genre is associated with that ID.

### GstTag.prototype.tag_id3_genre_get

    function GstTag.prototype.tag_id3_genre_get(id: Number): {
        // javascript wrapper for 'gst_tag_id3_genre_get'
    }

Gets the ID3v1 genre name for a given ID.

Parameters:

`id` (Number) –

ID of genre to query

Returns (String) –

the genre or NULL if no genre is associated with that ID.

### GstTag.tag_id3_genre_get

    def GstTag.tag_id3_genre_get (id):
        #python wrapper for 'gst_tag_id3_genre_get'

Gets the ID3v1 genre name for a given ID.

Parameters:

`id` (int) –

ID of genre to query

Returns (str) –

the genre or NULL if no genre is associated with that ID.

### gst_tag_list_add_id3_image

    gboolean
    gst_tag_list_add_id3_image (GstTagList * tag_list,
                                const guint8 * image_data,
                                guint image_data_len,
                                guint id3_picture_type)

Adds an image from an ID3 APIC frame (or similar, such as used in FLAC) to the given tag list. Also see gst_tag_image_data_to_image_sample for more information on image tags in GStreamer.

Parameters:

`tag_list` –

a tag list

`image_data` ( [arraylength=image_data_len]) –

the (encoded) image

`image_data_len` –

the length of the encoded image data at image_data

`id3_picture_type` –

picture type as per the ID3 (v2.4.0) specification for the APIC frame (0 = unknown/other)

Returns –

TRUE if the image was processed, otherwise FALSE

### GstTag.prototype.tag_list_add_id3_image

    function GstTag.prototype.tag_list_add_id3_image(tag_list: Gst.TagList, image_data: [ Number ], image_data_len: Number, id3_picture_type: Number): {
        // javascript wrapper for 'gst_tag_list_add_id3_image'
    }

Adds an image from an ID3 APIC frame (or similar, such as used in FLAC) to the given tag list. Also see GstTag.prototype.tag_image_data_to_image_sample for more information on image tags in GStreamer.

Parameters:

`tag_list` (Gst.TagList) –

a tag list

`image_data` ([ Number ]) –

the (encoded) image

`image_data_len` (Number) –

the length of the encoded image data at image_data

`id3_picture_type` (Number) –

picture type as per the ID3 (v2.4.0) specification for the APIC frame (0 = unknown/other)

Returns (Number) –

true if the image was processed, otherwise false

### GstTag.tag_list_add_id3_image

    def GstTag.tag_list_add_id3_image (tag_list, image_data, image_data_len, id3_picture_type):
        #python wrapper for 'gst_tag_list_add_id3_image'

Adds an image from an ID3 APIC frame (or similar, such as used in FLAC) to the given tag list. Also see GstTag.tag_image_data_to_image_sample for more information on image tags in GStreamer.

Parameters:

`tag_list` (Gst.TagList) –

a tag list

`image_data` ([ int ]) –

the (encoded) image

`image_data_len` (int) –

the length of the encoded image data at image_data

`id3_picture_type` (int) –

picture type as per the ID3 (v2.4.0) specification for the APIC frame (0 = unknown/other)

Returns (bool) –

True if the image was processed, otherwise False

### gst_tag_list_new_from_id3v1

    GstTagList *
    gst_tag_list_new_from_id3v1 (const guint8 * data)

Parses the data containing an ID3v1 tag and returns a GstTagList from the parsed data.

Parameters:

`data` ( [arrayfixed-size=128]) –

128 bytes of data containing the ID3v1 tag

Returns ( [transfer: full][nullable]) –

A new tag list or NULL if the data was not an ID3v1 tag.

### GstTag.prototype.tag_list_new_from_id3v1

    function GstTag.prototype.tag_list_new_from_id3v1(data: [ Number ]): {
        // javascript wrapper for 'gst_tag_list_new_from_id3v1'
    }

Parses the data containing an ID3v1 tag and returns a Gst.TagList from the parsed data.

Parameters:

`data` ([ Number ]) –

128 bytes of data containing the ID3v1 tag

Returns (Gst.TagList) –

A new tag list or NULL if the data was not an ID3v1 tag.

### GstTag.tag_list_new_from_id3v1

    def GstTag.tag_list_new_from_id3v1 (data):
        #python wrapper for 'gst_tag_list_new_from_id3v1'

Parses the data containing an ID3v1 tag and returns a Gst.TagList from the parsed data.

Parameters:

`data` ([ int ]) –

128 bytes of data containing the ID3v1 tag

Returns (Gst.TagList) –

A new tag list or NULL if the data was not an ID3v1 tag.

### gst_tag_to_id3_tag

    const gchar *
    gst_tag_to_id3_tag (const gchar * gst_tag)

Looks up the ID3v2 tag for a GStreamer tag.

Parameters:

`gst_tag` –

GStreamer tag to convert to vorbiscomment tag

Returns ( [nullable]) –

The corresponding ID3v2 tag or NULL if none exists.

### GstTag.prototype.tag_to_id3_tag

    function GstTag.prototype.tag_to_id3_tag(gst_tag: String): {
        // javascript wrapper for 'gst_tag_to_id3_tag'
    }

Looks up the ID3v2 tag for a GStreamer tag.

Parameters:

`gst_tag` (String) –

GStreamer tag to convert to vorbiscomment tag

Returns (String) –

The corresponding ID3v2 tag or NULL if none exists.

### GstTag.tag_to_id3_tag

    def GstTag.tag_to_id3_tag (gst_tag):
        #python wrapper for 'gst_tag_to_id3_tag'

Looks up the ID3v2 tag for a GStreamer tag.

Parameters:

`gst_tag` (str) –

GStreamer tag to convert to vorbiscomment tag

Returns (str) –

The corresponding ID3v2 tag or NULL if none exists.

The results of the search are