-
public string tag_freeform_string_to_utf8 (string data, int size, string env_vars)
Convenience function to read a string with unknown character encoding. If the string is already in
UTF-8 encoding, it will be returned right away. If not it tries to detect byte-order-mark for UTF-16/32 cases and use that.
Otherwise, the environment will be searched for a number of environment variables (whose names are specified in the NULL-terminated
string array are specified, the current locale will be tried. If that also doesn't work, WINDOWS-1252/ISO-8859-1 is assumed (which
will almost always succeed).
-
public unowned string tag_from_id3_tag (string id3_tag)
Looks up the GStreamer tag for a ID3v2 tag.
-
public unowned string tag_from_id3_user_tag (string type, string id3_user_tag)
Looks up the GStreamer tag for an ID3v2 user tag (e.g. description in TXXX frame or owner in UFID
frame).
-
public unowned string tag_from_vorbis_tag (string vorbis_tag)
Looks up the GStreamer tag for a vorbiscomment tag.
-
public unowned string tag_get_language_code_iso_639_1 (string lang_code)
Returns two-letter ISO-639-1 language code given a three-letter ISO-639-2 language code or two-letter
ISO-639-1 language code (both are accepted for convenience). Language codes are case-sensitive and expected to be lower case. or
NULL if no mapping is known. The returned string must not be modified or freed.
-
public unowned string tag_get_language_code_iso_639_2B (string lang_code)
Returns three-letter ISO-639-2 "bibliographic" language code given a two-letter ISO-639-1 language
code or a three-letter ISO-639-2 language code (both are accepted for convenience). The "bibliographic" code is derived from the
English name of the language (e.g. "ger" for German instead of "de" or "deu"). In most scenarios, the "terminological" codes are
prefered. Language codes are case-sensitive and expected to be lower case. or NULL if no mapping is known. The returned string must
not be modified or freed.
-
public unowned string tag_get_language_code_iso_639_2T (string lang_code)
Returns three-letter ISO-639-2 "terminological" language code given a two-letter ISO-639-1 language
code or a three-letter ISO-639-2 language code (both are accepted for convenience). The "terminological" code is derived from the
local name of the language (e.g. "deu" for German instead of "ger"). In most scenarios, the "terminological" codes are prefered over
the "bibliographic" ones. Language codes are case-sensitive and expected to be lower case. or NULL if no mapping is known. The
returned string must not be modified or freed.
-
public unowned string tag_get_language_codes ()
Returns a list of known language codes (in form of two-letter ISO-639-1 codes). This is useful for UIs
to build a list of available languages for tagging purposes (e.g. to tag an audio track appropriately in a video or audio editor).
with g_strfreev when no longer needed.
-
public unowned string tag_get_language_name (string language_code)
Returns the name of the language given an ISO-639 language code, such as often found in a
GST_TAG_LANGUAGE tag. The name will be translated according to the current locale (if the library was built against the iso-codes
package, otherwise the English name will be returned). Language codes are case-sensitive and expected to be lower case. not be
mapped to a language name. The returned string must not be modified and does not need to freed; it will stay valid until the
application is terminated.
-
public uint tag_id3_genre_count ()
Gets the number of ID3v1 genres that can be identified. Winamp genres are included.
-
public unowned string tag_id3_genre_get (uint id)
Gets the ID3v1 genre name for a given ID.
-
public Buffer tag_image_data_to_image_buffer (uchar image_data, uint image_data_len, TagImageType image_type)
Helper function for tag-reading plugins to create a
Buffer suitable to add to a
TagList as an image tag (such as
TAG_IMAGE or
TAG_PREVIEW_IMAGE) from the encoded image data and an
(optional) image type. blob of binary image data, often accompanied by a MIME type or some other content type string (e.g. 'png',
'jpeg', 'jpg'). Sometimes there is also an 'image type' to indicate what kind of image this is (e.g. front cover, back cover,
artist, etc.). The image data may also be an URI to the image rather than the image itself. In GStreamer, image tags are
Buffers containing the raw image data, with the buffer caps describing
the content type of the image (e.g. image/jpeg, image/png, text/uri-list). The buffer caps may contain an additional 'image-type'
field of GST_TYPE_TAG_IMAGE_TYPE to describe the type of image (front cover, back cover etc.).
TAG_PREVIEW_IMAGE tags should not carry an image type,
their type is already indicated via the special tag name. This function will do various checks and typefind the encoded image data
(we can't trust the declared mime type).
-
public bool tag_list_add_id3_image (TagList tag_list, uchar image_data, uint image_data_len, uint 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 tag_image_data_to_image_buffer for more information on
image tags in GStreamer.
-
public unowned TagList tag_list_from_exif_buffer (Buffer buffer, int byte_order, uint32 base_offset)
Parses the IFD and IFD tags data contained in the buffer and puts it on a taglist. The base_offset is
used to subtract from the offset in the tag entries and be able to get the offset relative to the buffer start
-
public unowned TagList tag_list_from_exif_buffer_with_tiff_header (Buffer buffer)
Parses the exif tags starting with a tiff header structure.
-
public TagList tag_list_from_vorbiscomment_buffer (Buffer buffer, uchar id_data, uint id_data_length, out string vendor_string)
Creates a new tag list that contains the information parsed out of a vorbiscomment packet. given
vorbiscomment buffer or NULL on error.
-
public unowned TagList tag_list_from_xmp_buffer (Buffer buffer)
Parse a xmp packet into a taglist.
-
public TagList tag_list_new_from_id3v1 (uchar data)
Parses the data containing an ID3v1 tag and returns a
TagList from the parsed data.
-
public weak Buffer tag_list_to_exif_buffer (TagList taglist, int byte_order, uint32 base_offset)
Formats the tags in taglist on exif format. The resulting buffer contains the tags IFD and is followed
by the data pointed by the tag entries.
-
public weak Buffer tag_list_to_exif_buffer_with_tiff_header (TagList taglist)
Formats the tags in taglist into exif structure, a tiff header is put in the beginning of the buffer.
-
public Buffer tag_list_to_vorbiscomment_buffer (TagList list, uchar id_data, uint id_data_length, string vendor_string)
Creates a new vorbiscomment buffer from a tag list. that could be converted from the given tag list.
-
public weak Buffer tag_list_to_xmp_buffer (TagList list, bool read_only)
Formats a taglist as a xmp packet.
-
public weak Buffer tag_list_to_xmp_buffer_full (TagList list, bool read_only, string schemas)
Formats a taglist as a xmp packet using only the selected schemas. An empty list (%NULL) means that
all schemas should be used
-
public bool tag_parse_extended_comment (string ext_comment, out string key, out string lang, out string value, bool fail_if_no_key)
Convenience function to parse a GST_TAG_EXTENDED_COMMENT string and separate it into its components.
If successful, key, lang and/or value will be set to newly allocated strings that you need to
free with g_free when done. key and lang may also
be set to NULL by this function if there is no key or no language code in the extended comment string.
-
public void tag_register_musicbrainz_tags ()
Registers additional musicbrainz-specific tags with the GStreamer tag system. Plugins and applications
that use these tags should call this function before using them. Can be called multiple times.
-
public unowned string tag_to_id3_tag (string gst_tag)
Looks up the ID3v2 tag for a GStreamer tag.
-
public List<string> tag_to_vorbis_comments (TagList list, string tag)
Creates a new tag list that contains the information parsed out of a vorbiscomment packet.
g_list_foreach (list, (GFunc) g_free, NULL) plus g_list_free (list)
-
public unowned string tag_to_vorbis_tag (string gst_tag)
Looks up the vorbiscomment tag for a GStreamer tag.
-
public unowned string tag_xmp_list_schemas ()
Gets the list of supported schemas in the xmp lib
-
public void vorbis_tag_add (TagList list, string tag, string value)
Convenience function using tag_from_vorbis_tag
, parsing a vorbis comment string into the right type and adding it to the given taglist list. Unknown
vorbiscomment tags will be added to the tag list in form of a
TAG_EXTENDED_COMMENT (since 0.10.10 at least).