blob: a005e9050431d82dc5e795ffdad645662ec79a8f [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>gsttagid3: GStreamer Base Plugins 1.0 Library Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="GStreamer Base Plugins 1.0 Library Reference Manual">
<link rel="up" href="gstreamer-tag.html" title="Tag Support Library">
<link rel="prev" href="gst-plugins-base-libs-gsttagvorbis.html" title="gsttagvorbis">
<link rel="next" href="gst-plugins-base-libs-gsttagexif.html" title="gsttagexif">
<meta name="generator" content="GTK-Doc V1.25 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
<a href="#gst-plugins-base-libs-gsttagid3.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="gstreamer-tag.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="gst-plugins-base-libs-gsttagvorbis.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="gst-plugins-base-libs-gsttagexif.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="gst-plugins-base-libs-gsttagid3"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gst-plugins-base-libs-gsttagid3.top_of_page"></a>gsttagid3</span></h2>
<p>gsttagid3 — tag mappings and support functions for plugins
dealing with ID3v1 and ID3v2 tags</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="gst-plugins-base-libs-gsttagid3.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
</td>
<td class="function_name">
<a class="link" href="gst-plugins-base-libs-gsttagid3.html#gst-tag-id3-genre-count" title="gst_tag_id3_genre_count ()">gst_tag_id3_genre_count</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="gst-plugins-base-libs-gsttagid3.html#gst-tag-id3-genre-get" title="gst_tag_id3_genre_get ()">gst_tag_id3_genre_get</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/gstreamer-1.0GstTagList.html#GstTagList-struct"><span class="returnvalue">GstTagList</span></a> *
</td>
<td class="function_name">
<a class="link" href="gst-plugins-base-libs-gsttagid3.html#gst-tag-list-new-from-id3v1" title="gst_tag_list_new_from_id3v1 ()">gst_tag_list_new_from_id3v1</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="gst-plugins-base-libs-gsttagid3.html#gst-tag-from-id3-tag" title="gst_tag_from_id3_tag ()">gst_tag_from_id3_tag</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="gst-plugins-base-libs-gsttagid3.html#gst-tag-from-id3-user-tag" title="gst_tag_from_id3_user_tag ()">gst_tag_from_id3_user_tag</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="gst-plugins-base-libs-gsttagid3.html#gst-tag-to-id3-tag" title="gst_tag_to_id3_tag ()">gst_tag_to_id3_tag</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="gst-plugins-base-libs-gsttagid3.html#gst-tag-list-add-id3-image" title="gst_tag_list_add_id3_image ()">gst_tag_list_add_id3_image</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
</td>
<td class="function_name">
<a class="link" href="gst-plugins-base-libs-gsttagid3.html#gst-tag-get-id3v2-tag-size" title="gst_tag_get_id3v2_tag_size ()">gst_tag_get_id3v2_tag_size</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/gstreamer-1.0GstTagList.html#GstTagList-struct"><span class="returnvalue">GstTagList</span></a> *
</td>
<td class="function_name">
<a class="link" href="gst-plugins-base-libs-gsttagid3.html#gst-tag-list-from-id3v2-tag" title="gst_tag_list_from_id3v2_tag ()">gst_tag_list_from_id3v2_tag</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="gst-plugins-base-libs-gsttagid3.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gst/tag/tag.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="gst-plugins-base-libs-gsttagid3.description"></a><h2>Description</h2>
<div class="refsect2">
<a name="id-1.2.13.5.5.2"></a><p>
Contains various utility functions for plugins to parse or create
ID3 tags and map ID3v2 identifiers to and from GStreamer identifiers.
</p>
</div>
</div>
<div class="refsect1">
<a name="gst-plugins-base-libs-gsttagid3.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gst-tag-id3-genre-count"></a><h3>gst_tag_id3_genre_count ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
gst_tag_id3_genre_count (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Gets the number of ID3v1 genres that can be identified. Winamp genres are
included.</p>
<div class="refsect3">
<a name="gst-tag-id3-genre-count.returns"></a><h4>Returns</h4>
<p> the number of ID3v1 genres that can be identified</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-tag-id3-genre-get"></a><h3>gst_tag_id3_genre_get ()</h3>
<pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gst_tag_id3_genre_get (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#guint"><span class="type">guint</span></a> id</code></em>);</pre>
<p>Gets the ID3v1 genre name for a given ID.</p>
<div class="refsect3">
<a name="gst-tag-id3-genre-get.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>id</p></td>
<td class="parameter_description"><p>ID of genre to query</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-tag-id3-genre-get.returns"></a><h4>Returns</h4>
<p> the genre or NULL if no genre is associated with that ID.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-tag-list-new-from-id3v1"></a><h3>gst_tag_list_new_from_id3v1 ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gstreamer-1.0GstTagList.html#GstTagList-struct"><span class="returnvalue">GstTagList</span></a> *
gst_tag_list_new_from_id3v1 (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *data</code></em>);</pre>
<p>Parses the data containing an ID3v1 tag and returns a <a href="/usr/share/gtk-doc/html/gstreamer-1.0GstTagList.html#GstTagList-struct"><span class="type">GstTagList</span></a> from the
parsed data.</p>
<div class="refsect3">
<a name="gst-tag-list-new-from-id3v1.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>128 bytes of data containing the ID3v1 tag</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-tag-list-new-from-id3v1.returns"></a><h4>Returns</h4>
<p> A new tag list or NULL if the data was not an ID3v1 tag.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-tag-from-id3-tag"></a><h3>gst_tag_from_id3_tag ()</h3>
<pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gst_tag_from_id3_tag (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *id3_tag</code></em>);</pre>
<p>Looks up the GStreamer tag for a ID3v2 tag.</p>
<div class="refsect3">
<a name="gst-tag-from-id3-tag.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>id3_tag</p></td>
<td class="parameter_description"><p>ID3v2 tag to convert to GStreamer tag</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-tag-from-id3-tag.returns"></a><h4>Returns</h4>
<p> The corresponding GStreamer tag or NULL if none exists.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-tag-from-id3-user-tag"></a><h3>gst_tag_from_id3_user_tag ()</h3>
<pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gst_tag_from_id3_user_tag (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *type</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *id3_user_tag</code></em>);</pre>
<p>Looks up the GStreamer tag for an ID3v2 user tag (e.g. description in
TXXX frame or owner in UFID frame).</p>
<div class="refsect3">
<a name="gst-tag-from-id3-user-tag.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>the type of ID3v2 user tag (e.g. "TXXX" or "UDIF")</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>id3_user_tag</p></td>
<td class="parameter_description"><p>ID3v2 user tag to convert to GStreamer tag</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-tag-from-id3-user-tag.returns"></a><h4>Returns</h4>
<p> The corresponding GStreamer tag or NULL if none exists.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-tag-to-id3-tag"></a><h3>gst_tag_to_id3_tag ()</h3>
<pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gst_tag_to_id3_tag (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *gst_tag</code></em>);</pre>
<p>Looks up the ID3v2 tag for a GStreamer tag.</p>
<div class="refsect3">
<a name="gst-tag-to-id3-tag.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>gst_tag</p></td>
<td class="parameter_description"><p>GStreamer tag to convert to vorbiscomment tag</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-tag-to-id3-tag.returns"></a><h4>Returns</h4>
<p> The corresponding ID3v2 tag or NULL if none exists.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-tag-list-add-id3-image"></a><h3>gst_tag_list_add_id3_image ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_tag_list_add_id3_image (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0GstTagList.html#GstTagList-struct"><span class="type">GstTagList</span></a> *tag_list</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *image_data</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#guint"><span class="type">guint</span></a> image_data_len</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#guint"><span class="type">guint</span></a> id3_picture_type</code></em>);</pre>
<p>Adds an image from an ID3 APIC frame (or similar, such as used in FLAC)
to the given tag list. Also see <a class="link" href="gst-plugins-base-libs-gsttag.html#gst-tag-image-data-to-image-sample" title="gst_tag_image_data_to_image_sample ()"><code class="function">gst_tag_image_data_to_image_sample()</code></a> for
more information on image tags in GStreamer.</p>
<div class="refsect3">
<a name="gst-tag-list-add-id3-image.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>tag_list</p></td>
<td class="parameter_description"><p>a tag list</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>image_data</p></td>
<td class="parameter_description"><p>the (encoded) image</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>image_data_len</p></td>
<td class="parameter_description"><p>the length of the encoded image data at <em class="parameter"><code>image_data</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>id3_picture_type</p></td>
<td class="parameter_description"><p>picture type as per the ID3 (v2.4.0) specification for
the APIC frame (0 = unknown/other)</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-tag-list-add-id3-image.returns"></a><h4>Returns</h4>
<p> <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the image was processed, otherwise <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-tag-get-id3v2-tag-size"></a><h3>gst_tag_get_id3v2_tag_size ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
gst_tag_get_id3v2_tag_size (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0GstBuffer.html#GstBuffer-struct"><span class="type">GstBuffer</span></a> *buffer</code></em>);</pre>
<p>Determines size of an ID3v2 tag on buffer containing at least ID3v2 header,
i.e. at least <a class="link" href="gst-plugins-base-libs-gsttag.html#GST-TAG-ID3V2-HEADER-SIZE:CAPS" title="GST_TAG_ID3V2_HEADER_SIZE"><span class="type">GST_TAG_ID3V2_HEADER_SIZE</span></a> (10) bytes;</p>
<div class="refsect3">
<a name="gst-tag-get-id3v2-tag-size.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>buffer holding ID3v2 tag (or at least the start of one)</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-tag-get-id3v2-tag-size.returns"></a><h4>Returns</h4>
<p> Size of tag, or 0 if header is invalid or too small.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-tag-list-from-id3v2-tag"></a><h3>gst_tag_list_from_id3v2_tag ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gstreamer-1.0GstTagList.html#GstTagList-struct"><span class="returnvalue">GstTagList</span></a> *
gst_tag_list_from_id3v2_tag (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0GstBuffer.html#GstBuffer-struct"><span class="type">GstBuffer</span></a> *buffer</code></em>);</pre>
<p>Creates a new tag list that contains the information parsed out of a
ID3 tag.</p>
<div class="refsect3">
<a name="gst-tag-list-from-id3v2-tag.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>buffer to convert</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-tag-list-from-id3v2-tag.returns"></a><h4>Returns</h4>
<p> A new <a href="/usr/share/gtk-doc/html/gstreamer-1.0GstTagList.html#GstTagList-struct"><span class="type">GstTagList</span></a> with all tags that could be extracted from the
given vorbiscomment buffer or NULL on error.</p>
</div>
</div>
</div>
<div class="refsect1">
<a name="gst-plugins-base-libs-gsttagid3.other_details"></a><h2>Types and Values</h2>
</div>
<div class="refsect1">
<a name="gst-plugins-base-libs-gsttagid3.see-also"></a><h2>See Also</h2>
<p><a href="/usr/share/gtk-doc/html/gstreamer-1.0GstTagList.html#GstTagList-struct"><span class="type">GstTagList</span></a></p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25</div>
</body>
</html>