1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-19 01:20:04 +02:00
audacity/lib-src/libflac/doc/html/api/group__flac__metadata__level0.html
2015-05-01 03:33:07 -05:00

310 lines
17 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.8"/>
<title>FLAC: FLAC/metadata.h: metadata level 0 interface</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">FLAC
&#160;<span id="projectnumber">1.3.1</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.8 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">FLAC/metadata.h: metadata level 0 interface<div class="ingroups"><a class="el" href="group__flac.html">FLAC C API</a> &raquo; <a class="el" href="group__flac__metadata.html">FLAC/metadata.h: metadata interfaces</a></div></div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga804b42d9da714199b4b383ce51078d51"><td class="memItemLeft" align="right" valign="top">FLAC__bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level0.html#ga804b42d9da714199b4b383ce51078d51">FLAC__metadata_get_streaminfo</a> (const char *filename, <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> *streaminfo)</td></tr>
<tr class="separator:ga804b42d9da714199b4b383ce51078d51"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1626af09cd39d4fa37d5b46ebe3790fd"><td class="memItemLeft" align="right" valign="top">FLAC__bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level0.html#ga1626af09cd39d4fa37d5b46ebe3790fd">FLAC__metadata_get_tags</a> (const char *filename, <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> **tags)</td></tr>
<tr class="separator:ga1626af09cd39d4fa37d5b46ebe3790fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0f47949dca514506718276205a4fae0b"><td class="memItemLeft" align="right" valign="top">FLAC__bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level0.html#ga0f47949dca514506718276205a4fae0b">FLAC__metadata_get_cuesheet</a> (const char *filename, <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> **cuesheet)</td></tr>
<tr class="separator:ga0f47949dca514506718276205a4fae0b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0c9cd22296400c8ce16ee1db011342cb"><td class="memItemLeft" align="right" valign="top">FLAC__bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level0.html#ga0c9cd22296400c8ce16ee1db011342cb">FLAC__metadata_get_picture</a> (const char *filename, <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> **picture, <a class="el" href="group__flac__format.html#gaf6d3e836cee023e0b8d897f1fdc9825d">FLAC__StreamMetadata_Picture_Type</a> type, const char *mime_type, const FLAC__byte *description, unsigned max_width, unsigned max_height, unsigned max_depth, unsigned max_colors)</td></tr>
<tr class="separator:ga0c9cd22296400c8ce16ee1db011342cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>The level 0 interface consists of individual routines to read the STREAMINFO, VORBIS_COMMENT, CUESHEET, and PICTURE blocks, requiring only a filename. </p>
<p>They try to skip any ID3v2 tag at the head of the file. </p>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga804b42d9da714199b4b383ce51078d51"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">FLAC__bool FLAC__metadata_get_streaminfo </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>filename</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> *&#160;</td>
<td class="paramname"><em>streaminfo</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Read the STREAMINFO metadata block of the given FLAC file. This function will try to skip any ID3v2 tag at the head of the file.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">filename</td><td>The path to the FLAC file to read. </td></tr>
<tr><td class="paramname">streaminfo</td><td>A pointer to space for the STREAMINFO block. Since <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> is a simple structure with no memory allocation involved, you pass the address of an existing structure. It need not be initialized. </td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Assertions:</dt><dd><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;filename != NULL </div>
</div><!-- fragment --> <div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;streaminfo != NULL </div>
</div><!-- fragment --> </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">FLAC__bool</td><td><code>true</code> if a valid STREAMINFO block was read from <em>filename</em>. Returns <code>false</code> if there was a memory allocation error, a file decoder error, or the file contained no STREAMINFO block. (A memory allocation error is possible because this function must set up a file decoder.) </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga1626af09cd39d4fa37d5b46ebe3790fd"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">FLAC__bool FLAC__metadata_get_tags </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>filename</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> **&#160;</td>
<td class="paramname"><em>tags</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Read the VORBIS_COMMENT metadata block of the given FLAC file. This function will try to skip any ID3v2 tag at the head of the file.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">filename</td><td>The path to the FLAC file to read. </td></tr>
<tr><td class="paramname">tags</td><td>The address where the returned pointer will be stored. The <em>tags</em> object must be deleted by the caller using <a class="el" href="group__flac__metadata__object.html#ga6b3159744a1e5c4ce9d349fd0ebae800">FLAC__metadata_object_delete()</a>. </td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Assertions:</dt><dd><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;filename != NULL </div>
</div><!-- fragment --> <div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;tags != NULL </div>
</div><!-- fragment --> </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">FLAC__bool</td><td><code>true</code> if a valid VORBIS_COMMENT block was read from <em>filename</em>, and <em>*tags</em> will be set to the address of the metadata structure. Returns <code>false</code> if there was a memory allocation error, a file decoder error, or the file contained no VORBIS_COMMENT block, and <em>*tags</em> will be set to <code>NULL</code>. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga0f47949dca514506718276205a4fae0b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">FLAC__bool FLAC__metadata_get_cuesheet </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>filename</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> **&#160;</td>
<td class="paramname"><em>cuesheet</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Read the CUESHEET metadata block of the given FLAC file. This function will try to skip any ID3v2 tag at the head of the file.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">filename</td><td>The path to the FLAC file to read. </td></tr>
<tr><td class="paramname">cuesheet</td><td>The address where the returned pointer will be stored. The <em>cuesheet</em> object must be deleted by the caller using <a class="el" href="group__flac__metadata__object.html#ga6b3159744a1e5c4ce9d349fd0ebae800">FLAC__metadata_object_delete()</a>. </td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Assertions:</dt><dd><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;filename != NULL </div>
</div><!-- fragment --> <div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;cuesheet != NULL </div>
</div><!-- fragment --> </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">FLAC__bool</td><td><code>true</code> if a valid CUESHEET block was read from <em>filename</em>, and <em>*cuesheet</em> will be set to the address of the metadata structure. Returns <code>false</code> if there was a memory allocation error, a file decoder error, or the file contained no CUESHEET block, and <em>*cuesheet</em> will be set to <code>NULL</code>. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga0c9cd22296400c8ce16ee1db011342cb"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">FLAC__bool FLAC__metadata_get_picture </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>filename</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> **&#160;</td>
<td class="paramname"><em>picture</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__flac__format.html#gaf6d3e836cee023e0b8d897f1fdc9825d">FLAC__StreamMetadata_Picture_Type</a>&#160;</td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>mime_type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const FLAC__byte *&#160;</td>
<td class="paramname"><em>description</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned&#160;</td>
<td class="paramname"><em>max_width</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned&#160;</td>
<td class="paramname"><em>max_height</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned&#160;</td>
<td class="paramname"><em>max_depth</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned&#160;</td>
<td class="paramname"><em>max_colors</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Read a PICTURE metadata block of the given FLAC file. This function will try to skip any ID3v2 tag at the head of the file. Since there can be more than one PICTURE block in a file, this function takes a number of parameters that act as constraints to the search. The PICTURE block with the largest area matching all the constraints will be returned, or <em>*picture</em> will be set to <code>NULL</code> if there was no such block.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">filename</td><td>The path to the FLAC file to read. </td></tr>
<tr><td class="paramname">picture</td><td>The address where the returned pointer will be stored. The <em>picture</em> object must be deleted by the caller using <a class="el" href="group__flac__metadata__object.html#ga6b3159744a1e5c4ce9d349fd0ebae800">FLAC__metadata_object_delete()</a>. </td></tr>
<tr><td class="paramname">type</td><td>The desired picture type. Use <code>-1</code> to mean "any type". </td></tr>
<tr><td class="paramname">mime_type</td><td>The desired MIME type, e.g. "image/jpeg". The string will be matched exactly. Use <code>NULL</code> to mean "any MIME type". </td></tr>
<tr><td class="paramname">description</td><td>The desired description. The string will be matched exactly. Use <code>NULL</code> to mean "any
description". </td></tr>
<tr><td class="paramname">max_width</td><td>The maximum width in pixels desired. Use <code></code>(unsigned)(-1) to mean "any width". </td></tr>
<tr><td class="paramname">max_height</td><td>The maximum height in pixels desired. Use <code></code>(unsigned)(-1) to mean "any height". </td></tr>
<tr><td class="paramname">max_depth</td><td>The maximum color depth in bits-per-pixel desired. Use <code></code>(unsigned)(-1) to mean "any depth". </td></tr>
<tr><td class="paramname">max_colors</td><td>The maximum number of colors desired. Use <code></code>(unsigned)(-1) to mean "any number of colors". </td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Assertions:</dt><dd><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;filename != NULL </div>
</div><!-- fragment --> <div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;picture != NULL </div>
</div><!-- fragment --> </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">FLAC__bool</td><td><code>true</code> if a valid PICTURE block was read from <em>filename</em>, and <em>*picture</em> will be set to the address of the metadata structure. Returns <code>false</code> if there was a memory allocation error, a file decoder error, or the file contained no PICTURE block, and <em>*picture</em> will be set to <code>NULL</code>. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
</div><!-- contents -->
<hr size="1">
<div class="copyright">
<!-- @@@ oh so hacky -->
<table>
<tr>
<td align="left">
Copyright (c) 2000-2009 Josh Coalson
Copyright (c) 2011-2014 Xiph.Org Foundation
</td>
<td width="1%" align="right">
<a href="http://sourceforge.net"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=13478&amp;type=1" width="88" height="31" border="0" alt="SourceForge.net Logo" /></a>
</td>
</tr>
</table>
</div>
<!-- Copyright (c) 2000-2009 Josh Coalson -->
<!-- Copyright (c) 2011-2014 Xiph.Org Foundation -->
<!-- Permission is granted to copy, distribute and/or modify this document -->
<!-- under the terms of the GNU Free Documentation License, Version 1.1 -->
<!-- or any later version published by the Free Software Foundation; -->
<!-- with no invariant sections. -->
<!-- A copy of the license can be found at http://www.gnu.org/copyleft/fdl.html -->
</body>
</html>