blob: d8927efac20152dfc80427b1ae0a0db59de24c18 [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>gsttaglicenses</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.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-gsttaglanguagecodes.html" title="gsttaglanguagecodes">
<link rel="next" href="gstreamer-base-utils.html" title="Base Utils Library">
<meta name="generator" content="GTK-Doc V1.19 (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="2">
<tr valign="middle">
<td><a accesskey="p" href="gst-plugins-base-libs-gsttaglanguagecodes.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="gstreamer-tag.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GStreamer Base Plugins 1.0 Library Reference Manual</th>
<td><a accesskey="n" href="gstreamer-base-utils.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#gst-plugins-base-libs-gsttaglicenses.synopsis" class="shortcut">Top</a>
 | 
<a href="#gst-plugins-base-libs-gsttaglicenses.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="gst-plugins-base-libs-gsttaglicenses"></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-gsttaglicenses.top_of_page"></a>gsttaglicenses</span></h2>
<p>gsttaglicenses — utility functions for Creative Commons licenses</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="gst-plugins-base-libs-gsttaglicenses.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;gst/tag/tag.h&gt;
enum <a class="link" href="gst-plugins-base-libs-gsttaglicenses.html#GstTagLicenseFlags" title="enum GstTagLicenseFlags">GstTagLicenseFlags</a>;
<a class="link" href="gst-plugins-base-libs-gsttaglicenses.html#GstTagLicenseFlags" title="enum GstTagLicenseFlags"><span class="returnvalue">GstTagLicenseFlags</span></a> <a class="link" href="gst-plugins-base-libs-gsttaglicenses.html#gst-tag-get-license-flags" title="gst_tag_get_license_flags ()">gst_tag_get_license_flags</a> (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *license_ref</code></em>);
const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="gst-plugins-base-libs-gsttaglicenses.html#gst-tag-get-license-nick" title="gst_tag_get_license_nick ()">gst_tag_get_license_nick</a> (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *license_ref</code></em>);
const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="gst-plugins-base-libs-gsttaglicenses.html#gst-tag-get-license-title" title="gst_tag_get_license_title ()">gst_tag_get_license_title</a> (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *license_ref</code></em>);
const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="gst-plugins-base-libs-gsttaglicenses.html#gst-tag-get-license-description" title="gst_tag_get_license_description ()">gst_tag_get_license_description</a> (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *license_ref</code></em>);
const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="gst-plugins-base-libs-gsttaglicenses.html#gst-tag-get-license-jurisdiction" title="gst_tag_get_license_jurisdiction ()">gst_tag_get_license_jurisdiction</a> (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *license_ref</code></em>);
const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="gst-plugins-base-libs-gsttaglicenses.html#gst-tag-get-license-version" title="gst_tag_get_license_version ()">gst_tag_get_license_version</a> (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *license_ref</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> ** <a class="link" href="gst-plugins-base-libs-gsttaglicenses.html#gst-tag-get-licenses" title="gst_tag_get_licenses ()">gst_tag_get_licenses</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
</pre>
</div>
<div class="refsect1">
<a name="gst-plugins-base-libs-gsttaglicenses.description"></a><h2>Description</h2>
<p>
Provides information about Creative Commons media licenses, which are
often expressed in media files as a license URI in tags. Also useful
for applications creating media files, in case the user wants to license
the content under a Creative Commons license.
</p>
</div>
<div class="refsect1">
<a name="gst-plugins-base-libs-gsttaglicenses.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GstTagLicenseFlags"></a><h3>enum GstTagLicenseFlags</h3>
<pre class="programlisting">typedef enum {
GST_TAG_LICENSE_PERMITS_REPRODUCTION = (1 &lt;&lt; 0),
GST_TAG_LICENSE_PERMITS_DISTRIBUTION = (1 &lt;&lt; 1),
GST_TAG_LICENSE_PERMITS_DERIVATIVE_WORKS = (1 &lt;&lt; 2),
GST_TAG_LICENSE_PERMITS_SHARING = (1 &lt;&lt; 3),
GST_TAG_LICENSE_REQUIRES_NOTICE = (1 &lt;&lt; 8),
GST_TAG_LICENSE_REQUIRES_ATTRIBUTION = (1 &lt;&lt; 9),
GST_TAG_LICENSE_REQUIRES_SHARE_ALIKE = (1 &lt;&lt; 10),
GST_TAG_LICENSE_REQUIRES_SOURCE_CODE = (1 &lt;&lt; 11),
GST_TAG_LICENSE_REQUIRES_COPYLEFT = (1 &lt;&lt; 12),
GST_TAG_LICENSE_REQUIRES_LESSER_COPYLEFT = (1 &lt;&lt; 13),
GST_TAG_LICENSE_PROHIBITS_COMMERCIAL_USE = (1 &lt;&lt; 16),
GST_TAG_LICENSE_PROHIBITS_HIGH_INCOME_NATION_USE = (1 &lt;&lt; 17),
GST_TAG_LICENSE_CREATIVE_COMMONS_LICENSE = (1 &lt;&lt; 24),
GST_TAG_LICENSE_FREE_SOFTWARE_FOUNDATION_LICENSE = (1 &lt;&lt; 25)
} GstTagLicenseFlags;
</pre>
<p>
See http://creativecommons.org/ns for more information.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><a name="GST-TAG-LICENSE-PERMITS-REPRODUCTION:CAPS"></a><span class="term"><code class="literal">GST_TAG_LICENSE_PERMITS_REPRODUCTION</code></span></p></td>
<td>making multiple copies
is allowed
</td>
</tr>
<tr>
<td><p><a name="GST-TAG-LICENSE-PERMITS-DISTRIBUTION:CAPS"></a><span class="term"><code class="literal">GST_TAG_LICENSE_PERMITS_DISTRIBUTION</code></span></p></td>
<td>distribution, public display
and public performance are allowed
</td>
</tr>
<tr>
<td><p><a name="GST-TAG-LICENSE-PERMITS-DERIVATIVE-WORKS:CAPS"></a><span class="term"><code class="literal">GST_TAG_LICENSE_PERMITS_DERIVATIVE_WORKS</code></span></p></td>
<td>distribution of derivative
works is allowed
</td>
</tr>
<tr>
<td><p><a name="GST-TAG-LICENSE-PERMITS-SHARING:CAPS"></a><span class="term"><code class="literal">GST_TAG_LICENSE_PERMITS_SHARING</code></span></p></td>
<td>commercial derivatives are allowed,
but only non-commercial distribution is allowed
</td>
</tr>
<tr>
<td><p><a name="GST-TAG-LICENSE-REQUIRES-NOTICE:CAPS"></a><span class="term"><code class="literal">GST_TAG_LICENSE_REQUIRES_NOTICE</code></span></p></td>
<td>copyright and license notices
must be kept intact
</td>
</tr>
<tr>
<td><p><a name="GST-TAG-LICENSE-REQUIRES-ATTRIBUTION:CAPS"></a><span class="term"><code class="literal">GST_TAG_LICENSE_REQUIRES_ATTRIBUTION</code></span></p></td>
<td>credit must be given to
copyright holder and/or author
</td>
</tr>
<tr>
<td><p><a name="GST-TAG-LICENSE-REQUIRES-SHARE-ALIKE:CAPS"></a><span class="term"><code class="literal">GST_TAG_LICENSE_REQUIRES_SHARE_ALIKE</code></span></p></td>
<td>derivative works must be
licensed under the same terms or compatible terms as the original work
</td>
</tr>
<tr>
<td><p><a name="GST-TAG-LICENSE-REQUIRES-SOURCE-CODE:CAPS"></a><span class="term"><code class="literal">GST_TAG_LICENSE_REQUIRES_SOURCE_CODE</code></span></p></td>
<td>source code (the preferred
form for making modifications) must be provided when exercising some
rights granted by the license
</td>
</tr>
<tr>
<td><p><a name="GST-TAG-LICENSE-REQUIRES-COPYLEFT:CAPS"></a><span class="term"><code class="literal">GST_TAG_LICENSE_REQUIRES_COPYLEFT</code></span></p></td>
<td>derivative and combined works
must be licensed under specified terms, similar to those of the original
work
</td>
</tr>
<tr>
<td><p><a name="GST-TAG-LICENSE-REQUIRES-LESSER-COPYLEFT:CAPS"></a><span class="term"><code class="literal">GST_TAG_LICENSE_REQUIRES_LESSER_COPYLEFT</code></span></p></td>
<td>derivative works must be
licensed under specified terms, with at least the same conditions as
the original work; combinations with the work may be licensed under
different terms
</td>
</tr>
<tr>
<td><p><a name="GST-TAG-LICENSE-PROHIBITS-COMMERCIAL-USE:CAPS"></a><span class="term"><code class="literal">GST_TAG_LICENSE_PROHIBITS_COMMERCIAL_USE</code></span></p></td>
<td>exercising rights for
commercial purposes is prohibited
</td>
</tr>
<tr>
<td><p><a name="GST-TAG-LICENSE-PROHIBITS-HIGH-INCOME-NATION-USE:CAPS"></a><span class="term"><code class="literal">GST_TAG_LICENSE_PROHIBITS_HIGH_INCOME_NATION_USE</code></span></p></td>
<td>use in a
non-developing country is prohibited
</td>
</tr>
<tr>
<td><p><a name="GST-TAG-LICENSE-CREATIVE-COMMONS-LICENSE:CAPS"></a><span class="term"><code class="literal">GST_TAG_LICENSE_CREATIVE_COMMONS_LICENSE</code></span></p></td>
<td>this license was created
by the Creative Commons project
</td>
</tr>
<tr>
<td><p><a name="GST-TAG-LICENSE-FREE-SOFTWARE-FOUNDATION-LICENSE:CAPS"></a><span class="term"><code class="literal">GST_TAG_LICENSE_FREE_SOFTWARE_FOUNDATION_LICENSE</code></span></p></td>
<td>this license was
created by the Free Software Foundation (FSF)
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gst-tag-get-license-flags"></a><h3>gst_tag_get_license_flags ()</h3>
<pre class="programlisting"><a class="link" href="gst-plugins-base-libs-gsttaglicenses.html#GstTagLicenseFlags" title="enum GstTagLicenseFlags"><span class="returnvalue">GstTagLicenseFlags</span></a> gst_tag_get_license_flags (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *license_ref</code></em>);</pre>
<p>
Get the flags of a license, which describe most of the features of
a license in their most general form.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>license_ref</code></em> :</span></p></td>
<td>a license reference string in form of a URI,
e.g. "http://creativecommons.org/licenses/by-nc-nd/2.0/"</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the flags of the license, or 0 if the license is unknown</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gst-tag-get-license-nick"></a><h3>gst_tag_get_license_nick ()</h3>
<pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * gst_tag_get_license_nick (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *license_ref</code></em>);</pre>
<p>
Get the nick name of a license, which is a short (untranslated) string
such as e.g. "CC BY-NC-ND 2.0 UK".
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>license_ref</code></em> :</span></p></td>
<td>a license reference string in form of a URI,
e.g. "http://creativecommons.org/licenses/by-nc-nd/2.0/"</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the nick name of the license, or NULL if the license is unknown</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gst-tag-get-license-title"></a><h3>gst_tag_get_license_title ()</h3>
<pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * gst_tag_get_license_title (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *license_ref</code></em>);</pre>
<p>
Get the title of a license, which is a short translated description
of the license's features (generally not very pretty though).
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>license_ref</code></em> :</span></p></td>
<td>a license reference string in form of a URI,
e.g. "http://creativecommons.org/licenses/by-nc-nd/2.0/"</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the title of the license, or NULL if the license is unknown or
no title is available.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gst-tag-get-license-description"></a><h3>gst_tag_get_license_description ()</h3>
<pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * gst_tag_get_license_description (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *license_ref</code></em>);</pre>
<p>
Get the description of a license, which is a translated description
of the license's main features.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>license_ref</code></em> :</span></p></td>
<td>a license reference string in form of a URI,
e.g. "http://creativecommons.org/licenses/by-nc-nd/2.0/"</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the description of the license, or NULL if the license is unknown
or a description is not available.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gst-tag-get-license-jurisdiction"></a><h3>gst_tag_get_license_jurisdiction ()</h3>
<pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * gst_tag_get_license_jurisdiction (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *license_ref</code></em>);</pre>
<p>
Get the jurisdiction code of a license. This is usually a two-letter
ISO 3166-1 alpha-2 code, but there is also the special case of Scotland,
for which no code exists and which is thus represented as "scotland".
</p>
<p>
Known jurisdictions: ar, at, au, be, bg, br, ca, ch, cl, cn, co, de,
dk, es, fi, fr, hr, hu, il, in, it, jp, kr, mk, mt, mx, my, nl, pe, pl,
pt, scotland, se, si, tw, uk, us, za.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>license_ref</code></em> :</span></p></td>
<td>a license reference string in form of a URI,
e.g. "http://creativecommons.org/licenses/by-nc-nd/2.0/"</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the jurisdiction code of the license, or NULL if the license is
unknown or is not specific to a particular jurisdiction.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gst-tag-get-license-version"></a><h3>gst_tag_get_license_version ()</h3>
<pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * gst_tag_get_license_version (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *license_ref</code></em>);</pre>
<p>
Get the version of a license.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>license_ref</code></em> :</span></p></td>
<td>a license reference string in form of a URI,
e.g. "http://creativecommons.org/licenses/by-nc-nd/2.0/"</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the version of the license, or NULL if the license is not known or
has no version</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gst-tag-get-licenses"></a><h3>gst_tag_get_licenses ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> ** gst_tag_get_licenses (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Returns a list of known license references (in form of URIs). This is
useful for UIs to build a list of available licenses for tagging purposes
(e.g. to tag an audio track appropriately in a video or audio editor, or
an image in a camera application).
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>NULL-terminated array of license strings. Free
with <a href="http://library.gnome.org/devel/glib/unstable/glib-String-Utility-Functions.html#g-strfreev"><code class="function">g_strfreev()</code></a> when no longer needed. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr></tbody>
</table></div>
</div>
</div>
<div class="refsect1">
<a name="gst-plugins-base-libs-gsttaglicenses.see-also"></a><h2>See Also</h2>
<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstTagList.html#GstTagList"><span class="type">GstTagList</span></a>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.19</div>
</body>
</html>