Repository URL to install this package:
Version:
7:2.7.1-1ubuntu3 ▾
|
<!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"/>
<title>FFmpeg: libavutil/error.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
</head>
<body>
<div id="top"><!-- do not remove this div! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">FFmpeg
 <span id="projectnumber">2.7.1</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File List</span></a></li>
<li><a href="globals.html"><span>Globals</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="headertitle">
<div class="title">libavutil/error.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="error_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * This file is part of FFmpeg.</span>
<a name="l00003"></a>00003 <span class="comment"> *</span>
<a name="l00004"></a>00004 <span class="comment"> * FFmpeg is free software; you can redistribute it and/or</span>
<a name="l00005"></a>00005 <span class="comment"> * modify it under the terms of the GNU Lesser General Public</span>
<a name="l00006"></a>00006 <span class="comment"> * License as published by the Free Software Foundation; either</span>
<a name="l00007"></a>00007 <span class="comment"> * version 2.1 of the License, or (at your option) any later version.</span>
<a name="l00008"></a>00008 <span class="comment"> *</span>
<a name="l00009"></a>00009 <span class="comment"> * FFmpeg is distributed in the hope that it will be useful,</span>
<a name="l00010"></a>00010 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00011"></a>00011 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span>
<a name="l00012"></a>00012 <span class="comment"> * Lesser General Public License for more details.</span>
<a name="l00013"></a>00013 <span class="comment"> *</span>
<a name="l00014"></a>00014 <span class="comment"> * You should have received a copy of the GNU Lesser General Public</span>
<a name="l00015"></a>00015 <span class="comment"> * License along with FFmpeg; if not, write to the Free Software</span>
<a name="l00016"></a>00016 <span class="comment"> * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA</span>
<a name="l00017"></a>00017 <span class="comment"> */</span>
<a name="l00018"></a>00018 <span class="comment"></span>
<a name="l00019"></a>00019 <span class="comment">/**</span>
<a name="l00020"></a>00020 <span class="comment"> * @file</span>
<a name="l00021"></a>00021 <span class="comment"> * error code definitions</span>
<a name="l00022"></a>00022 <span class="comment"> */</span>
<a name="l00023"></a>00023
<a name="l00024"></a>00024 <span class="preprocessor">#ifndef AVUTIL_ERROR_H</span>
<a name="l00025"></a>00025 <span class="preprocessor"></span><span class="preprocessor">#define AVUTIL_ERROR_H</span>
<a name="l00026"></a>00026 <span class="preprocessor"></span>
<a name="l00027"></a>00027 <span class="preprocessor">#include <errno.h></span>
<a name="l00028"></a>00028 <span class="preprocessor">#include <stddef.h></span>
<a name="l00029"></a>00029 <span class="comment"></span>
<a name="l00030"></a>00030 <span class="comment">/**</span>
<a name="l00031"></a>00031 <span class="comment"> * @addtogroup lavu_error</span>
<a name="l00032"></a>00032 <span class="comment"> *</span>
<a name="l00033"></a>00033 <span class="comment"> * @{</span>
<a name="l00034"></a>00034 <span class="comment"> */</span>
<a name="l00035"></a>00035
<a name="l00036"></a>00036
<a name="l00037"></a>00037 <span class="comment">/* error handling */</span>
<a name="l00038"></a>00038 <span class="preprocessor">#if EDOM > 0</span>
<a name="l00039"></a>00039 <span class="preprocessor"></span><span class="preprocessor">#define AVERROR(e) (-(e)) ///< Returns a negative error code from a POSIX error code, to return from library functions.</span>
<a name="l00040"></a>00040 <span class="preprocessor"></span><span class="preprocessor">#define AVUNERROR(e) (-(e)) ///< Returns a POSIX error code from a library function error return value.</span>
<a name="l00041"></a>00041 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00042"></a>00042 <span class="preprocessor"></span><span class="comment">/* Some platforms have E* and errno already negated. */</span>
<a name="l00043"></a><a class="code" href="group__lavu__error.html#gae4bb6f165973d09584e0ec0f335f69ca">00043</a> <span class="preprocessor">#define AVERROR(e) (e)</span>
<a name="l00044"></a><a class="code" href="group__lavu__error.html#ga025dbb21a4a9789dfb37a2b78f241026">00044</a> <span class="preprocessor"></span><span class="preprocessor">#define AVUNERROR(e) (e)</span>
<a name="l00045"></a>00045 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00046"></a>00046 <span class="preprocessor"></span>
<a name="l00047"></a><a class="code" href="group__lavu__error.html#gacfc46235e91e0770b94f7918013a1034">00047</a> <span class="preprocessor">#define FFERRTAG(a, b, c, d) (-(int)MKTAG(a, b, c, d))</span>
<a name="l00048"></a>00048 <span class="preprocessor"></span>
<a name="l00049"></a><a class="code" href="group__lavu__error.html#ga586e134e9dad8f57a218b2cd8734b601">00049</a> <span class="preprocessor">#define AVERROR_BSF_NOT_FOUND FFERRTAG(0xF8,'B','S','F') ///< Bitstream filter not found</span>
<a name="l00050"></a><a class="code" href="group__lavu__error.html#gaa102cde7ec5acbc099c3bcbb58556a18">00050</a> <span class="preprocessor"></span><span class="preprocessor">#define AVERROR_BUG FFERRTAG( 'B','U','G','!') ///< Internal bug, also see AVERROR_BUG2</span>
<a name="l00051"></a><a class="code" href="group__lavu__error.html#ga76077a6d42ee211f59712485bd977e40">00051</a> <span class="preprocessor"></span><span class="preprocessor">#define AVERROR_BUFFER_TOO_SMALL FFERRTAG( 'B','U','F','S') ///< Buffer too small</span>
<a name="l00052"></a><a class="code" href="group__lavu__error.html#ga28f845c3efcf791fdf3b2b3907330bf5">00052</a> <span class="preprocessor"></span><span class="preprocessor">#define AVERROR_DECODER_NOT_FOUND FFERRTAG(0xF8,'D','E','C') ///< Decoder not found</span>
<a name="l00053"></a><a class="code" href="group__lavu__error.html#gaf7cbadf2ff7121084d2cde763f4e06b9">00053</a> <span class="preprocessor"></span><span class="preprocessor">#define AVERROR_DEMUXER_NOT_FOUND FFERRTAG(0xF8,'D','E','M') ///< Demuxer not found</span>
<a name="l00054"></a><a class="code" href="group__lavu__error.html#ga3fad023a4fafed6b6ec9148606a61979">00054</a> <span class="preprocessor"></span><span class="preprocessor">#define AVERROR_ENCODER_NOT_FOUND FFERRTAG(0xF8,'E','N','C') ///< Encoder not found</span>
<a name="l00055"></a><a class="code" href="group__lavu__error.html#gab4faa0afdf35076914824200331defff">00055</a> <span class="preprocessor"></span><span class="preprocessor">#define AVERROR_EOF FFERRTAG( 'E','O','F',' ') ///< End of file</span>
<a name="l00056"></a><a class="code" href="group__lavu__error.html#ga334ea23fd9e492cd0e718330f2353b6b">00056</a> <span class="preprocessor"></span><span class="preprocessor">#define AVERROR_EXIT FFERRTAG( 'E','X','I','T') ///< Immediate exit was requested; the called function should not be restarted</span>
<a name="l00057"></a><a class="code" href="group__lavu__error.html#ga9c520e483ba8648495620ffdb4c491f2">00057</a> <span class="preprocessor"></span><span class="preprocessor">#define AVERROR_EXTERNAL FFERRTAG( 'E','X','T',' ') ///< Generic error in an external library</span>
<a name="l00058"></a><a class="code" href="group__lavu__error.html#ga2c3b3ab0404e827aeba274b571368e95">00058</a> <span class="preprocessor"></span><span class="preprocessor">#define AVERROR_FILTER_NOT_FOUND FFERRTAG(0xF8,'F','I','L') ///< Filter not found</span>
<a name="l00059"></a><a class="code" href="group__lavu__error.html#gaa6e5781e75b15ce44b0baea170c98a45">00059</a> <span class="preprocessor"></span><span class="preprocessor">#define AVERROR_INVALIDDATA FFERRTAG( 'I','N','D','A') ///< Invalid data found when processing input</span>
<a name="l00060"></a><a class="code" href="group__lavu__error.html#ga7ef1e1f3183e34e731185967d416911d">00060</a> <span class="preprocessor"></span><span class="preprocessor">#define AVERROR_MUXER_NOT_FOUND FFERRTAG(0xF8,'M','U','X') ///< Muxer not found</span>
<a name="l00061"></a><a class="code" href="group__lavu__error.html#gaf5a8745befceddae26f2dc11ecf21679">00061</a> <span class="preprocessor"></span><span class="preprocessor">#define AVERROR_OPTION_NOT_FOUND FFERRTAG(0xF8,'O','P','T') ///< Option not found</span>
<a name="l00062"></a><a class="code" href="group__lavu__error.html#ga67a27567a9e5b7037fee072fbcc34dbf">00062</a> <span class="preprocessor"></span><span class="preprocessor">#define AVERROR_PATCHWELCOME FFERRTAG( 'P','A','W','E') ///< Not yet implemented in FFmpeg, patches welcome</span>
<a name="l00063"></a><a class="code" href="group__lavu__error.html#ga474b367d2654695a79c07998329c7896">00063</a> <span class="preprocessor"></span><span class="preprocessor">#define AVERROR_PROTOCOL_NOT_FOUND FFERRTAG(0xF8,'P','R','O') ///< Protocol not found</span>
<a name="l00064"></a>00064 <span class="preprocessor"></span>
<a name="l00065"></a><a class="code" href="group__lavu__error.html#gab15683efe944a563b5c90dc6c5d5c17b">00065</a> <span class="preprocessor">#define AVERROR_STREAM_NOT_FOUND FFERRTAG(0xF8,'S','T','R') ///< Stream not found</span>
<a name="l00066"></a>00066 <span class="preprocessor"></span><span class="comment">/**</span>
<a name="l00067"></a>00067 <span class="comment"> * This is semantically identical to AVERROR_BUG</span>
<a name="l00068"></a>00068 <span class="comment"> * it has been introduced in Libav after our AVERROR_BUG and with a modified value.</span>
<a name="l00069"></a>00069 <span class="comment"> */</span>
<a name="l00070"></a><a class="code" href="group__lavu__error.html#gafdd5fd9898cc229e1856f858308d956e">00070</a> <span class="preprocessor">#define AVERROR_BUG2 FFERRTAG( 'B','U','G',' ')</span>
<a name="l00071"></a><a class="code" href="group__lavu__error.html#ga4ebaa288c7684a26a591c501208910e4">00071</a> <span class="preprocessor"></span><span class="preprocessor">#define AVERROR_UNKNOWN FFERRTAG( 'U','N','K','N') ///< Unknown error, typically from an external library</span>
<a name="l00072"></a><a class="code" href="group__lavu__error.html#ga3d2f16ec410d409c19e3547673b8469b">00072</a> <span class="preprocessor"></span><span class="preprocessor">#define AVERROR_EXPERIMENTAL (-0x2bb2afa8) ///< Requested feature is flagged experimental. Set strict_std_compliance if you really want to use it.</span>
<a name="l00073"></a><a class="code" href="group__lavu__error.html#gaa2999fcae06d67e3b9374f6c2c0ed559">00073</a> <span class="preprocessor"></span><span class="preprocessor">#define AVERROR_INPUT_CHANGED (-0x636e6701) ///< Input changed between calls. Reconfiguration is required. (can be OR-ed with AVERROR_OUTPUT_CHANGED)</span>
<a name="l00074"></a><a class="code" href="group__lavu__error.html#ga67501c4d8521285b405f555d2de71214">00074</a> <span class="preprocessor"></span><span class="preprocessor">#define AVERROR_OUTPUT_CHANGED (-0x636e6702) ///< Output changed between calls. Reconfiguration is required. (can be OR-ed with AVERROR_INPUT_CHANGED)</span>
<a name="l00075"></a>00075 <span class="preprocessor"></span><span class="comment">/* HTTP & RTSP errors */</span>
<a name="l00076"></a><a class="code" href="group__lavu__error.html#ga2a19ca30d1962b51488a7210e8b68919">00076</a> <span class="preprocessor">#define AVERROR_HTTP_BAD_REQUEST FFERRTAG(0xF8,'4','0','0')</span>
<a name="l00077"></a><a class="code" href="group__lavu__error.html#gacaebaf711c31f8ada97f87b42b58b794">00077</a> <span class="preprocessor"></span><span class="preprocessor">#define AVERROR_HTTP_UNAUTHORIZED FFERRTAG(0xF8,'4','0','1')</span>
<a name="l00078"></a><a class="code" href="group__lavu__error.html#ga114337140a3fec85cf76736f8e779659">00078</a> <span class="preprocessor"></span><span class="preprocessor">#define AVERROR_HTTP_FORBIDDEN FFERRTAG(0xF8,'4','0','3')</span>
<a name="l00079"></a><a class="code" href="group__lavu__error.html#gafa8673dfcb9f0359bb6f7dda408952c4">00079</a> <span class="preprocessor"></span><span class="preprocessor">#define AVERROR_HTTP_NOT_FOUND FFERRTAG(0xF8,'4','0','4')</span>
<a name="l00080"></a><a class="code" href="group__lavu__error.html#ga696de4031a2188bdd1ee330a6c11cd0c">00080</a> <span class="preprocessor"></span><span class="preprocessor">#define AVERROR_HTTP_OTHER_4XX FFERRTAG(0xF8,'4','X','X')</span>
<a name="l00081"></a><a class="code" href="group__lavu__error.html#ga47662fddadd1c84284b85154f5553afa">00081</a> <span class="preprocessor"></span><span class="preprocessor">#define AVERROR_HTTP_SERVER_ERROR FFERRTAG(0xF8,'5','X','X')</span>
<a name="l00082"></a>00082 <span class="preprocessor"></span>
<a name="l00083"></a><a class="code" href="group__lavu__error.html#ga326c3f741a7adb148cdeaad68eea713d">00083</a> <span class="preprocessor">#define AV_ERROR_MAX_STRING_SIZE 64</span>
<a name="l00084"></a>00084 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00085"></a>00085 <span class="comment">/**</span>
<a name="l00086"></a>00086 <span class="comment"> * Put a description of the AVERROR code errnum in errbuf.</span>
<a name="l00087"></a>00087 <span class="comment"> * In case of failure the global variable errno is set to indicate the</span>
<a name="l00088"></a>00088 <span class="comment"> * error. Even in case of failure av_strerror() will print a generic</span>
<a name="l00089"></a>00089 <span class="comment"> * error message indicating the errnum provided to errbuf.</span>
<a name="l00090"></a>00090 <span class="comment"> *</span>
<a name="l00091"></a>00091 <span class="comment"> * @param errnum error code to describe</span>
<a name="l00092"></a>00092 <span class="comment"> * @param errbuf buffer to which description is written</span>
<a name="l00093"></a>00093 <span class="comment"> * @param errbuf_size the size in bytes of errbuf</span>
<a name="l00094"></a>00094 <span class="comment"> * @return 0 on success, a negative value if a description for errnum</span>
<a name="l00095"></a>00095 <span class="comment"> * cannot be found</span>
<a name="l00096"></a>00096 <span class="comment"> */</span>
<a name="l00097"></a>00097 <span class="keywordtype">int</span> <a class="code" href="group__lavu__error.html#ga5792b4a2d18d7d9cb0efbcfc335dce24" title="Put a description of the AVERROR code errnum in errbuf.">av_strerror</a>(<span class="keywordtype">int</span> errnum, <span class="keywordtype">char</span> *errbuf, <span class="keywordtype">size_t</span> errbuf_size);
<a name="l00098"></a>00098 <span class="comment"></span>
<a name="l00099"></a>00099 <span class="comment">/**</span>
<a name="l00100"></a>00100 <span class="comment"> * Fill the provided buffer with a string containing an error string</span>
<a name="l00101"></a>00101 <span class="comment"> * corresponding to the AVERROR code errnum.</span>
<a name="l00102"></a>00102 <span class="comment"> *</span>
<a name="l00103"></a>00103 <span class="comment"> * @param errbuf a buffer</span>
<a name="l00104"></a>00104 <span class="comment"> * @param errbuf_size size in bytes of errbuf</span>
<a name="l00105"></a>00105 <span class="comment"> * @param errnum error code to describe</span>
<a name="l00106"></a>00106 <span class="comment"> * @return the buffer in input, filled with the error description</span>
<a name="l00107"></a>00107 <span class="comment"> * @see av_strerror()</span>
<a name="l00108"></a>00108 <span class="comment"> */</span>
<a name="l00109"></a><a class="code" href="group__lavu__error.html#ga1eb28ee6abc94ec8210a8cb721d792b8">00109</a> <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">char</span> *<a class="code" href="group__lavu__error.html#ga1eb28ee6abc94ec8210a8cb721d792b8" title="Fill the provided buffer with a string containing an error string corresponding to the AVERROR code e...">av_make_error_string</a>(<span class="keywordtype">char</span> *errbuf, <span class="keywordtype">size_t</span> errbuf_size, <span class="keywordtype">int</span> errnum)
<a name="l00110"></a>00110 {
<a name="l00111"></a>00111 <a class="code" href="group__lavu__error.html#ga5792b4a2d18d7d9cb0efbcfc335dce24" title="Put a description of the AVERROR code errnum in errbuf.">av_strerror</a>(errnum, errbuf, errbuf_size);
<a name="l00112"></a>00112 <span class="keywordflow">return</span> errbuf;
<a name="l00113"></a>00113 }
<a name="l00114"></a>00114 <span class="comment"></span>
<a name="l00115"></a>00115 <span class="comment">/**</span>
<a name="l00116"></a>00116 <span class="comment"> * Convenience macro, the return value should be used only directly in</span>
<a name="l00117"></a>00117 <span class="comment"> * function arguments but never stand-alone.</span>
<a name="l00118"></a>00118 <span class="comment"> */</span>
<a name="l00119"></a><a class="code" href="group__lavu__error.html#gac4f6e109c242c81aeee21868d3f35e12">00119</a> <span class="preprocessor">#define av_err2str(errnum) \</span>
<a name="l00120"></a>00120 <span class="preprocessor"> av_make_error_string((char[AV_ERROR_MAX_STRING_SIZE]){0}, AV_ERROR_MAX_STRING_SIZE, errnum)</span>
<a name="l00121"></a>00121 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00122"></a>00122 <span class="comment">/**</span>
<a name="l00123"></a>00123 <span class="comment"> * @}</span>
<a name="l00124"></a>00124 <span class="comment"> */</span>
<a name="l00125"></a>00125
<a name="l00126"></a>00126 <span class="preprocessor">#endif </span><span class="comment">/* AVUTIL_ERROR_H */</span>
</pre></div></div><!-- contents -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>
</body>
</html>