Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
ffmpeg-doc / usr / share / doc / ffmpeg-doc / api / avio_8h_source.html
Size: Mime:
<!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: libavformat/avio.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
   &#160;<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&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;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&#160;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">libavformat/avio.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="avio_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"> * copyright (c) 2001 Fabrice Bellard</span>
<a name="l00003"></a>00003 <span class="comment"> *</span>
<a name="l00004"></a>00004 <span class="comment"> * This file is part of FFmpeg.</span>
<a name="l00005"></a>00005 <span class="comment"> *</span>
<a name="l00006"></a>00006 <span class="comment"> * FFmpeg is free software; you can redistribute it and/or</span>
<a name="l00007"></a>00007 <span class="comment"> * modify it under the terms of the GNU Lesser General Public</span>
<a name="l00008"></a>00008 <span class="comment"> * License as published by the Free Software Foundation; either</span>
<a name="l00009"></a>00009 <span class="comment"> * version 2.1 of the License, or (at your option) any later version.</span>
<a name="l00010"></a>00010 <span class="comment"> *</span>
<a name="l00011"></a>00011 <span class="comment"> * FFmpeg is distributed in the hope that it will be useful,</span>
<a name="l00012"></a>00012 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00013"></a>00013 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</span>
<a name="l00014"></a>00014 <span class="comment"> * Lesser General Public License for more details.</span>
<a name="l00015"></a>00015 <span class="comment"> *</span>
<a name="l00016"></a>00016 <span class="comment"> * You should have received a copy of the GNU Lesser General Public</span>
<a name="l00017"></a>00017 <span class="comment"> * License along with FFmpeg; if not, write to the Free Software</span>
<a name="l00018"></a>00018 <span class="comment"> * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA</span>
<a name="l00019"></a>00019 <span class="comment"> */</span>
<a name="l00020"></a>00020 <span class="preprocessor">#ifndef AVFORMAT_AVIO_H</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span><span class="preprocessor">#define AVFORMAT_AVIO_H</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00023"></a>00023 <span class="comment">/**</span>
<a name="l00024"></a>00024 <span class="comment"> * @file</span>
<a name="l00025"></a>00025 <span class="comment"> * @ingroup lavf_io</span>
<a name="l00026"></a>00026 <span class="comment"> * Buffered I/O operations</span>
<a name="l00027"></a>00027 <span class="comment"> */</span>
<a name="l00028"></a>00028 
<a name="l00029"></a>00029 <span class="preprocessor">#include &lt;stdint.h&gt;</span>
<a name="l00030"></a>00030 
<a name="l00031"></a>00031 <span class="preprocessor">#include &quot;<a class="code" href="common_8h.html" title="common internal and external API header">libavutil/common.h</a>&quot;</span>
<a name="l00032"></a>00032 <span class="preprocessor">#include &quot;<a class="code" href="dict_8h.html" title="Public dictionary API.">libavutil/dict.h</a>&quot;</span>
<a name="l00033"></a>00033 <span class="preprocessor">#include &quot;<a class="code" href="log_8h.html">libavutil/log.h</a>&quot;</span>
<a name="l00034"></a>00034 
<a name="l00035"></a>00035 <span class="preprocessor">#include &quot;<a class="code" href="libavformat_2version_8h.html" title="Libavformat version macros.">libavformat/version.h</a>&quot;</span>
<a name="l00036"></a>00036 
<a name="l00037"></a><a class="code" href="avio_8h.html#a03ea0dfa113a05f4843bbfff69e0cd0a">00037</a> <span class="preprocessor">#define AVIO_SEEKABLE_NORMAL 0x0001 </span><span class="comment">/**&lt; Seeking works like for a local file */</span>
<a name="l00038"></a>00038 <span class="comment"></span>
<a name="l00039"></a>00039 <span class="comment">/**</span>
<a name="l00040"></a>00040 <span class="comment"> * Callback for checking whether to abort blocking functions.</span>
<a name="l00041"></a>00041 <span class="comment"> * AVERROR_EXIT is returned in this case by the interrupted</span>
<a name="l00042"></a>00042 <span class="comment"> * function. During blocking operations, callback is called with</span>
<a name="l00043"></a>00043 <span class="comment"> * opaque as parameter. If the callback returns 1, the</span>
<a name="l00044"></a>00044 <span class="comment"> * blocking operation will be aborted.</span>
<a name="l00045"></a>00045 <span class="comment"> *</span>
<a name="l00046"></a>00046 <span class="comment"> * No members can be added to this struct without a major bump, if</span>
<a name="l00047"></a>00047 <span class="comment"> * new elements have been added after this struct in AVFormatContext</span>
<a name="l00048"></a>00048 <span class="comment"> * or AVIOContext.</span>
<a name="l00049"></a>00049 <span class="comment"> */</span>
<a name="l00050"></a><a class="code" href="structAVIOInterruptCB.html">00050</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structAVIOInterruptCB.html" title="Callback for checking whether to abort blocking functions.">AVIOInterruptCB</a> {
<a name="l00051"></a><a class="code" href="structAVIOInterruptCB.html#aaa0292879cfd9099620952ed72344725">00051</a>     int (*<a class="code" href="structAVIOInterruptCB.html#aaa0292879cfd9099620952ed72344725">callback</a>)(<span class="keywordtype">void</span>*);
<a name="l00052"></a><a class="code" href="structAVIOInterruptCB.html#a873ae56fef71d27dca1088dfd55c2197">00052</a>     <span class="keywordtype">void</span> *<a class="code" href="structAVIOInterruptCB.html#a873ae56fef71d27dca1088dfd55c2197">opaque</a>;
<a name="l00053"></a>00053 } <a class="code" href="structAVIOInterruptCB.html" title="Callback for checking whether to abort blocking functions.">AVIOInterruptCB</a>;
<a name="l00054"></a>00054 <span class="comment"></span>
<a name="l00055"></a>00055 <span class="comment">/**</span>
<a name="l00056"></a>00056 <span class="comment"> * Directory entry types.</span>
<a name="l00057"></a>00057 <span class="comment"> */</span>
<a name="l00058"></a><a class="code" href="avio_8h.html#ae8a759e02fd6f14d13511b0e2acbf8fa">00058</a> <span class="keyword">enum</span> <a class="code" href="avio_8h.html#ae8a759e02fd6f14d13511b0e2acbf8fa" title="Directory entry types.">AVIODirEntryType</a> {
<a name="l00059"></a><a class="code" href="avio_8h.html#ae8a759e02fd6f14d13511b0e2acbf8faa159374019fec997c911704bc9f4913fc">00059</a>     <a class="code" href="avio_8h.html#ae8a759e02fd6f14d13511b0e2acbf8faa159374019fec997c911704bc9f4913fc">AVIO_ENTRY_UNKNOWN</a>,
<a name="l00060"></a><a class="code" href="avio_8h.html#ae8a759e02fd6f14d13511b0e2acbf8faa94369ed08fb8fb538f66d0bc4afb87a0">00060</a>     <a class="code" href="avio_8h.html#ae8a759e02fd6f14d13511b0e2acbf8faa94369ed08fb8fb538f66d0bc4afb87a0">AVIO_ENTRY_BLOCK_DEVICE</a>,
<a name="l00061"></a><a class="code" href="avio_8h.html#ae8a759e02fd6f14d13511b0e2acbf8faaa6fabb2ac2b94287358b30291555f4fe">00061</a>     <a class="code" href="avio_8h.html#ae8a759e02fd6f14d13511b0e2acbf8faaa6fabb2ac2b94287358b30291555f4fe">AVIO_ENTRY_CHARACTER_DEVICE</a>,
<a name="l00062"></a><a class="code" href="avio_8h.html#ae8a759e02fd6f14d13511b0e2acbf8faaa4e8174e86d09fd519fdda87dd413ccf">00062</a>     <a class="code" href="avio_8h.html#ae8a759e02fd6f14d13511b0e2acbf8faaa4e8174e86d09fd519fdda87dd413ccf">AVIO_ENTRY_DIRECTORY</a>,
<a name="l00063"></a><a class="code" href="avio_8h.html#ae8a759e02fd6f14d13511b0e2acbf8faa50f1bab52a8e512d72cda10de23919c8">00063</a>     <a class="code" href="avio_8h.html#ae8a759e02fd6f14d13511b0e2acbf8faa50f1bab52a8e512d72cda10de23919c8">AVIO_ENTRY_NAMED_PIPE</a>,
<a name="l00064"></a><a class="code" href="avio_8h.html#ae8a759e02fd6f14d13511b0e2acbf8faa9d66503948cd5fb104f78a746c36ad19">00064</a>     <a class="code" href="avio_8h.html#ae8a759e02fd6f14d13511b0e2acbf8faa9d66503948cd5fb104f78a746c36ad19">AVIO_ENTRY_SYMBOLIC_LINK</a>,
<a name="l00065"></a><a class="code" href="avio_8h.html#ae8a759e02fd6f14d13511b0e2acbf8faaef29e40d14ed3f01420981aceb7165d3">00065</a>     <a class="code" href="avio_8h.html#ae8a759e02fd6f14d13511b0e2acbf8faaef29e40d14ed3f01420981aceb7165d3">AVIO_ENTRY_SOCKET</a>,
<a name="l00066"></a><a class="code" href="avio_8h.html#ae8a759e02fd6f14d13511b0e2acbf8faac05d4180a01efe6150b3688b17039a41">00066</a>     <a class="code" href="avio_8h.html#ae8a759e02fd6f14d13511b0e2acbf8faac05d4180a01efe6150b3688b17039a41">AVIO_ENTRY_FILE</a>,
<a name="l00067"></a><a class="code" href="avio_8h.html#ae8a759e02fd6f14d13511b0e2acbf8faa8b33d9a7f0316f61642a9d20ff1963fd">00067</a>     <a class="code" href="avio_8h.html#ae8a759e02fd6f14d13511b0e2acbf8faa8b33d9a7f0316f61642a9d20ff1963fd">AVIO_ENTRY_SERVER</a>,
<a name="l00068"></a><a class="code" href="avio_8h.html#ae8a759e02fd6f14d13511b0e2acbf8faa93302e48d86ab18cdd183499f1d4c144">00068</a>     <a class="code" href="avio_8h.html#ae8a759e02fd6f14d13511b0e2acbf8faa93302e48d86ab18cdd183499f1d4c144">AVIO_ENTRY_SHARE</a>,
<a name="l00069"></a><a class="code" href="avio_8h.html#ae8a759e02fd6f14d13511b0e2acbf8faa6357c355f9f895a515a8ffd215b5d383">00069</a>     <a class="code" href="avio_8h.html#ae8a759e02fd6f14d13511b0e2acbf8faa6357c355f9f895a515a8ffd215b5d383">AVIO_ENTRY_WORKGROUP</a>,
<a name="l00070"></a>00070 };
<a name="l00071"></a>00071 <span class="comment"></span>
<a name="l00072"></a>00072 <span class="comment">/**</span>
<a name="l00073"></a>00073 <span class="comment"> * Describes single entry of the directory.</span>
<a name="l00074"></a>00074 <span class="comment"> *</span>
<a name="l00075"></a>00075 <span class="comment"> * Only name and type fields are guaranteed be set.</span>
<a name="l00076"></a>00076 <span class="comment"> * Rest of fields are protocol or/and platform dependent and might be unknown.</span>
<a name="l00077"></a>00077 <span class="comment"> */</span>
<a name="l00078"></a><a class="code" href="structAVIODirEntry.html">00078</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structAVIODirEntry.html" title="Describes single entry of the directory.">AVIODirEntry</a> {
<a name="l00079"></a><a class="code" href="structAVIODirEntry.html#ac318bb2fb814386a2c8b9f8810150968">00079</a>     <span class="keywordtype">char</span> *<a class="code" href="structAVIODirEntry.html#ac318bb2fb814386a2c8b9f8810150968" title="Filename.">name</a>;                           <span class="comment">/**&lt; Filename */</span>
<a name="l00080"></a><a class="code" href="structAVIODirEntry.html#a45f4401b8f0d4fd3f8f94721a4b64e95">00080</a>     <span class="keywordtype">int</span> <a class="code" href="structAVIODirEntry.html#a45f4401b8f0d4fd3f8f94721a4b64e95" title="Type of the entry.">type</a>;                             <span class="comment">/**&lt; Type of the entry */</span>
<a name="l00081"></a><a class="code" href="structAVIODirEntry.html#adac43a980b06d1733d0fa7eb710264c9">00081</a>     <span class="keywordtype">int</span> <a class="code" href="structAVIODirEntry.html#adac43a980b06d1733d0fa7eb710264c9" title="Set to 1 when name is encoded with UTF-8, 0 otherwise.">utf8</a>;                             <span class="comment">/**&lt; Set to 1 when name is encoded with UTF-8, 0 otherwise.</span>
<a name="l00082"></a>00082 <span class="comment">                                               Name can be encoded with UTF-8 even though 0 is set. */</span>
<a name="l00083"></a><a class="code" href="structAVIODirEntry.html#ab1caef8258ac2d327a40acfac50305ab">00083</a>     int64_t <a class="code" href="structAVIODirEntry.html#ab1caef8258ac2d327a40acfac50305ab" title="File size in bytes, -1 if unknown.">size</a>;                         <span class="comment">/**&lt; File size in bytes, -1 if unknown. */</span>
<a name="l00084"></a><a class="code" href="structAVIODirEntry.html#adbf0f163a9b4bae0fcce8c86240f8852">00084</a>     int64_t <a class="code" href="structAVIODirEntry.html#adbf0f163a9b4bae0fcce8c86240f8852" title="Time of last modification in microseconds since unix epoch, -1 if unknown.">modification_timestamp</a>;       <span class="comment">/**&lt; Time of last modification in microseconds since unix</span>
<a name="l00085"></a>00085 <span class="comment">                                               epoch, -1 if unknown. */</span>
<a name="l00086"></a><a class="code" href="structAVIODirEntry.html#a48066fb5b7af54a64b0b87c4e8fe0fab">00086</a>     int64_t <a class="code" href="structAVIODirEntry.html#a48066fb5b7af54a64b0b87c4e8fe0fab" title="Time of last access in microseconds since unix epoch,.">access_timestamp</a>;             <span class="comment">/**&lt; Time of last access in microseconds since unix epoch,</span>
<a name="l00087"></a>00087 <span class="comment">                                               -1 if unknown. */</span>
<a name="l00088"></a><a class="code" href="structAVIODirEntry.html#aa39ec74a8aaf27ea312da86a905d4293">00088</a>     int64_t <a class="code" href="structAVIODirEntry.html#aa39ec74a8aaf27ea312da86a905d4293" title="Time of last status change in microseconds since unix epoch, -1 if unknown.">status_change_timestamp</a>;      <span class="comment">/**&lt; Time of last status change in microseconds since unix</span>
<a name="l00089"></a>00089 <span class="comment">                                               epoch, -1 if unknown. */</span>
<a name="l00090"></a><a class="code" href="structAVIODirEntry.html#a0b85319602d578b0db7d90bf9cb5d33d">00090</a>     int64_t <a class="code" href="structAVIODirEntry.html#a0b85319602d578b0db7d90bf9cb5d33d" title="User ID of owner, -1 if unknown.">user_id</a>;                      <span class="comment">/**&lt; User ID of owner, -1 if unknown. */</span>
<a name="l00091"></a><a class="code" href="structAVIODirEntry.html#ab216aad5f996681f498158cc82803fe2">00091</a>     int64_t <a class="code" href="structAVIODirEntry.html#ab216aad5f996681f498158cc82803fe2" title="Group ID of owner, -1 if unknown.">group_id</a>;                     <span class="comment">/**&lt; Group ID of owner, -1 if unknown. */</span>
<a name="l00092"></a><a class="code" href="structAVIODirEntry.html#afebceb6dac39b4c5ec00eca13e2cacd3">00092</a>     int64_t <a class="code" href="structAVIODirEntry.html#afebceb6dac39b4c5ec00eca13e2cacd3" title="Unix file mode, -1 if unknown.">filemode</a>;                     <span class="comment">/**&lt; Unix file mode, -1 if unknown. */</span>
<a name="l00093"></a>00093 } <a class="code" href="structAVIODirEntry.html" title="Describes single entry of the directory.">AVIODirEntry</a>;
<a name="l00094"></a>00094 
<a name="l00095"></a><a class="code" href="structAVIODirContext.html">00095</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structAVIODirContext.html">AVIODirContext</a> {
<a name="l00096"></a><a class="code" href="structAVIODirContext.html#a10cfa45d4d4a2c5e3c9ff50c4702815d">00096</a>     <span class="keyword">struct </span>URLContext *<a class="code" href="structAVIODirContext.html#a10cfa45d4d4a2c5e3c9ff50c4702815d">url_context</a>;
<a name="l00097"></a>00097 } <a class="code" href="structAVIODirContext.html">AVIODirContext</a>;
<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"> * Bytestream IO Context.</span>
<a name="l00101"></a>00101 <span class="comment"> * New fields can be added to the end with minor version bumps.</span>
<a name="l00102"></a>00102 <span class="comment"> * Removal, reordering and changes to existing fields require a major</span>
<a name="l00103"></a>00103 <span class="comment"> * version bump.</span>
<a name="l00104"></a>00104 <span class="comment"> * sizeof(AVIOContext) must not be used outside libav*.</span>
<a name="l00105"></a>00105 <span class="comment"> *</span>
<a name="l00106"></a>00106 <span class="comment"> * @note None of the function pointers in AVIOContext should be called</span>
<a name="l00107"></a>00107 <span class="comment"> *       directly, they should only be set by the client application</span>
<a name="l00108"></a>00108 <span class="comment"> *       when implementing custom I/O. Normally these are set to the</span>
<a name="l00109"></a>00109 <span class="comment"> *       function pointers specified in avio_alloc_context()</span>
<a name="l00110"></a>00110 <span class="comment"> */</span>
<a name="l00111"></a><a class="code" href="structAVIOContext.html">00111</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> {<span class="comment"></span>
<a name="l00112"></a>00112 <span class="comment">    /**</span>
<a name="l00113"></a>00113 <span class="comment">     * A class for private options.</span>
<a name="l00114"></a>00114 <span class="comment">     *</span>
<a name="l00115"></a>00115 <span class="comment">     * If this AVIOContext is created by avio_open2(), av_class is set and</span>
<a name="l00116"></a>00116 <span class="comment">     * passes the options down to protocols.</span>
<a name="l00117"></a>00117 <span class="comment">     *</span>
<a name="l00118"></a>00118 <span class="comment">     * If this AVIOContext is manually allocated, then av_class may be set by</span>
<a name="l00119"></a>00119 <span class="comment">     * the caller.</span>
<a name="l00120"></a>00120 <span class="comment">     *</span>
<a name="l00121"></a>00121 <span class="comment">     * warning -- this field can be NULL, be sure to not pass this AVIOContext</span>
<a name="l00122"></a>00122 <span class="comment">     * to any av_opt_* functions in that case.</span>
<a name="l00123"></a>00123 <span class="comment">     */</span>
<a name="l00124"></a><a class="code" href="structAVIOContext.html#a25d3b039ac00850a25d7b772566db6a8">00124</a>     <span class="keyword">const</span> <a class="code" href="structAVClass.html" title="Describe the class of an AVClass context structure.">AVClass</a> *<a class="code" href="structAVIOContext.html#a25d3b039ac00850a25d7b772566db6a8" title="A class for private options.">av_class</a>;
<a name="l00125"></a><a class="code" href="structAVIOContext.html#a901e8fd2b978d40957c4ed0b77c2daf0">00125</a>     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *<a class="code" href="structAVIOContext.html#a901e8fd2b978d40957c4ed0b77c2daf0" title="Start of the buffer.">buffer</a>;  <span class="comment">/**&lt; Start of the buffer. */</span>
<a name="l00126"></a><a class="code" href="structAVIOContext.html#a0204148f407d72becba822b90e8ce9a6">00126</a>     <span class="keywordtype">int</span> <a class="code" href="structAVIOContext.html#a0204148f407d72becba822b90e8ce9a6" title="Maximum buffer size.">buffer_size</a>;        <span class="comment">/**&lt; Maximum buffer size */</span>
<a name="l00127"></a><a class="code" href="structAVIOContext.html#a3500915a7434270c42dffc80fafffa2d">00127</a>     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *<a class="code" href="structAVIOContext.html#a3500915a7434270c42dffc80fafffa2d" title="Current position in the buffer.">buf_ptr</a>; <span class="comment">/**&lt; Current position in the buffer */</span>
<a name="l00128"></a><a class="code" href="structAVIOContext.html#a0683d1a134b647c54f6d087d152c9a64">00128</a>     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *<a class="code" href="structAVIOContext.html#a0683d1a134b647c54f6d087d152c9a64" title="End of the data, may be less than buffer+buffer_size if the read function returned less data than req...">buf_end</a>; <span class="comment">/**&lt; End of the data, may be less than</span>
<a name="l00129"></a>00129 <span class="comment">                                 buffer+buffer_size if the read function returned</span>
<a name="l00130"></a>00130 <span class="comment">                                 less data than requested, e.g. for streams where</span>
<a name="l00131"></a>00131 <span class="comment">                                 no more data has been received yet. */</span>
<a name="l00132"></a><a class="code" href="structAVIOContext.html#afa97c079a10a48588f7b55f9dfff1e47">00132</a>     <span class="keywordtype">void</span> *<a class="code" href="structAVIOContext.html#afa97c079a10a48588f7b55f9dfff1e47" title="A private pointer, passed to the read/write/seek/...">opaque</a>;           <span class="comment">/**&lt; A private pointer, passed to the read/write/seek/...</span>
<a name="l00133"></a>00133 <span class="comment">                                 functions. */</span>
<a name="l00134"></a><a class="code" href="structAVIOContext.html#a89930f812df15d2d0108f9b65392fc00">00134</a>     int (*<a class="code" href="structAVIOContext.html#a89930f812df15d2d0108f9b65392fc00">read_packet</a>)(<span class="keywordtype">void</span> *<a class="code" href="structAVIOContext.html#afa97c079a10a48588f7b55f9dfff1e47" title="A private pointer, passed to the read/write/seek/...">opaque</a>, uint8_t *buf, <span class="keywordtype">int</span> buf_size);
<a name="l00135"></a><a class="code" href="structAVIOContext.html#ac1f448eea818eed8231336c087d9f257">00135</a>     int (*<a class="code" href="structAVIOContext.html#ac1f448eea818eed8231336c087d9f257">write_packet</a>)(<span class="keywordtype">void</span> *<a class="code" href="structAVIOContext.html#afa97c079a10a48588f7b55f9dfff1e47" title="A private pointer, passed to the read/write/seek/...">opaque</a>, uint8_t *buf, <span class="keywordtype">int</span> buf_size);
<a name="l00136"></a><a class="code" href="structAVIOContext.html#a0b4f06675c3ea2df5b455bd3334244fe">00136</a>     int64_t (*<a class="code" href="structAVIOContext.html#a0b4f06675c3ea2df5b455bd3334244fe">seek</a>)(<span class="keywordtype">void</span> *<a class="code" href="structAVIOContext.html#afa97c079a10a48588f7b55f9dfff1e47" title="A private pointer, passed to the read/write/seek/...">opaque</a>, int64_t offset, <span class="keywordtype">int</span> whence);
<a name="l00137"></a><a class="code" href="structAVIOContext.html#a7158ec9b44d75704ea5c2fa5ac28fd50">00137</a>     int64_t <a class="code" href="structAVIOContext.html#a7158ec9b44d75704ea5c2fa5ac28fd50" title="position in the file of the current buffer">pos</a>;            <span class="comment">/**&lt; position in the file of the current buffer */</span>
<a name="l00138"></a><a class="code" href="structAVIOContext.html#a06e6f0186fcf571355cee82e837dc339">00138</a>     <span class="keywordtype">int</span> <a class="code" href="structAVIOContext.html#a06e6f0186fcf571355cee82e837dc339" title="true if the next seek should flush">must_flush</a>;         <span class="comment">/**&lt; true if the next seek should flush */</span>
<a name="l00139"></a><a class="code" href="structAVIOContext.html#aa9214f54c01f07076e0a0718b2e9c27b">00139</a>     <span class="keywordtype">int</span> <a class="code" href="structAVIOContext.html#aa9214f54c01f07076e0a0718b2e9c27b" title="true if eof reached">eof_reached</a>;        <span class="comment">/**&lt; true if eof reached */</span>
<a name="l00140"></a><a class="code" href="structAVIOContext.html#aab6ff8baf51038f1557e817717baccba">00140</a>     <span class="keywordtype">int</span> <a class="code" href="structAVIOContext.html#aab6ff8baf51038f1557e817717baccba" title="true if open for writing">write_flag</a>;         <span class="comment">/**&lt; true if open for writing */</span>
<a name="l00141"></a><a class="code" href="structAVIOContext.html#aca19990941933d7573a485851c6b798e">00141</a>     <span class="keywordtype">int</span> <a class="code" href="structAVIOContext.html#aca19990941933d7573a485851c6b798e">max_packet_size</a>;
<a name="l00142"></a><a class="code" href="structAVIOContext.html#a949cd6dbd89e2d5d59f5c768754004ca">00142</a>     <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="structAVIOContext.html#a949cd6dbd89e2d5d59f5c768754004ca">checksum</a>;
<a name="l00143"></a><a class="code" href="structAVIOContext.html#a10cbe217c46aeb653d360a9391aff310">00143</a>     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *<a class="code" href="structAVIOContext.html#a10cbe217c46aeb653d360a9391aff310">checksum_ptr</a>;
<a name="l00144"></a><a class="code" href="structAVIOContext.html#a1f4226d3cfdda9f379397dbfb94f7d12">00144</a>     <span class="keywordtype">unsigned</span> long (*<a class="code" href="structAVIOContext.html#a1f4226d3cfdda9f379397dbfb94f7d12">update_checksum</a>)(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="structAVIOContext.html#a949cd6dbd89e2d5d59f5c768754004ca">checksum</a>, <span class="keyword">const</span> uint8_t *buf, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> size);
<a name="l00145"></a><a class="code" href="structAVIOContext.html#afb903b1d9614bfb59e8cc5213de3777b">00145</a>     <span class="keywordtype">int</span> <a class="code" href="structAVIOContext.html#afb903b1d9614bfb59e8cc5213de3777b" title="contains the error code or 0 if no error happened">error</a>;              <span class="comment">/**&lt; contains the error code or 0 if no error happened */</span><span class="comment"></span>
<a name="l00146"></a>00146 <span class="comment">    /**</span>
<a name="l00147"></a>00147 <span class="comment">     * Pause or resume playback for network streaming protocols - e.g. MMS.</span>
<a name="l00148"></a>00148 <span class="comment">     */</span>
<a name="l00149"></a><a class="code" href="structAVIOContext.html#ae757bb339926f29541871870c0701be4">00149</a>     int (*<a class="code" href="structAVIOContext.html#ae757bb339926f29541871870c0701be4" title="Pause or resume playback for network streaming protocols - e.g.">read_pause</a>)(<span class="keywordtype">void</span> *<a class="code" href="structAVIOContext.html#afa97c079a10a48588f7b55f9dfff1e47" title="A private pointer, passed to the read/write/seek/...">opaque</a>, <span class="keywordtype">int</span> pause);<span class="comment"></span>
<a name="l00150"></a>00150 <span class="comment">    /**</span>
<a name="l00151"></a>00151 <span class="comment">     * Seek to a given timestamp in stream with the specified stream_index.</span>
<a name="l00152"></a>00152 <span class="comment">     * Needed for some network streaming protocols which don&#39;t support seeking</span>
<a name="l00153"></a>00153 <span class="comment">     * to byte position.</span>
<a name="l00154"></a>00154 <span class="comment">     */</span>
<a name="l00155"></a><a class="code" href="structAVIOContext.html#a991d282ed4776fe71b438c68e289ef3e">00155</a>     int64_t (*<a class="code" href="structAVIOContext.html#a991d282ed4776fe71b438c68e289ef3e" title="Seek to a given timestamp in stream with the specified stream_index.">read_seek</a>)(<span class="keywordtype">void</span> *<a class="code" href="structAVIOContext.html#afa97c079a10a48588f7b55f9dfff1e47" title="A private pointer, passed to the read/write/seek/...">opaque</a>, <span class="keywordtype">int</span> stream_index,
<a name="l00156"></a>00156                          int64_t timestamp, <span class="keywordtype">int</span> flags);<span class="comment"></span>
<a name="l00157"></a>00157 <span class="comment">    /**</span>
<a name="l00158"></a>00158 <span class="comment">     * A combination of AVIO_SEEKABLE_ flags or 0 when the stream is not seekable.</span>
<a name="l00159"></a>00159 <span class="comment">     */</span>
<a name="l00160"></a><a class="code" href="structAVIOContext.html#a0e3c41c290b38923880b9cccb669bf78">00160</a>     <span class="keywordtype">int</span> <a class="code" href="structAVIOContext.html#a0e3c41c290b38923880b9cccb669bf78" title="A combination of AVIO_SEEKABLE_ flags or 0 when the stream is not seekable.">seekable</a>;
<a name="l00161"></a>00161 <span class="comment"></span>
<a name="l00162"></a>00162 <span class="comment">    /**</span>
<a name="l00163"></a>00163 <span class="comment">     * max filesize, used to limit allocations</span>
<a name="l00164"></a>00164 <span class="comment">     * This field is internal to libavformat and access from outside is not allowed.</span>
<a name="l00165"></a>00165 <span class="comment">     */</span>
<a name="l00166"></a><a class="code" href="structAVIOContext.html#a33e387aeb28b7a352c62ba8c30a214e7">00166</a>     int64_t <a class="code" href="structAVIOContext.html#a33e387aeb28b7a352c62ba8c30a214e7" title="max filesize, used to limit allocations This field is internal to libavformat and access from outside...">maxsize</a>;
<a name="l00167"></a>00167 <span class="comment"></span>
<a name="l00168"></a>00168 <span class="comment">    /**</span>
<a name="l00169"></a>00169 <span class="comment">     * avio_read and avio_write should if possible be satisfied directly</span>
<a name="l00170"></a>00170 <span class="comment">     * instead of going through a buffer, and avio_seek will always</span>
<a name="l00171"></a>00171 <span class="comment">     * call the underlying seek function directly.</span>
<a name="l00172"></a>00172 <span class="comment">     */</span>
<a name="l00173"></a><a class="code" href="structAVIOContext.html#af719be70947f5f8eebaa5f8ac58fd306">00173</a>     <span class="keywordtype">int</span> <a class="code" href="structAVIOContext.html#af719be70947f5f8eebaa5f8ac58fd306" title="avio_read and avio_write should if possible be satisfied directly instead of going through a buffer...">direct</a>;
<a name="l00174"></a>00174 <span class="comment"></span>
<a name="l00175"></a>00175 <span class="comment">    /**</span>
<a name="l00176"></a>00176 <span class="comment">     * Bytes read statistic</span>
<a name="l00177"></a>00177 <span class="comment">     * This field is internal to libavformat and access from outside is not allowed.</span>
<a name="l00178"></a>00178 <span class="comment">     */</span>
<a name="l00179"></a><a class="code" href="structAVIOContext.html#a2685da68190c842c028ec161ff2b563e">00179</a>     int64_t <a class="code" href="structAVIOContext.html#a2685da68190c842c028ec161ff2b563e" title="Bytes read statistic This field is internal to libavformat and access from outside is not allowed...">bytes_read</a>;
<a name="l00180"></a>00180 <span class="comment"></span>
<a name="l00181"></a>00181 <span class="comment">    /**</span>
<a name="l00182"></a>00182 <span class="comment">     * seek statistic</span>
<a name="l00183"></a>00183 <span class="comment">     * This field is internal to libavformat and access from outside is not allowed.</span>
<a name="l00184"></a>00184 <span class="comment">     */</span>
<a name="l00185"></a><a class="code" href="structAVIOContext.html#a38b3c122a21fc2271e3174342e87a79f">00185</a>     <span class="keywordtype">int</span> <a class="code" href="structAVIOContext.html#a38b3c122a21fc2271e3174342e87a79f" title="seek statistic This field is internal to libavformat and access from outside is not allowed...">seek_count</a>;
<a name="l00186"></a>00186 <span class="comment"></span>
<a name="l00187"></a>00187 <span class="comment">    /**</span>
<a name="l00188"></a>00188 <span class="comment">     * writeout statistic</span>
<a name="l00189"></a>00189 <span class="comment">     * This field is internal to libavformat and access from outside is not allowed.</span>
<a name="l00190"></a>00190 <span class="comment">     */</span>
<a name="l00191"></a><a class="code" href="structAVIOContext.html#ac027eace34bf1dbcab5f71b0806d1c8a">00191</a>     <span class="keywordtype">int</span> <a class="code" href="structAVIOContext.html#ac027eace34bf1dbcab5f71b0806d1c8a" title="writeout statistic This field is internal to libavformat and access from outside is not allowed...">writeout_count</a>;
<a name="l00192"></a>00192 <span class="comment"></span>
<a name="l00193"></a>00193 <span class="comment">    /**</span>
<a name="l00194"></a>00194 <span class="comment">     * Original buffer size</span>
<a name="l00195"></a>00195 <span class="comment">     * used internally after probing and ensure seekback to reset the buffer size</span>
<a name="l00196"></a>00196 <span class="comment">     * This field is internal to libavformat and access from outside is not allowed.</span>
<a name="l00197"></a>00197 <span class="comment">     */</span>
<a name="l00198"></a><a class="code" href="structAVIOContext.html#a167eec001560f151e6ae0ebb4e2fd0fa">00198</a>     <span class="keywordtype">int</span> <a class="code" href="structAVIOContext.html#a167eec001560f151e6ae0ebb4e2fd0fa" title="Original buffer size used internally after probing and ensure seekback to reset the buffer size This ...">orig_buffer_size</a>;
<a name="l00199"></a>00199 } <a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a>;
<a name="l00200"></a>00200 
<a name="l00201"></a>00201 <span class="comment">/* unbuffered I/O */</span>
<a name="l00202"></a>00202 <span class="comment"></span>
<a name="l00203"></a>00203 <span class="comment">/**</span>
<a name="l00204"></a>00204 <span class="comment"> * Return the name of the protocol that will handle the passed URL.</span>
<a name="l00205"></a>00205 <span class="comment"> *</span>
<a name="l00206"></a>00206 <span class="comment"> * NULL is returned if no protocol could be found for the given URL.</span>
<a name="l00207"></a>00207 <span class="comment"> *</span>
<a name="l00208"></a>00208 <span class="comment"> * @return Name of the protocol or NULL.</span>
<a name="l00209"></a>00209 <span class="comment"> */</span>
<a name="l00210"></a>00210 <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="avio_8h.html#a612d7e4aede364861a728c18383714c2" title="Return the name of the protocol that will handle the passed URL.">avio_find_protocol_name</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *url);
<a name="l00211"></a>00211 <span class="comment"></span>
<a name="l00212"></a>00212 <span class="comment">/**</span>
<a name="l00213"></a>00213 <span class="comment"> * Return AVIO_FLAG_* access flags corresponding to the access permissions</span>
<a name="l00214"></a>00214 <span class="comment"> * of the resource in url, or a negative value corresponding to an</span>
<a name="l00215"></a>00215 <span class="comment"> * AVERROR code in case of failure. The returned access flags are</span>
<a name="l00216"></a>00216 <span class="comment"> * masked by the value in flags.</span>
<a name="l00217"></a>00217 <span class="comment"> *</span>
<a name="l00218"></a>00218 <span class="comment"> * @note This function is intrinsically unsafe, in the sense that the</span>
<a name="l00219"></a>00219 <span class="comment"> * checked resource may change its existence or permission status from</span>
<a name="l00220"></a>00220 <span class="comment"> * one call to another. Thus you should not trust the returned value,</span>
<a name="l00221"></a>00221 <span class="comment"> * unless you are sure that no other processes are accessing the</span>
<a name="l00222"></a>00222 <span class="comment"> * checked resource.</span>
<a name="l00223"></a>00223 <span class="comment"> */</span>
<a name="l00224"></a>00224 <span class="keywordtype">int</span> <a class="code" href="avio_8h.html#aa4006f7b803e4d104231734a23b35ab7" title="Return AVIO_FLAG_* access flags corresponding to the access permissions of the resource in url...">avio_check</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *url, <span class="keywordtype">int</span> flags);
<a name="l00225"></a>00225 <span class="comment"></span>
<a name="l00226"></a>00226 <span class="comment">/**</span>
<a name="l00227"></a>00227 <span class="comment"> * Open directory for reading.</span>
<a name="l00228"></a>00228 <span class="comment"> *</span>
<a name="l00229"></a>00229 <span class="comment"> * @param s       directory read context. Pointer to a NULL pointer must be passed.</span>
<a name="l00230"></a>00230 <span class="comment"> * @param url     directory to be listed.</span>
<a name="l00231"></a>00231 <span class="comment"> * @param options A dictionary filled with protocol-private options. On return</span>
<a name="l00232"></a>00232 <span class="comment"> *                this parameter will be destroyed and replaced with a dictionary</span>
<a name="l00233"></a>00233 <span class="comment"> *                containing options that were not found. May be NULL.</span>
<a name="l00234"></a>00234 <span class="comment"> * @return &gt;=0 on success or negative on error.</span>
<a name="l00235"></a>00235 <span class="comment"> */</span>
<a name="l00236"></a>00236 <span class="keywordtype">int</span> <a class="code" href="avio_8h.html#a7bb596b33ba395e488af6c0c21ca00d5" title="Open directory for reading.">avio_open_dir</a>(<a class="code" href="structAVIODirContext.html">AVIODirContext</a> **s, <span class="keyword">const</span> <span class="keywordtype">char</span> *url, <a class="code" href="group__lavu__dict.html#ga1d7cc0833bee918994a600556410315f">AVDictionary</a> **options);
<a name="l00237"></a>00237 <span class="comment"></span>
<a name="l00238"></a>00238 <span class="comment">/**</span>
<a name="l00239"></a>00239 <span class="comment"> * Get next directory entry.</span>
<a name="l00240"></a>00240 <span class="comment"> *</span>
<a name="l00241"></a>00241 <span class="comment"> * Returned entry must be freed with avio_free_directory_entry(). In particular</span>
<a name="l00242"></a>00242 <span class="comment"> * it may outlive AVIODirContext.</span>
<a name="l00243"></a>00243 <span class="comment"> *</span>
<a name="l00244"></a>00244 <span class="comment"> * @param s         directory read context.</span>
<a name="l00245"></a>00245 <span class="comment"> * @param[out] next next entry or NULL when no more entries.</span>
<a name="l00246"></a>00246 <span class="comment"> * @return &gt;=0 on success or negative on error. End of list is not considered an</span>
<a name="l00247"></a>00247 <span class="comment"> *             error.</span>
<a name="l00248"></a>00248 <span class="comment"> */</span>
<a name="l00249"></a>00249 <span class="keywordtype">int</span> <a class="code" href="avio_8h.html#addb214cfa43621ca164b14d9932af2bb" title="Get next directory entry.">avio_read_dir</a>(<a class="code" href="structAVIODirContext.html">AVIODirContext</a> *s, <a class="code" href="structAVIODirEntry.html" title="Describes single entry of the directory.">AVIODirEntry</a> **next);
<a name="l00250"></a>00250 <span class="comment"></span>
<a name="l00251"></a>00251 <span class="comment">/**</span>
<a name="l00252"></a>00252 <span class="comment"> * Close directory.</span>
<a name="l00253"></a>00253 <span class="comment"> *</span>
<a name="l00254"></a>00254 <span class="comment"> * @note Entries created using avio_read_dir() are not deleted and must be</span>
<a name="l00255"></a>00255 <span class="comment"> * freeded with avio_free_directory_entry().</span>
<a name="l00256"></a>00256 <span class="comment"> *</span>
<a name="l00257"></a>00257 <span class="comment"> * @param s         directory read context.</span>
<a name="l00258"></a>00258 <span class="comment"> * @return &gt;=0 on success or negative on error.</span>
<a name="l00259"></a>00259 <span class="comment"> */</span>
<a name="l00260"></a>00260 <span class="keywordtype">int</span> <a class="code" href="avio_8h.html#a62ef5c196ebb93427470e098e22268c5" title="Close directory.">avio_close_dir</a>(<a class="code" href="structAVIODirContext.html">AVIODirContext</a> **s);
<a name="l00261"></a>00261 <span class="comment"></span>
<a name="l00262"></a>00262 <span class="comment">/**</span>
<a name="l00263"></a>00263 <span class="comment"> * Free entry allocated by avio_read_dir().</span>
<a name="l00264"></a>00264 <span class="comment"> *</span>
<a name="l00265"></a>00265 <span class="comment"> * @param entry entry to be freed.</span>
<a name="l00266"></a>00266 <span class="comment"> */</span>
<a name="l00267"></a>00267 <span class="keywordtype">void</span> <a class="code" href="avio_8h.html#aa0b5fe2c2243b25f770b1049a710861f" title="Free entry allocated by avio_read_dir().">avio_free_directory_entry</a>(<a class="code" href="structAVIODirEntry.html" title="Describes single entry of the directory.">AVIODirEntry</a> **entry);
<a name="l00268"></a>00268 <span class="comment"></span>
<a name="l00269"></a>00269 <span class="comment">/**</span>
<a name="l00270"></a>00270 <span class="comment"> * Allocate and initialize an AVIOContext for buffered I/O. It must be later</span>
<a name="l00271"></a>00271 <span class="comment"> * freed with av_free().</span>
<a name="l00272"></a>00272 <span class="comment"> *</span>
<a name="l00273"></a>00273 <span class="comment"> * @param buffer Memory block for input/output operations via AVIOContext.</span>
<a name="l00274"></a>00274 <span class="comment"> *        The buffer must be allocated with av_malloc() and friends.</span>
<a name="l00275"></a>00275 <span class="comment"> *        It may be freed and replaced with a new buffer by libavformat.</span>
<a name="l00276"></a>00276 <span class="comment"> *        AVIOContext.buffer holds the buffer currently in use,</span>
<a name="l00277"></a>00277 <span class="comment"> *        which must be later freed with av_free().</span>
<a name="l00278"></a>00278 <span class="comment"> * @param buffer_size The buffer size is very important for performance.</span>
<a name="l00279"></a>00279 <span class="comment"> *        For protocols with fixed blocksize it should be set to this blocksize.</span>
<a name="l00280"></a>00280 <span class="comment"> *        For others a typical size is a cache page, e.g. 4kb.</span>
<a name="l00281"></a>00281 <span class="comment"> * @param write_flag Set to 1 if the buffer should be writable, 0 otherwise.</span>
<a name="l00282"></a>00282 <span class="comment"> * @param opaque An opaque pointer to user-specific data.</span>
<a name="l00283"></a>00283 <span class="comment"> * @param read_packet  A function for refilling the buffer, may be NULL.</span>
<a name="l00284"></a>00284 <span class="comment"> * @param write_packet A function for writing the buffer contents, may be NULL.</span>
<a name="l00285"></a>00285 <span class="comment"> *        The function may not change the input buffers content.</span>
<a name="l00286"></a>00286 <span class="comment"> * @param seek A function for seeking to specified byte position, may be NULL.</span>
<a name="l00287"></a>00287 <span class="comment"> *</span>
<a name="l00288"></a>00288 <span class="comment"> * @return Allocated AVIOContext or NULL on failure.</span>
<a name="l00289"></a>00289 <span class="comment"> */</span>
<a name="l00290"></a>00290 <a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> *<a class="code" href="avio_8h.html#a853f5149136a27ffba3207d8520172a5" title="Allocate and initialize an AVIOContext for buffered I/O.">avio_alloc_context</a>(
<a name="l00291"></a>00291                   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *buffer,
<a name="l00292"></a>00292                   <span class="keywordtype">int</span> buffer_size,
<a name="l00293"></a>00293                   <span class="keywordtype">int</span> write_flag,
<a name="l00294"></a>00294                   <span class="keywordtype">void</span> *opaque,
<a name="l00295"></a>00295                   <span class="keywordtype">int</span> (*<a class="code" href="avio__reading_8c.html#a3a86bff38e7cb9093d0a32316b73b29c">read_packet</a>)(<span class="keywordtype">void</span> *opaque, uint8_t *buf, <span class="keywordtype">int</span> buf_size),
<a name="l00296"></a>00296                   <span class="keywordtype">int</span> (*write_packet)(<span class="keywordtype">void</span> *opaque, uint8_t *buf, <span class="keywordtype">int</span> buf_size),
<a name="l00297"></a>00297                   int64_t (*seek)(<span class="keywordtype">void</span> *opaque, int64_t offset, <span class="keywordtype">int</span> whence));
<a name="l00298"></a>00298 
<a name="l00299"></a>00299 <span class="keywordtype">void</span> <a class="code" href="avio_8h.html#a1dddee2b73f4dd6512ac9821cf5adc18">avio_w8</a>(<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> *s, <span class="keywordtype">int</span> b);
<a name="l00300"></a>00300 <span class="keywordtype">void</span> <a class="code" href="avio_8h.html#acc3626afc6aa3964b75d02811457164e">avio_write</a>(<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> *s, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *buf, <span class="keywordtype">int</span> size);
<a name="l00301"></a>00301 <span class="keywordtype">void</span> <a class="code" href="avio_8h.html#a09510d3318eda871f8b91693e2774425">avio_wl64</a>(<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> *s, uint64_t val);
<a name="l00302"></a>00302 <span class="keywordtype">void</span> <a class="code" href="avio_8h.html#a9a88d79a1fc983c04a4e009b85361d54">avio_wb64</a>(<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> *s, uint64_t val);
<a name="l00303"></a>00303 <span class="keywordtype">void</span> <a class="code" href="avio_8h.html#a16f2ba75f978a70f16dc55e2393f3439">avio_wl32</a>(<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> *s, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> val);
<a name="l00304"></a>00304 <span class="keywordtype">void</span> <a class="code" href="avio_8h.html#a1f2b9ee1bde6c6982072edbe929b47ea">avio_wb32</a>(<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> *s, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> val);
<a name="l00305"></a>00305 <span class="keywordtype">void</span> <a class="code" href="avio_8h.html#aa1ceef83bd4b74280f51eba321f70273">avio_wl24</a>(<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> *s, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> val);
<a name="l00306"></a>00306 <span class="keywordtype">void</span> <a class="code" href="avio_8h.html#a81a5cfb941abfe2b83a30be4f86ad06d">avio_wb24</a>(<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> *s, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> val);
<a name="l00307"></a>00307 <span class="keywordtype">void</span> <a class="code" href="avio_8h.html#a1ba843eb6d34706bbdd177a4256e71e2">avio_wl16</a>(<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> *s, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> val);
<a name="l00308"></a>00308 <span class="keywordtype">void</span> <a class="code" href="avio_8h.html#a21c2d7b7ddd7f31d24d278f8b3281ec3">avio_wb16</a>(<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> *s, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> val);
<a name="l00309"></a>00309 <span class="comment"></span>
<a name="l00310"></a>00310 <span class="comment">/**</span>
<a name="l00311"></a>00311 <span class="comment"> * Write a NULL-terminated string.</span>
<a name="l00312"></a>00312 <span class="comment"> * @return number of bytes written.</span>
<a name="l00313"></a>00313 <span class="comment"> */</span>
<a name="l00314"></a>00314 <span class="keywordtype">int</span> <a class="code" href="avio_8h.html#a1d2113a3b0d7015c415897d92bd441f3" title="Write a NULL-terminated string.">avio_put_str</a>(<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> *s, <span class="keyword">const</span> <span class="keywordtype">char</span> *str);
<a name="l00315"></a>00315 <span class="comment"></span>
<a name="l00316"></a>00316 <span class="comment">/**</span>
<a name="l00317"></a>00317 <span class="comment"> * Convert an UTF-8 string to UTF-16LE and write it.</span>
<a name="l00318"></a>00318 <span class="comment"> * @param s the AVIOContext</span>
<a name="l00319"></a>00319 <span class="comment"> * @param str NULL-terminated UTF-8 string</span>
<a name="l00320"></a>00320 <span class="comment"> *</span>
<a name="l00321"></a>00321 <span class="comment"> * @return number of bytes written.</span>
<a name="l00322"></a>00322 <span class="comment"> */</span>
<a name="l00323"></a>00323 <span class="keywordtype">int</span> <a class="code" href="avio_8h.html#a4ff718da93c106f7ba48de1cb6b010c6" title="Convert an UTF-8 string to UTF-16LE and write it.">avio_put_str16le</a>(<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> *s, <span class="keyword">const</span> <span class="keywordtype">char</span> *str);
<a name="l00324"></a>00324 <span class="comment"></span>
<a name="l00325"></a>00325 <span class="comment">/**</span>
<a name="l00326"></a>00326 <span class="comment"> * Convert an UTF-8 string to UTF-16BE and write it.</span>
<a name="l00327"></a>00327 <span class="comment"> * @param s the AVIOContext</span>
<a name="l00328"></a>00328 <span class="comment"> * @param str NULL-terminated UTF-8 string</span>
<a name="l00329"></a>00329 <span class="comment"> *</span>
<a name="l00330"></a>00330 <span class="comment"> * @return number of bytes written.</span>
<a name="l00331"></a>00331 <span class="comment"> */</span>
<a name="l00332"></a>00332 <span class="keywordtype">int</span> <a class="code" href="avio_8h.html#acf3a933e43bd56dcf671a6bc0c897bda" title="Convert an UTF-8 string to UTF-16BE and write it.">avio_put_str16be</a>(<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> *s, <span class="keyword">const</span> <span class="keywordtype">char</span> *str);
<a name="l00333"></a>00333 <span class="comment"></span>
<a name="l00334"></a>00334 <span class="comment">/**</span>
<a name="l00335"></a>00335 <span class="comment"> * Passing this as the &quot;whence&quot; parameter to a seek function causes it to</span>
<a name="l00336"></a>00336 <span class="comment"> * return the filesize without seeking anywhere. Supporting this is optional.</span>
<a name="l00337"></a>00337 <span class="comment"> * If it is not supported then the seek function will return &lt;0.</span>
<a name="l00338"></a>00338 <span class="comment"> */</span>
<a name="l00339"></a><a class="code" href="avio_8h.html#a427ff2a881637b47ee7d7f9e368be63f">00339</a> <span class="preprocessor">#define AVSEEK_SIZE 0x10000</span>
<a name="l00340"></a>00340 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00341"></a>00341 <span class="comment">/**</span>
<a name="l00342"></a>00342 <span class="comment"> * Oring this flag as into the &quot;whence&quot; parameter to a seek function causes it to</span>
<a name="l00343"></a>00343 <span class="comment"> * seek by any means (like reopening and linear reading) or other normally unreasonable</span>
<a name="l00344"></a>00344 <span class="comment"> * means that can be extremely slow.</span>
<a name="l00345"></a>00345 <span class="comment"> * This may be ignored by the seek code.</span>
<a name="l00346"></a>00346 <span class="comment"> */</span>
<a name="l00347"></a><a class="code" href="avio_8h.html#afc6af68de5304c6cea23a785c1f94cd5">00347</a> <span class="preprocessor">#define AVSEEK_FORCE 0x20000</span>
<a name="l00348"></a>00348 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00349"></a>00349 <span class="comment">/**</span>
<a name="l00350"></a>00350 <span class="comment"> * fseek() equivalent for AVIOContext.</span>
<a name="l00351"></a>00351 <span class="comment"> * @return new position or AVERROR.</span>
<a name="l00352"></a>00352 <span class="comment"> */</span>
<a name="l00353"></a>00353 int64_t <a class="code" href="avio_8h.html#a03e23bf0144030961c34e803c71f614f" title="fseek() equivalent for AVIOContext.">avio_seek</a>(<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> *s, int64_t offset, <span class="keywordtype">int</span> whence);
<a name="l00354"></a>00354 <span class="comment"></span>
<a name="l00355"></a>00355 <span class="comment">/**</span>
<a name="l00356"></a>00356 <span class="comment"> * Skip given number of bytes forward</span>
<a name="l00357"></a>00357 <span class="comment"> * @return new position or AVERROR.</span>
<a name="l00358"></a>00358 <span class="comment"> */</span>
<a name="l00359"></a>00359 int64_t <a class="code" href="avio_8h.html#aa22e02f986ea8a8dc018f9615af27eea" title="Skip given number of bytes forward.">avio_skip</a>(<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> *s, int64_t offset);
<a name="l00360"></a>00360 <span class="comment"></span>
<a name="l00361"></a>00361 <span class="comment">/**</span>
<a name="l00362"></a>00362 <span class="comment"> * ftell() equivalent for AVIOContext.</span>
<a name="l00363"></a>00363 <span class="comment"> * @return position or AVERROR.</span>
<a name="l00364"></a>00364 <span class="comment"> */</span>
<a name="l00365"></a><a class="code" href="avio_8h.html#a63157a668f29b8f5a89f00bc24838b8e">00365</a> <span class="keyword">static</span> av_always_inline int64_t <a class="code" href="avio_8h.html#a63157a668f29b8f5a89f00bc24838b8e" title="ftell() equivalent for AVIOContext.">avio_tell</a>(<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> *s)
<a name="l00366"></a>00366 {
<a name="l00367"></a>00367     <span class="keywordflow">return</span> <a class="code" href="avio_8h.html#a03e23bf0144030961c34e803c71f614f" title="fseek() equivalent for AVIOContext.">avio_seek</a>(s, 0, SEEK_CUR);
<a name="l00368"></a>00368 }
<a name="l00369"></a>00369 <span class="comment"></span>
<a name="l00370"></a>00370 <span class="comment">/**</span>
<a name="l00371"></a>00371 <span class="comment"> * Get the filesize.</span>
<a name="l00372"></a>00372 <span class="comment"> * @return filesize or AVERROR</span>
<a name="l00373"></a>00373 <span class="comment"> */</span>
<a name="l00374"></a>00374 int64_t <a class="code" href="avio_8h.html#a375f057e315dd2273579555128a070fb" title="Get the filesize.">avio_size</a>(<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> *s);
<a name="l00375"></a>00375 <span class="comment"></span>
<a name="l00376"></a>00376 <span class="comment">/**</span>
<a name="l00377"></a>00377 <span class="comment"> * feof() equivalent for AVIOContext.</span>
<a name="l00378"></a>00378 <span class="comment"> * @return non zero if and only if end of file</span>
<a name="l00379"></a>00379 <span class="comment"> */</span>
<a name="l00380"></a>00380 <span class="keywordtype">int</span> <a class="code" href="avio_8h.html#a4db704ed3d00a4be632dad1585d01d92" title="feof() equivalent for AVIOContext.">avio_feof</a>(<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> *s);
<a name="l00381"></a>00381 <span class="preprocessor">#if FF_API_URL_FEOF</span>
<a name="l00382"></a>00382 <span class="preprocessor"></span><span class="comment">/**</span>
<a name="l00383"></a>00383 <span class="comment"> * @deprecated use avio_feof()</span>
<a name="l00384"></a>00384 <span class="comment"> */</span>
<a name="l00385"></a>00385 <a class="code" href="attributes_8h.html#aa6d076561d3a9eea4729ee632652de02">attribute_deprecated</a>
<a name="l00386"></a>00386 <span class="keywordtype">int</span> url_feof(<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> *s);
<a name="l00387"></a>00387 <span class="preprocessor">#endif</span>
<a name="l00388"></a>00388 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00389"></a>00389 <span class="comment">/** @warning currently size is limited */</span>
<a name="l00390"></a>00390 <span class="keywordtype">int</span> <a class="code" href="avio_8h.html#a79127cec97b09a308b549253119ff38f">avio_printf</a>(<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> *s, <span class="keyword">const</span> <span class="keywordtype">char</span> *fmt, ...) <a class="code" href="attributes_8h.html#a4b078d4b8e02c0f452ee1dcaa7d983d3">av_printf_format</a>(2, 3);
<a name="l00391"></a>00391 <span class="comment"></span>
<a name="l00392"></a>00392 <span class="comment">/**</span>
<a name="l00393"></a>00393 <span class="comment"> * Force flushing of buffered data.</span>
<a name="l00394"></a>00394 <span class="comment"> *</span>
<a name="l00395"></a>00395 <span class="comment"> * For write streams, force the buffered data to be immediately written to the output,</span>
<a name="l00396"></a>00396 <span class="comment"> * without to wait to fill the internal buffer.</span>
<a name="l00397"></a>00397 <span class="comment"> *</span>
<a name="l00398"></a>00398 <span class="comment"> * For read streams, discard all currently buffered data, and advance the</span>
<a name="l00399"></a>00399 <span class="comment"> * reported file position to that of the underlying stream. This does not</span>
<a name="l00400"></a>00400 <span class="comment"> * read new data, and does not perform any seeks.</span>
<a name="l00401"></a>00401 <span class="comment"> */</span>
<a name="l00402"></a>00402 <span class="keywordtype">void</span> <a class="code" href="avio_8h.html#a60ed6497a3fed8be0b3b688142e8f54c" title="Force flushing of buffered data.">avio_flush</a>(<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> *s);
<a name="l00403"></a>00403 <span class="comment"></span>
<a name="l00404"></a>00404 <span class="comment">/**</span>
<a name="l00405"></a>00405 <span class="comment"> * Read size bytes from AVIOContext into buf.</span>
<a name="l00406"></a>00406 <span class="comment"> * @return number of bytes read or AVERROR</span>
<a name="l00407"></a>00407 <span class="comment"> */</span>
<a name="l00408"></a>00408 <span class="keywordtype">int</span> <a class="code" href="avio_8h.html#abb4e58439be0bff0dc2e2974ee5fb6a3" title="Read size bytes from AVIOContext into buf.">avio_read</a>(<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> *s, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *buf, <span class="keywordtype">int</span> size);
<a name="l00409"></a>00409 <span class="comment"></span>
<a name="l00410"></a>00410 <span class="comment">/**</span>
<a name="l00411"></a>00411 <span class="comment"> * @name Functions for reading from AVIOContext</span>
<a name="l00412"></a>00412 <span class="comment"> * @{</span>
<a name="l00413"></a>00413 <span class="comment"> *</span>
<a name="l00414"></a>00414 <span class="comment"> * @note return 0 if EOF, so you cannot use it if EOF handling is</span>
<a name="l00415"></a>00415 <span class="comment"> *       necessary</span>
<a name="l00416"></a>00416 <span class="comment"> */</span>
<a name="l00417"></a>00417 <span class="keywordtype">int</span>          <a class="code" href="avio_8h.html#af0d12eeb9d701134d971b91b4083bb43">avio_r8</a>  (<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> *s);
<a name="l00418"></a>00418 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="avio_8h.html#a71a15b7c123789a03115af82021698fe">avio_rl16</a>(<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> *s);
<a name="l00419"></a>00419 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="avio_8h.html#ac3229b4447938b646e4ecbf25a594e8a">avio_rl24</a>(<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> *s);
<a name="l00420"></a>00420 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="avio_8h.html#abc91c5452c4d7b5da84021be3a9a3d70">avio_rl32</a>(<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> *s);
<a name="l00421"></a>00421 uint64_t     <a class="code" href="avio_8h.html#af60c7d8fdabc3667ead1fffd2fac7ad5">avio_rl64</a>(<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> *s);
<a name="l00422"></a>00422 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="avio_8h.html#a383f5f7f7df5b6cc9b7949713a43cb37">avio_rb16</a>(<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> *s);
<a name="l00423"></a>00423 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="avio_8h.html#ae5f28c2379d309467db446d2fa03269b">avio_rb24</a>(<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> *s);
<a name="l00424"></a>00424 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="avio_8h.html#af089361fd70426624d19d436a10f87ad">avio_rb32</a>(<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> *s);
<a name="l00425"></a>00425 uint64_t     <a class="code" href="avio_8h.html#a14d7da25344458b5f3aad11edb0f4918">avio_rb64</a>(<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> *s);<span class="comment"></span>
<a name="l00426"></a>00426 <span class="comment">/**</span>
<a name="l00427"></a>00427 <span class="comment"> * @}</span>
<a name="l00428"></a>00428 <span class="comment"> */</span>
<a name="l00429"></a>00429 <span class="comment"></span>
<a name="l00430"></a>00430 <span class="comment">/**</span>
<a name="l00431"></a>00431 <span class="comment"> * Read a string from pb into buf. The reading will terminate when either</span>
<a name="l00432"></a>00432 <span class="comment"> * a NULL character was encountered, maxlen bytes have been read, or nothing</span>
<a name="l00433"></a>00433 <span class="comment"> * more can be read from pb. The result is guaranteed to be NULL-terminated, it</span>
<a name="l00434"></a>00434 <span class="comment"> * will be truncated if buf is too small.</span>
<a name="l00435"></a>00435 <span class="comment"> * Note that the string is not interpreted or validated in any way, it</span>
<a name="l00436"></a>00436 <span class="comment"> * might get truncated in the middle of a sequence for multi-byte encodings.</span>
<a name="l00437"></a>00437 <span class="comment"> *</span>
<a name="l00438"></a>00438 <span class="comment"> * @return number of bytes read (is always &lt;= maxlen).</span>
<a name="l00439"></a>00439 <span class="comment"> * If reading ends on EOF or error, the return value will be one more than</span>
<a name="l00440"></a>00440 <span class="comment"> * bytes actually read.</span>
<a name="l00441"></a>00441 <span class="comment"> */</span>
<a name="l00442"></a>00442 <span class="keywordtype">int</span> <a class="code" href="avio_8h.html#abeee0414e5f2ce5b150cf9c5694a2e4f" title="Read a string from pb into buf.">avio_get_str</a>(<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> *pb, <span class="keywordtype">int</span> maxlen, <span class="keywordtype">char</span> *buf, <span class="keywordtype">int</span> buflen);
<a name="l00443"></a>00443 <span class="comment"></span>
<a name="l00444"></a>00444 <span class="comment">/**</span>
<a name="l00445"></a>00445 <span class="comment"> * Read a UTF-16 string from pb and convert it to UTF-8.</span>
<a name="l00446"></a>00446 <span class="comment"> * The reading will terminate when either a null or invalid character was</span>
<a name="l00447"></a>00447 <span class="comment"> * encountered or maxlen bytes have been read.</span>
<a name="l00448"></a>00448 <span class="comment"> * @return number of bytes read (is always &lt;= maxlen)</span>
<a name="l00449"></a>00449 <span class="comment"> */</span>
<a name="l00450"></a>00450 <span class="keywordtype">int</span> <a class="code" href="avio_8h.html#a39507bbc53328eae98ac7d683078fcf1" title="Read a UTF-16 string from pb and convert it to UTF-8.">avio_get_str16le</a>(<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> *pb, <span class="keywordtype">int</span> maxlen, <span class="keywordtype">char</span> *buf, <span class="keywordtype">int</span> buflen);
<a name="l00451"></a>00451 <span class="keywordtype">int</span> <a class="code" href="avio_8h.html#a02be750099c47406eb68b50d75a01bdd">avio_get_str16be</a>(<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> *pb, <span class="keywordtype">int</span> maxlen, <span class="keywordtype">char</span> *buf, <span class="keywordtype">int</span> buflen);
<a name="l00452"></a>00452 
<a name="l00453"></a>00453 <span class="comment"></span>
<a name="l00454"></a>00454 <span class="comment">/**</span>
<a name="l00455"></a>00455 <span class="comment"> * @name URL open modes</span>
<a name="l00456"></a>00456 <span class="comment"> * The flags argument to avio_open must be one of the following</span>
<a name="l00457"></a>00457 <span class="comment"> * constants, optionally ORed with other flags.</span>
<a name="l00458"></a>00458 <span class="comment"> * @{</span>
<a name="l00459"></a>00459 <span class="comment"> */</span>
<a name="l00460"></a><a class="code" href="avio_8h.html#a21e61cb486bd1588eb7f775998cf8c77">00460</a> <span class="preprocessor">#define AVIO_FLAG_READ  1                                      </span><span class="comment">/**&lt; read-only */</span>
<a name="l00461"></a><a class="code" href="avio_8h.html#a5c9308f296545a8f3b7687d277a6dabc">00461</a> <span class="preprocessor">#define AVIO_FLAG_WRITE 2                                      </span><span class="comment">/**&lt; write-only */</span>
<a name="l00462"></a><a class="code" href="avio_8h.html#aba7dc6a03cfe63d2a7e2c00532007eb2">00462</a> <span class="preprocessor">#define AVIO_FLAG_READ_WRITE (AVIO_FLAG_READ|AVIO_FLAG_WRITE)  </span><span class="comment">/**&lt; read-write pseudo flag */</span>
<a name="l00463"></a>00463 <span class="comment">/**</span>
<a name="l00464"></a>00464 <span class="comment"> * @}</span>
<a name="l00465"></a>00465 <span class="comment"> */</span>
<a name="l00466"></a>00466 <span class="comment"></span>
<a name="l00467"></a>00467 <span class="comment">/**</span>
<a name="l00468"></a>00468 <span class="comment"> * Use non-blocking mode.</span>
<a name="l00469"></a>00469 <span class="comment"> * If this flag is set, operations on the context will return</span>
<a name="l00470"></a>00470 <span class="comment"> * AVERROR(EAGAIN) if they can not be performed immediately.</span>
<a name="l00471"></a>00471 <span class="comment"> * If this flag is not set, operations on the context will never return</span>
<a name="l00472"></a>00472 <span class="comment"> * AVERROR(EAGAIN).</span>
<a name="l00473"></a>00473 <span class="comment"> * Note that this flag does not affect the opening/connecting of the</span>
<a name="l00474"></a>00474 <span class="comment"> * context. Connecting a protocol will always block if necessary (e.g. on</span>
<a name="l00475"></a>00475 <span class="comment"> * network protocols) but never hang (e.g. on busy devices).</span>
<a name="l00476"></a>00476 <span class="comment"> * Warning: non-blocking protocols is work-in-progress; this flag may be</span>
<a name="l00477"></a>00477 <span class="comment"> * silently ignored.</span>
<a name="l00478"></a>00478 <span class="comment"> */</span>
<a name="l00479"></a><a class="code" href="avio_8h.html#aea3131c92c70177e463538e9a6b4308e">00479</a> <span class="preprocessor">#define AVIO_FLAG_NONBLOCK 8</span>
<a name="l00480"></a>00480 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00481"></a>00481 <span class="comment">/**</span>
<a name="l00482"></a>00482 <span class="comment"> * Use direct mode.</span>
<a name="l00483"></a>00483 <span class="comment"> * avio_read and avio_write should if possible be satisfied directly</span>
<a name="l00484"></a>00484 <span class="comment"> * instead of going through a buffer, and avio_seek will always</span>
<a name="l00485"></a>00485 <span class="comment"> * call the underlying seek function directly.</span>
<a name="l00486"></a>00486 <span class="comment"> */</span>
<a name="l00487"></a><a class="code" href="avio_8h.html#ab48ea445f38c16d407cc56d00be0f6bb">00487</a> <span class="preprocessor">#define AVIO_FLAG_DIRECT 0x8000</span>
<a name="l00488"></a>00488 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00489"></a>00489 <span class="comment">/**</span>
<a name="l00490"></a>00490 <span class="comment"> * Create and initialize a AVIOContext for accessing the</span>
<a name="l00491"></a>00491 <span class="comment"> * resource indicated by url.</span>
<a name="l00492"></a>00492 <span class="comment"> * @note When the resource indicated by url has been opened in</span>
<a name="l00493"></a>00493 <span class="comment"> * read+write mode, the AVIOContext can be used only for writing.</span>
<a name="l00494"></a>00494 <span class="comment"> *</span>
<a name="l00495"></a>00495 <span class="comment"> * @param s Used to return the pointer to the created AVIOContext.</span>
<a name="l00496"></a>00496 <span class="comment"> * In case of failure the pointed to value is set to NULL.</span>
<a name="l00497"></a>00497 <span class="comment"> * @param url resource to access</span>
<a name="l00498"></a>00498 <span class="comment"> * @param flags flags which control how the resource indicated by url</span>
<a name="l00499"></a>00499 <span class="comment"> * is to be opened</span>
<a name="l00500"></a>00500 <span class="comment"> * @return &gt;= 0 in case of success, a negative value corresponding to an</span>
<a name="l00501"></a>00501 <span class="comment"> * AVERROR code in case of failure</span>
<a name="l00502"></a>00502 <span class="comment"> */</span>
<a name="l00503"></a>00503 <span class="keywordtype">int</span> <a class="code" href="avio_8h.html#a371a670112abc5f3e15bc570da076301" title="Create and initialize a AVIOContext for accessing the resource indicated by url.">avio_open</a>(<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> **s, <span class="keyword">const</span> <span class="keywordtype">char</span> *url, <span class="keywordtype">int</span> flags);
<a name="l00504"></a>00504 <span class="comment"></span>
<a name="l00505"></a>00505 <span class="comment">/**</span>
<a name="l00506"></a>00506 <span class="comment"> * Create and initialize a AVIOContext for accessing the</span>
<a name="l00507"></a>00507 <span class="comment"> * resource indicated by url.</span>
<a name="l00508"></a>00508 <span class="comment"> * @note When the resource indicated by url has been opened in</span>
<a name="l00509"></a>00509 <span class="comment"> * read+write mode, the AVIOContext can be used only for writing.</span>
<a name="l00510"></a>00510 <span class="comment"> *</span>
<a name="l00511"></a>00511 <span class="comment"> * @param s Used to return the pointer to the created AVIOContext.</span>
<a name="l00512"></a>00512 <span class="comment"> * In case of failure the pointed to value is set to NULL.</span>
<a name="l00513"></a>00513 <span class="comment"> * @param url resource to access</span>
<a name="l00514"></a>00514 <span class="comment"> * @param flags flags which control how the resource indicated by url</span>
<a name="l00515"></a>00515 <span class="comment"> * is to be opened</span>
<a name="l00516"></a>00516 <span class="comment"> * @param int_cb an interrupt callback to be used at the protocols level</span>
<a name="l00517"></a>00517 <span class="comment"> * @param options  A dictionary filled with protocol-private options. On return</span>
<a name="l00518"></a>00518 <span class="comment"> * this parameter will be destroyed and replaced with a dict containing options</span>
<a name="l00519"></a>00519 <span class="comment"> * that were not found. May be NULL.</span>
<a name="l00520"></a>00520 <span class="comment"> * @return &gt;= 0 in case of success, a negative value corresponding to an</span>
<a name="l00521"></a>00521 <span class="comment"> * AVERROR code in case of failure</span>
<a name="l00522"></a>00522 <span class="comment"> */</span>
<a name="l00523"></a>00523 <span class="keywordtype">int</span> <a class="code" href="avio_8h.html#ade8a63980569494c99593ebf0d1e891b" title="Create and initialize a AVIOContext for accessing the resource indicated by url.">avio_open2</a>(<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> **s, <span class="keyword">const</span> <span class="keywordtype">char</span> *url, <span class="keywordtype">int</span> flags,
<a name="l00524"></a>00524                <span class="keyword">const</span> <a class="code" href="structAVIOInterruptCB.html" title="Callback for checking whether to abort blocking functions.">AVIOInterruptCB</a> *int_cb, <a class="code" href="group__lavu__dict.html#ga1d7cc0833bee918994a600556410315f">AVDictionary</a> **options);
<a name="l00525"></a>00525 <span class="comment"></span>
<a name="l00526"></a>00526 <span class="comment">/**</span>
<a name="l00527"></a>00527 <span class="comment"> * Close the resource accessed by the AVIOContext s and free it.</span>
<a name="l00528"></a>00528 <span class="comment"> * This function can only be used if s was opened by avio_open().</span>
<a name="l00529"></a>00529 <span class="comment"> *</span>
<a name="l00530"></a>00530 <span class="comment"> * The internal buffer is automatically flushed before closing the</span>
<a name="l00531"></a>00531 <span class="comment"> * resource.</span>
<a name="l00532"></a>00532 <span class="comment"> *</span>
<a name="l00533"></a>00533 <span class="comment"> * @return 0 on success, an AVERROR &lt; 0 on error.</span>
<a name="l00534"></a>00534 <span class="comment"> * @see avio_closep</span>
<a name="l00535"></a>00535 <span class="comment"> */</span>
<a name="l00536"></a>00536 <span class="keywordtype">int</span> <a class="code" href="avio_8h.html#ad71cada104a5e4365d35d45669ea03ca" title="Close the resource accessed by the AVIOContext s and free it.">avio_close</a>(<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> *s);
<a name="l00537"></a>00537 <span class="comment"></span>
<a name="l00538"></a>00538 <span class="comment">/**</span>
<a name="l00539"></a>00539 <span class="comment"> * Close the resource accessed by the AVIOContext *s, free it</span>
<a name="l00540"></a>00540 <span class="comment"> * and set the pointer pointing to it to NULL.</span>
<a name="l00541"></a>00541 <span class="comment"> * This function can only be used if s was opened by avio_open().</span>
<a name="l00542"></a>00542 <span class="comment"> *</span>
<a name="l00543"></a>00543 <span class="comment"> * The internal buffer is automatically flushed before closing the</span>
<a name="l00544"></a>00544 <span class="comment"> * resource.</span>
<a name="l00545"></a>00545 <span class="comment"> *</span>
<a name="l00546"></a>00546 <span class="comment"> * @return 0 on success, an AVERROR &lt; 0 on error.</span>
<a name="l00547"></a>00547 <span class="comment"> * @see avio_close</span>
<a name="l00548"></a>00548 <span class="comment"> */</span>
<a name="l00549"></a>00549 <span class="keywordtype">int</span> <a class="code" href="avio_8h.html#ae118a1f37f1e48617609ead9910aac15" title="Close the resource accessed by the AVIOContext *s, free it and set the pointer pointing to it to NULL...">avio_closep</a>(<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> **s);
<a name="l00550"></a>00550 
<a name="l00551"></a>00551 <span class="comment"></span>
<a name="l00552"></a>00552 <span class="comment">/**</span>
<a name="l00553"></a>00553 <span class="comment"> * Open a write only memory stream.</span>
<a name="l00554"></a>00554 <span class="comment"> *</span>
<a name="l00555"></a>00555 <span class="comment"> * @param s new IO context</span>
<a name="l00556"></a>00556 <span class="comment"> * @return zero if no error.</span>
<a name="l00557"></a>00557 <span class="comment"> */</span>
<a name="l00558"></a>00558 <span class="keywordtype">int</span> <a class="code" href="avio_8h.html#adb5259ad07633518173eaa47fe6575e2" title="Open a write only memory stream.">avio_open_dyn_buf</a>(<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> **s);
<a name="l00559"></a>00559 <span class="comment"></span>
<a name="l00560"></a>00560 <span class="comment">/**</span>
<a name="l00561"></a>00561 <span class="comment"> * Return the written size and a pointer to the buffer. The buffer</span>
<a name="l00562"></a>00562 <span class="comment"> * must be freed with av_free().</span>
<a name="l00563"></a>00563 <span class="comment"> * Padding of FF_INPUT_BUFFER_PADDING_SIZE is added to the buffer.</span>
<a name="l00564"></a>00564 <span class="comment"> *</span>
<a name="l00565"></a>00565 <span class="comment"> * @param s IO context</span>
<a name="l00566"></a>00566 <span class="comment"> * @param pbuffer pointer to a byte buffer</span>
<a name="l00567"></a>00567 <span class="comment"> * @return the length of the byte buffer</span>
<a name="l00568"></a>00568 <span class="comment"> */</span>
<a name="l00569"></a>00569 <span class="keywordtype">int</span> <a class="code" href="avio_8h.html#a8faed62ce72e7411cbea2356494af8ce" title="Return the written size and a pointer to the buffer.">avio_close_dyn_buf</a>(<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> *s, uint8_t **pbuffer);
<a name="l00570"></a>00570 <span class="comment"></span>
<a name="l00571"></a>00571 <span class="comment">/**</span>
<a name="l00572"></a>00572 <span class="comment"> * Iterate through names of available protocols.</span>
<a name="l00573"></a>00573 <span class="comment"> *</span>
<a name="l00574"></a>00574 <span class="comment"> * @param opaque A private pointer representing current protocol.</span>
<a name="l00575"></a>00575 <span class="comment"> *        It must be a pointer to NULL on first iteration and will</span>
<a name="l00576"></a>00576 <span class="comment"> *        be updated by successive calls to avio_enum_protocols.</span>
<a name="l00577"></a>00577 <span class="comment"> * @param output If set to 1, iterate over output protocols,</span>
<a name="l00578"></a>00578 <span class="comment"> *               otherwise over input protocols.</span>
<a name="l00579"></a>00579 <span class="comment"> *</span>
<a name="l00580"></a>00580 <span class="comment"> * @return A static string containing the name of current protocol or NULL</span>
<a name="l00581"></a>00581 <span class="comment"> */</span>
<a name="l00582"></a>00582 <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="avio_8h.html#a50fda7362db877e8b9e493650c9e3fb3" title="Iterate through names of available protocols.">avio_enum_protocols</a>(<span class="keywordtype">void</span> **opaque, <span class="keywordtype">int</span> output);
<a name="l00583"></a>00583 <span class="comment"></span>
<a name="l00584"></a>00584 <span class="comment">/**</span>
<a name="l00585"></a>00585 <span class="comment"> * Pause and resume playing - only meaningful if using a network streaming</span>
<a name="l00586"></a>00586 <span class="comment"> * protocol (e.g. MMS).</span>
<a name="l00587"></a>00587 <span class="comment"> *</span>
<a name="l00588"></a>00588 <span class="comment"> * @param h     IO context from which to call the read_pause function pointer</span>
<a name="l00589"></a>00589 <span class="comment"> * @param pause 1 for pause, 0 for resume</span>
<a name="l00590"></a>00590 <span class="comment"> */</span>
<a name="l00591"></a>00591 <span class="keywordtype">int</span>     <a class="code" href="avio_8h.html#a1ac23b54d5f5bbfee4353978d313e472" title="Pause and resume playing - only meaningful if using a network streaming protocol (e.g.">avio_pause</a>(<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> *h, <span class="keywordtype">int</span> pause);
<a name="l00592"></a>00592 <span class="comment"></span>
<a name="l00593"></a>00593 <span class="comment">/**</span>
<a name="l00594"></a>00594 <span class="comment"> * Seek to a given timestamp relative to some component stream.</span>
<a name="l00595"></a>00595 <span class="comment"> * Only meaningful if using a network streaming protocol (e.g. MMS.).</span>
<a name="l00596"></a>00596 <span class="comment"> *</span>
<a name="l00597"></a>00597 <span class="comment"> * @param h IO context from which to call the seek function pointers</span>
<a name="l00598"></a>00598 <span class="comment"> * @param stream_index The stream index that the timestamp is relative to.</span>
<a name="l00599"></a>00599 <span class="comment"> *        If stream_index is (-1) the timestamp should be in AV_TIME_BASE</span>
<a name="l00600"></a>00600 <span class="comment"> *        units from the beginning of the presentation.</span>
<a name="l00601"></a>00601 <span class="comment"> *        If a stream_index &gt;= 0 is used and the protocol does not support</span>
<a name="l00602"></a>00602 <span class="comment"> *        seeking based on component streams, the call will fail.</span>
<a name="l00603"></a>00603 <span class="comment"> * @param timestamp timestamp in AVStream.time_base units</span>
<a name="l00604"></a>00604 <span class="comment"> *        or if there is no stream specified then in AV_TIME_BASE units.</span>
<a name="l00605"></a>00605 <span class="comment"> * @param flags Optional combination of AVSEEK_FLAG_BACKWARD, AVSEEK_FLAG_BYTE</span>
<a name="l00606"></a>00606 <span class="comment"> *        and AVSEEK_FLAG_ANY. The protocol may silently ignore</span>
<a name="l00607"></a>00607 <span class="comment"> *        AVSEEK_FLAG_BACKWARD and AVSEEK_FLAG_ANY, but AVSEEK_FLAG_BYTE will</span>
<a name="l00608"></a>00608 <span class="comment"> *        fail if used and not supported.</span>
<a name="l00609"></a>00609 <span class="comment"> * @return &gt;= 0 on success</span>
<a name="l00610"></a>00610 <span class="comment"> * @see AVInputFormat::read_seek</span>
<a name="l00611"></a>00611 <span class="comment"> */</span>
<a name="l00612"></a>00612 int64_t <a class="code" href="avio_8h.html#adbdec54e1897c66b8c8bc43ce0063187" title="Seek to a given timestamp relative to some component stream.">avio_seek_time</a>(<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> *h, <span class="keywordtype">int</span> stream_index,
<a name="l00613"></a>00613                        int64_t timestamp, <span class="keywordtype">int</span> flags);
<a name="l00614"></a>00614 
<a name="l00615"></a>00615 <span class="comment">/* Avoid a warning. The header can not be included because it breaks c++. */</span>
<a name="l00616"></a>00616 <span class="keyword">struct </span>AVBPrint;
<a name="l00617"></a>00617 <span class="comment"></span>
<a name="l00618"></a>00618 <span class="comment">/**</span>
<a name="l00619"></a>00619 <span class="comment"> * Read contents of h into print buffer, up to max_size bytes, or up to EOF.</span>
<a name="l00620"></a>00620 <span class="comment"> *</span>
<a name="l00621"></a>00621 <span class="comment"> * @return 0 for success (max_size bytes read or EOF reached), negative error</span>
<a name="l00622"></a>00622 <span class="comment"> * code otherwise</span>
<a name="l00623"></a>00623 <span class="comment"> */</span>
<a name="l00624"></a>00624 <span class="keywordtype">int</span> <a class="code" href="avio_8h.html#ae8ad73c8ea7e4a2a541e134f762793a6" title="Read contents of h into print buffer, up to max_size bytes, or up to EOF.">avio_read_to_bprint</a>(<a class="code" href="structAVIOContext.html" title="Bytestream IO Context.">AVIOContext</a> *h, <span class="keyword">struct</span> AVBPrint *pb, <span class="keywordtype">size_t</span> max_size);
<a name="l00625"></a>00625 
<a name="l00626"></a>00626 <span class="preprocessor">#endif </span><span class="comment">/* AVFORMAT_AVIO_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">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</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 &#160;<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>