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 / opt_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: libavutil/opt.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">libavutil/opt.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="opt_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"> * AVOptions</span>
<a name="l00003"></a>00003 <span class="comment"> * copyright (c) 2005 Michael Niedermayer &lt;michaelni@gmx.at&gt;</span>
<a name="l00004"></a>00004 <span class="comment"> *</span>
<a name="l00005"></a>00005 <span class="comment"> * This file is part of FFmpeg.</span>
<a name="l00006"></a>00006 <span class="comment"> *</span>
<a name="l00007"></a>00007 <span class="comment"> * FFmpeg is free software; you can redistribute it and/or</span>
<a name="l00008"></a>00008 <span class="comment"> * modify it under the terms of the GNU Lesser General Public</span>
<a name="l00009"></a>00009 <span class="comment"> * License as published by the Free Software Foundation; either</span>
<a name="l00010"></a>00010 <span class="comment"> * version 2.1 of the License, or (at your option) any later version.</span>
<a name="l00011"></a>00011 <span class="comment"> *</span>
<a name="l00012"></a>00012 <span class="comment"> * FFmpeg is distributed in the hope that it will be useful,</span>
<a name="l00013"></a>00013 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00014"></a>00014 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</span>
<a name="l00015"></a>00015 <span class="comment"> * Lesser General Public License for more details.</span>
<a name="l00016"></a>00016 <span class="comment"> *</span>
<a name="l00017"></a>00017 <span class="comment"> * You should have received a copy of the GNU Lesser General Public</span>
<a name="l00018"></a>00018 <span class="comment"> * License along with FFmpeg; if not, write to the Free Software</span>
<a name="l00019"></a>00019 <span class="comment"> * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA</span>
<a name="l00020"></a>00020 <span class="comment"> */</span>
<a name="l00021"></a>00021 
<a name="l00022"></a>00022 <span class="preprocessor">#ifndef AVUTIL_OPT_H</span>
<a name="l00023"></a>00023 <span class="preprocessor"></span><span class="preprocessor">#define AVUTIL_OPT_H</span>
<a name="l00024"></a>00024 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00025"></a>00025 <span class="comment">/**</span>
<a name="l00026"></a>00026 <span class="comment"> * @file</span>
<a name="l00027"></a>00027 <span class="comment"> * AVOptions</span>
<a name="l00028"></a>00028 <span class="comment"> */</span>
<a name="l00029"></a>00029 
<a name="l00030"></a>00030 <span class="preprocessor">#include &quot;<a class="code" href="rational_8h.html" title="rational numbers">rational.h</a>&quot;</span>
<a name="l00031"></a>00031 <span class="preprocessor">#include &quot;<a class="code" href="avutil_8h.html" title="external API header">avutil.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.">dict.h</a>&quot;</span>
<a name="l00033"></a>00033 <span class="preprocessor">#include &quot;<a class="code" href="log_8h.html">log.h</a>&quot;</span>
<a name="l00034"></a>00034 <span class="preprocessor">#include &quot;<a class="code" href="pixfmt_8h.html" title="pixel format definitions">pixfmt.h</a>&quot;</span>
<a name="l00035"></a>00035 <span class="preprocessor">#include &quot;<a class="code" href="samplefmt_8h.html">samplefmt.h</a>&quot;</span>
<a name="l00036"></a>00036 <span class="preprocessor">#include &quot;<a class="code" href="libavutil_2version_8h.html" title="Libavutil version macros.">version.h</a>&quot;</span>
<a name="l00037"></a>00037 <span class="comment"></span>
<a name="l00038"></a>00038 <span class="comment">/**</span>
<a name="l00039"></a>00039 <span class="comment"> * @defgroup avoptions AVOptions</span>
<a name="l00040"></a>00040 <span class="comment"> * @ingroup lavu_data</span>
<a name="l00041"></a>00041 <span class="comment"> * @{</span>
<a name="l00042"></a>00042 <span class="comment"> * AVOptions provide a generic system to declare options on arbitrary structs</span>
<a name="l00043"></a>00043 <span class="comment"> * (&quot;objects&quot;). An option can have a help text, a type and a range of possible</span>
<a name="l00044"></a>00044 <span class="comment"> * values. Options may then be enumerated, read and written to.</span>
<a name="l00045"></a>00045 <span class="comment"> *</span>
<a name="l00046"></a>00046 <span class="comment"> * @section avoptions_implement Implementing AVOptions</span>
<a name="l00047"></a>00047 <span class="comment"> * This section describes how to add AVOptions capabilities to a struct.</span>
<a name="l00048"></a>00048 <span class="comment"> *</span>
<a name="l00049"></a>00049 <span class="comment"> * All AVOptions-related information is stored in an AVClass. Therefore</span>
<a name="l00050"></a>00050 <span class="comment"> * the first member of the struct should be a pointer to an AVClass describing it.</span>
<a name="l00051"></a>00051 <span class="comment"> * The option field of the AVClass must be set to a NULL-terminated static array</span>
<a name="l00052"></a>00052 <span class="comment"> * of AVOptions. Each AVOption must have a non-empty name, a type, a default</span>
<a name="l00053"></a>00053 <span class="comment"> * value and for number-type AVOptions also a range of allowed values. It must</span>
<a name="l00054"></a>00054 <span class="comment"> * also declare an offset in bytes from the start of the struct, where the field</span>
<a name="l00055"></a>00055 <span class="comment"> * associated with this AVOption is located. Other fields in the AVOption struct</span>
<a name="l00056"></a>00056 <span class="comment"> * should also be set when applicable, but are not required.</span>
<a name="l00057"></a>00057 <span class="comment"> *</span>
<a name="l00058"></a>00058 <span class="comment"> * The following example illustrates an AVOptions-enabled struct:</span>
<a name="l00059"></a>00059 <span class="comment"> * @code</span>
<a name="l00060"></a>00060 <span class="comment"> * typedef struct test_struct {</span>
<a name="l00061"></a>00061 <span class="comment"> *     AVClass *class;</span>
<a name="l00062"></a>00062 <span class="comment"> *     int      int_opt;</span>
<a name="l00063"></a>00063 <span class="comment"> *     char    *str_opt;</span>
<a name="l00064"></a>00064 <span class="comment"> *     uint8_t *bin_opt;</span>
<a name="l00065"></a>00065 <span class="comment"> *     int      bin_len;</span>
<a name="l00066"></a>00066 <span class="comment"> * } test_struct;</span>
<a name="l00067"></a>00067 <span class="comment"> *</span>
<a name="l00068"></a>00068 <span class="comment"> * static const AVOption test_options[] = {</span>
<a name="l00069"></a>00069 <span class="comment"> *   { &quot;test_int&quot;, &quot;This is a test option of int type.&quot;, offsetof(test_struct, int_opt),</span>
<a name="l00070"></a>00070 <span class="comment"> *     AV_OPT_TYPE_INT, { .i64 = -1 }, INT_MIN, INT_MAX },</span>
<a name="l00071"></a>00071 <span class="comment"> *   { &quot;test_str&quot;, &quot;This is a test option of string type.&quot;, offsetof(test_struct, str_opt),</span>
<a name="l00072"></a>00072 <span class="comment"> *     AV_OPT_TYPE_STRING },</span>
<a name="l00073"></a>00073 <span class="comment"> *   { &quot;test_bin&quot;, &quot;This is a test option of binary type.&quot;, offsetof(test_struct, bin_opt),</span>
<a name="l00074"></a>00074 <span class="comment"> *     AV_OPT_TYPE_BINARY },</span>
<a name="l00075"></a>00075 <span class="comment"> *   { NULL },</span>
<a name="l00076"></a>00076 <span class="comment"> * };</span>
<a name="l00077"></a>00077 <span class="comment"> *</span>
<a name="l00078"></a>00078 <span class="comment"> * static const AVClass test_class = {</span>
<a name="l00079"></a>00079 <span class="comment"> *     .class_name = &quot;test class&quot;,</span>
<a name="l00080"></a>00080 <span class="comment"> *     .item_name  = av_default_item_name,</span>
<a name="l00081"></a>00081 <span class="comment"> *     .option     = test_options,</span>
<a name="l00082"></a>00082 <span class="comment"> *     .version    = LIBAVUTIL_VERSION_INT,</span>
<a name="l00083"></a>00083 <span class="comment"> * };</span>
<a name="l00084"></a>00084 <span class="comment"> * @endcode</span>
<a name="l00085"></a>00085 <span class="comment"> *</span>
<a name="l00086"></a>00086 <span class="comment"> * Next, when allocating your struct, you must ensure that the AVClass pointer</span>
<a name="l00087"></a>00087 <span class="comment"> * is set to the correct value. Then, av_opt_set_defaults() can be called to</span>
<a name="l00088"></a>00088 <span class="comment"> * initialize defaults. After that the struct is ready to be used with the</span>
<a name="l00089"></a>00089 <span class="comment"> * AVOptions API.</span>
<a name="l00090"></a>00090 <span class="comment"> *</span>
<a name="l00091"></a>00091 <span class="comment"> * When cleaning up, you may use the av_opt_free() function to automatically</span>
<a name="l00092"></a>00092 <span class="comment"> * free all the allocated string and binary options.</span>
<a name="l00093"></a>00093 <span class="comment"> *</span>
<a name="l00094"></a>00094 <span class="comment"> * Continuing with the above example:</span>
<a name="l00095"></a>00095 <span class="comment"> *</span>
<a name="l00096"></a>00096 <span class="comment"> * @code</span>
<a name="l00097"></a>00097 <span class="comment"> * test_struct *alloc_test_struct(void)</span>
<a name="l00098"></a>00098 <span class="comment"> * {</span>
<a name="l00099"></a>00099 <span class="comment"> *     test_struct *ret = av_malloc(sizeof(*ret));</span>
<a name="l00100"></a>00100 <span class="comment"> *     ret-&gt;class = &amp;test_class;</span>
<a name="l00101"></a>00101 <span class="comment"> *     av_opt_set_defaults(ret);</span>
<a name="l00102"></a>00102 <span class="comment"> *     return ret;</span>
<a name="l00103"></a>00103 <span class="comment"> * }</span>
<a name="l00104"></a>00104 <span class="comment"> * void free_test_struct(test_struct **foo)</span>
<a name="l00105"></a>00105 <span class="comment"> * {</span>
<a name="l00106"></a>00106 <span class="comment"> *     av_opt_free(*foo);</span>
<a name="l00107"></a>00107 <span class="comment"> *     av_freep(foo);</span>
<a name="l00108"></a>00108 <span class="comment"> * }</span>
<a name="l00109"></a>00109 <span class="comment"> * @endcode</span>
<a name="l00110"></a>00110 <span class="comment"> *</span>
<a name="l00111"></a>00111 <span class="comment"> * @subsection avoptions_implement_nesting Nesting</span>
<a name="l00112"></a>00112 <span class="comment"> *      It may happen that an AVOptions-enabled struct contains another</span>
<a name="l00113"></a>00113 <span class="comment"> *      AVOptions-enabled struct as a member (e.g. AVCodecContext in</span>
<a name="l00114"></a>00114 <span class="comment"> *      libavcodec exports generic options, while its priv_data field exports</span>
<a name="l00115"></a>00115 <span class="comment"> *      codec-specific options). In such a case, it is possible to set up the</span>
<a name="l00116"></a>00116 <span class="comment"> *      parent struct to export a child&#39;s options. To do that, simply</span>
<a name="l00117"></a>00117 <span class="comment"> *      implement AVClass.child_next() and AVClass.child_class_next() in the</span>
<a name="l00118"></a>00118 <span class="comment"> *      parent struct&#39;s AVClass.</span>
<a name="l00119"></a>00119 <span class="comment"> *      Assuming that the test_struct from above now also contains a</span>
<a name="l00120"></a>00120 <span class="comment"> *      child_struct field:</span>
<a name="l00121"></a>00121 <span class="comment"> *</span>
<a name="l00122"></a>00122 <span class="comment"> *      @code</span>
<a name="l00123"></a>00123 <span class="comment"> *      typedef struct child_struct {</span>
<a name="l00124"></a>00124 <span class="comment"> *          AVClass *class;</span>
<a name="l00125"></a>00125 <span class="comment"> *          int flags_opt;</span>
<a name="l00126"></a>00126 <span class="comment"> *      } child_struct;</span>
<a name="l00127"></a>00127 <span class="comment"> *      static const AVOption child_opts[] = {</span>
<a name="l00128"></a>00128 <span class="comment"> *          { &quot;test_flags&quot;, &quot;This is a test option of flags type.&quot;,</span>
<a name="l00129"></a>00129 <span class="comment"> *            offsetof(child_struct, flags_opt), AV_OPT_TYPE_FLAGS, { .i64 = 0 }, INT_MIN, INT_MAX },</span>
<a name="l00130"></a>00130 <span class="comment"> *          { NULL },</span>
<a name="l00131"></a>00131 <span class="comment"> *      };</span>
<a name="l00132"></a>00132 <span class="comment"> *      static const AVClass child_class = {</span>
<a name="l00133"></a>00133 <span class="comment"> *          .class_name = &quot;child class&quot;,</span>
<a name="l00134"></a>00134 <span class="comment"> *          .item_name  = av_default_item_name,</span>
<a name="l00135"></a>00135 <span class="comment"> *          .option     = child_opts,</span>
<a name="l00136"></a>00136 <span class="comment"> *          .version    = LIBAVUTIL_VERSION_INT,</span>
<a name="l00137"></a>00137 <span class="comment"> *      };</span>
<a name="l00138"></a>00138 <span class="comment"> *</span>
<a name="l00139"></a>00139 <span class="comment"> *      void *child_next(void *obj, void *prev)</span>
<a name="l00140"></a>00140 <span class="comment"> *      {</span>
<a name="l00141"></a>00141 <span class="comment"> *          test_struct *t = obj;</span>
<a name="l00142"></a>00142 <span class="comment"> *          if (!prev &amp;&amp; t-&gt;child_struct)</span>
<a name="l00143"></a>00143 <span class="comment"> *              return t-&gt;child_struct;</span>
<a name="l00144"></a>00144 <span class="comment"> *          return NULL</span>
<a name="l00145"></a>00145 <span class="comment"> *      }</span>
<a name="l00146"></a>00146 <span class="comment"> *      const AVClass child_class_next(const AVClass *prev)</span>
<a name="l00147"></a>00147 <span class="comment"> *      {</span>
<a name="l00148"></a>00148 <span class="comment"> *          return prev ? NULL : &amp;child_class;</span>
<a name="l00149"></a>00149 <span class="comment"> *      }</span>
<a name="l00150"></a>00150 <span class="comment"> *      @endcode</span>
<a name="l00151"></a>00151 <span class="comment"> *      Putting child_next() and child_class_next() as defined above into</span>
<a name="l00152"></a>00152 <span class="comment"> *      test_class will now make child_struct&#39;s options accessible through</span>
<a name="l00153"></a>00153 <span class="comment"> *      test_struct (again, proper setup as described above needs to be done on</span>
<a name="l00154"></a>00154 <span class="comment"> *      child_struct right after it is created).</span>
<a name="l00155"></a>00155 <span class="comment"> *</span>
<a name="l00156"></a>00156 <span class="comment"> *      From the above example it might not be clear why both child_next()</span>
<a name="l00157"></a>00157 <span class="comment"> *      and child_class_next() are needed. The distinction is that child_next()</span>
<a name="l00158"></a>00158 <span class="comment"> *      iterates over actually existing objects, while child_class_next()</span>
<a name="l00159"></a>00159 <span class="comment"> *      iterates over all possible child classes. E.g. if an AVCodecContext</span>
<a name="l00160"></a>00160 <span class="comment"> *      was initialized to use a codec which has private options, then its</span>
<a name="l00161"></a>00161 <span class="comment"> *      child_next() will return AVCodecContext.priv_data and finish</span>
<a name="l00162"></a>00162 <span class="comment"> *      iterating. OTOH child_class_next() on AVCodecContext.av_class will</span>
<a name="l00163"></a>00163 <span class="comment"> *      iterate over all available codecs with private options.</span>
<a name="l00164"></a>00164 <span class="comment"> *</span>
<a name="l00165"></a>00165 <span class="comment"> * @subsection avoptions_implement_named_constants Named constants</span>
<a name="l00166"></a>00166 <span class="comment"> *      It is possible to create named constants for options. Simply set the unit</span>
<a name="l00167"></a>00167 <span class="comment"> *      field of the option the constants should apply to a string and</span>
<a name="l00168"></a>00168 <span class="comment"> *      create the constants themselves as options of type AV_OPT_TYPE_CONST</span>
<a name="l00169"></a>00169 <span class="comment"> *      with their unit field set to the same string.</span>
<a name="l00170"></a>00170 <span class="comment"> *      Their default_val field should contain the value of the named</span>
<a name="l00171"></a>00171 <span class="comment"> *      constant.</span>
<a name="l00172"></a>00172 <span class="comment"> *      For example, to add some named constants for the test_flags option</span>
<a name="l00173"></a>00173 <span class="comment"> *      above, put the following into the child_opts array:</span>
<a name="l00174"></a>00174 <span class="comment"> *      @code</span>
<a name="l00175"></a>00175 <span class="comment"> *      { &quot;test_flags&quot;, &quot;This is a test option of flags type.&quot;,</span>
<a name="l00176"></a>00176 <span class="comment"> *        offsetof(child_struct, flags_opt), AV_OPT_TYPE_FLAGS, { .i64 = 0 }, INT_MIN, INT_MAX, &quot;test_unit&quot; },</span>
<a name="l00177"></a>00177 <span class="comment"> *      { &quot;flag1&quot;, &quot;This is a flag with value 16&quot;, 0, AV_OPT_TYPE_CONST, { .i64 = 16 }, 0, 0, &quot;test_unit&quot; },</span>
<a name="l00178"></a>00178 <span class="comment"> *      @endcode</span>
<a name="l00179"></a>00179 <span class="comment"> *</span>
<a name="l00180"></a>00180 <span class="comment"> * @section avoptions_use Using AVOptions</span>
<a name="l00181"></a>00181 <span class="comment"> * This section deals with accessing options in an AVOptions-enabled struct.</span>
<a name="l00182"></a>00182 <span class="comment"> * Such structs in FFmpeg are e.g. AVCodecContext in libavcodec or</span>
<a name="l00183"></a>00183 <span class="comment"> * AVFormatContext in libavformat.</span>
<a name="l00184"></a>00184 <span class="comment"> *</span>
<a name="l00185"></a>00185 <span class="comment"> * @subsection avoptions_use_examine Examining AVOptions</span>
<a name="l00186"></a>00186 <span class="comment"> * The basic functions for examining options are av_opt_next(), which iterates</span>
<a name="l00187"></a>00187 <span class="comment"> * over all options defined for one object, and av_opt_find(), which searches</span>
<a name="l00188"></a>00188 <span class="comment"> * for an option with the given name.</span>
<a name="l00189"></a>00189 <span class="comment"> *</span>
<a name="l00190"></a>00190 <span class="comment"> * The situation is more complicated with nesting. An AVOptions-enabled struct</span>
<a name="l00191"></a>00191 <span class="comment"> * may have AVOptions-enabled children. Passing the AV_OPT_SEARCH_CHILDREN flag</span>
<a name="l00192"></a>00192 <span class="comment"> * to av_opt_find() will make the function search children recursively.</span>
<a name="l00193"></a>00193 <span class="comment"> *</span>
<a name="l00194"></a>00194 <span class="comment"> * For enumerating there are basically two cases. The first is when you want to</span>
<a name="l00195"></a>00195 <span class="comment"> * get all options that may potentially exist on the struct and its children</span>
<a name="l00196"></a>00196 <span class="comment"> * (e.g.  when constructing documentation). In that case you should call</span>
<a name="l00197"></a>00197 <span class="comment"> * av_opt_child_class_next() recursively on the parent struct&#39;s AVClass.  The</span>
<a name="l00198"></a>00198 <span class="comment"> * second case is when you have an already initialized struct with all its</span>
<a name="l00199"></a>00199 <span class="comment"> * children and you want to get all options that can be actually written or read</span>
<a name="l00200"></a>00200 <span class="comment"> * from it. In that case you should call av_opt_child_next() recursively (and</span>
<a name="l00201"></a>00201 <span class="comment"> * av_opt_next() on each result).</span>
<a name="l00202"></a>00202 <span class="comment"> *</span>
<a name="l00203"></a>00203 <span class="comment"> * @subsection avoptions_use_get_set Reading and writing AVOptions</span>
<a name="l00204"></a>00204 <span class="comment"> * When setting options, you often have a string read directly from the</span>
<a name="l00205"></a>00205 <span class="comment"> * user. In such a case, simply passing it to av_opt_set() is enough. For</span>
<a name="l00206"></a>00206 <span class="comment"> * non-string type options, av_opt_set() will parse the string according to the</span>
<a name="l00207"></a>00207 <span class="comment"> * option type.</span>
<a name="l00208"></a>00208 <span class="comment"> *</span>
<a name="l00209"></a>00209 <span class="comment"> * Similarly av_opt_get() will read any option type and convert it to a string</span>
<a name="l00210"></a>00210 <span class="comment"> * which will be returned. Do not forget that the string is allocated, so you</span>
<a name="l00211"></a>00211 <span class="comment"> * have to free it with av_free().</span>
<a name="l00212"></a>00212 <span class="comment"> *</span>
<a name="l00213"></a>00213 <span class="comment"> * In some cases it may be more convenient to put all options into an</span>
<a name="l00214"></a>00214 <span class="comment"> * AVDictionary and call av_opt_set_dict() on it. A specific case of this</span>
<a name="l00215"></a>00215 <span class="comment"> * are the format/codec open functions in lavf/lavc which take a dictionary</span>
<a name="l00216"></a>00216 <span class="comment"> * filled with option as a parameter. This makes it possible to set some options</span>
<a name="l00217"></a>00217 <span class="comment"> * that cannot be set otherwise, since e.g. the input file format is not known</span>
<a name="l00218"></a>00218 <span class="comment"> * before the file is actually opened.</span>
<a name="l00219"></a>00219 <span class="comment"> */</span>
<a name="l00220"></a>00220 
<a name="l00221"></a><a class="code" href="group__avoptions.html#gabd75aa30eb8ad6387672df9a1fa79444">00221</a> <span class="keyword">enum</span> <a class="code" href="group__avoptions.html#gabd75aa30eb8ad6387672df9a1fa79444">AVOptionType</a>{
<a name="l00222"></a><a class="code" href="group__avoptions.html#ggabd75aa30eb8ad6387672df9a1fa79444a7aaeee142b88a3078ddc57c644b49a7e">00222</a>     <a class="code" href="group__avoptions.html#ggabd75aa30eb8ad6387672df9a1fa79444a7aaeee142b88a3078ddc57c644b49a7e">AV_OPT_TYPE_FLAGS</a>,
<a name="l00223"></a><a class="code" href="group__avoptions.html#ggabd75aa30eb8ad6387672df9a1fa79444ac068b8f6afeeb293a13aeabb5d702411">00223</a>     <a class="code" href="group__avoptions.html#ggabd75aa30eb8ad6387672df9a1fa79444ac068b8f6afeeb293a13aeabb5d702411">AV_OPT_TYPE_INT</a>,
<a name="l00224"></a><a class="code" href="group__avoptions.html#ggabd75aa30eb8ad6387672df9a1fa79444a94d540a5b928da813ff94d9367a1078a">00224</a>     <a class="code" href="group__avoptions.html#ggabd75aa30eb8ad6387672df9a1fa79444a94d540a5b928da813ff94d9367a1078a">AV_OPT_TYPE_INT64</a>,
<a name="l00225"></a><a class="code" href="group__avoptions.html#ggabd75aa30eb8ad6387672df9a1fa79444ae0b49ec51847a758ceb46976083da2e5">00225</a>     <a class="code" href="group__avoptions.html#ggabd75aa30eb8ad6387672df9a1fa79444ae0b49ec51847a758ceb46976083da2e5">AV_OPT_TYPE_DOUBLE</a>,
<a name="l00226"></a><a class="code" href="group__avoptions.html#ggabd75aa30eb8ad6387672df9a1fa79444ae91d3f6cbac4a4de2a6e880ac2a52d1a">00226</a>     <a class="code" href="group__avoptions.html#ggabd75aa30eb8ad6387672df9a1fa79444ae91d3f6cbac4a4de2a6e880ac2a52d1a">AV_OPT_TYPE_FLOAT</a>,
<a name="l00227"></a><a class="code" href="group__avoptions.html#ggabd75aa30eb8ad6387672df9a1fa79444afadddce95ad3b690dd38644b458b96c4">00227</a>     <a class="code" href="group__avoptions.html#ggabd75aa30eb8ad6387672df9a1fa79444afadddce95ad3b690dd38644b458b96c4">AV_OPT_TYPE_STRING</a>,
<a name="l00228"></a><a class="code" href="group__avoptions.html#ggabd75aa30eb8ad6387672df9a1fa79444a74ba464440564230a72b95b39593cbfc">00228</a>     <a class="code" href="group__avoptions.html#ggabd75aa30eb8ad6387672df9a1fa79444a74ba464440564230a72b95b39593cbfc">AV_OPT_TYPE_RATIONAL</a>,
<a name="l00229"></a><a class="code" href="group__avoptions.html#ggabd75aa30eb8ad6387672df9a1fa79444a2689966edbe494482dfdfaa4efdf95d3">00229</a>     <a class="code" href="group__avoptions.html#ggabd75aa30eb8ad6387672df9a1fa79444a2689966edbe494482dfdfaa4efdf95d3" title="offset must point to a pointer immediately followed by an int for the length">AV_OPT_TYPE_BINARY</a>,  <span class="comment">///&lt; offset must point to a pointer immediately followed by an int for the length</span>
<a name="l00230"></a><a class="code" href="group__avoptions.html#ggabd75aa30eb8ad6387672df9a1fa79444aed6f0d8e5b8f3edcaea01c15ab43aefd">00230</a> <span class="comment"></span>    <a class="code" href="group__avoptions.html#ggabd75aa30eb8ad6387672df9a1fa79444aed6f0d8e5b8f3edcaea01c15ab43aefd">AV_OPT_TYPE_DICT</a>,
<a name="l00231"></a><a class="code" href="group__avoptions.html#ggabd75aa30eb8ad6387672df9a1fa79444a0fa9f07d428bdc32495fe55c365c5329">00231</a>     <a class="code" href="group__avoptions.html#ggabd75aa30eb8ad6387672df9a1fa79444a0fa9f07d428bdc32495fe55c365c5329">AV_OPT_TYPE_CONST</a> = 128,
<a name="l00232"></a><a class="code" href="group__avoptions.html#ggabd75aa30eb8ad6387672df9a1fa79444a078f280b98b49a9f585c5d479b711d9a">00232</a>     <a class="code" href="group__avoptions.html#ggabd75aa30eb8ad6387672df9a1fa79444a078f280b98b49a9f585c5d479b711d9a" title="offset must point to two consecutive integers">AV_OPT_TYPE_IMAGE_SIZE</a> = <a class="code" href="common_8h.html#a1e233db224cd0a3079fd4572d1a3d717">MKBETAG</a>(<span class="charliteral">&#39;S&#39;</span>,<span class="charliteral">&#39;I&#39;</span>,<span class="charliteral">&#39;Z&#39;</span>,<span class="charliteral">&#39;E&#39;</span>), <span class="comment">///&lt; offset must point to two consecutive integers</span>
<a name="l00233"></a><a class="code" href="group__avoptions.html#ggabd75aa30eb8ad6387672df9a1fa79444a114085ba9877df34de060124877d8274">00233</a> <span class="comment"></span>    <a class="code" href="group__avoptions.html#ggabd75aa30eb8ad6387672df9a1fa79444a114085ba9877df34de060124877d8274">AV_OPT_TYPE_PIXEL_FMT</a>  = <a class="code" href="common_8h.html#a1e233db224cd0a3079fd4572d1a3d717">MKBETAG</a>(<span class="charliteral">&#39;P&#39;</span>,<span class="charliteral">&#39;F&#39;</span>,<span class="charliteral">&#39;M&#39;</span>,<span class="charliteral">&#39;T&#39;</span>),
<a name="l00234"></a><a class="code" href="group__avoptions.html#ggabd75aa30eb8ad6387672df9a1fa79444a711661923db91bbbd4abdec0efa5ff0a">00234</a>     <a class="code" href="group__avoptions.html#ggabd75aa30eb8ad6387672df9a1fa79444a711661923db91bbbd4abdec0efa5ff0a">AV_OPT_TYPE_SAMPLE_FMT</a> = <a class="code" href="common_8h.html#a1e233db224cd0a3079fd4572d1a3d717">MKBETAG</a>(<span class="charliteral">&#39;S&#39;</span>,<span class="charliteral">&#39;F&#39;</span>,<span class="charliteral">&#39;M&#39;</span>,<span class="charliteral">&#39;T&#39;</span>),
<a name="l00235"></a><a class="code" href="group__avoptions.html#ggabd75aa30eb8ad6387672df9a1fa79444a9429811abc62d4a564ec56938df0a572">00235</a>     <a class="code" href="group__avoptions.html#ggabd75aa30eb8ad6387672df9a1fa79444a9429811abc62d4a564ec56938df0a572" title="offset must point to AVRational">AV_OPT_TYPE_VIDEO_RATE</a> = <a class="code" href="common_8h.html#a1e233db224cd0a3079fd4572d1a3d717">MKBETAG</a>(<span class="charliteral">&#39;V&#39;</span>,<span class="charliteral">&#39;R&#39;</span>,<span class="charliteral">&#39;A&#39;</span>,<span class="charliteral">&#39;T&#39;</span>), <span class="comment">///&lt; offset must point to AVRational</span>
<a name="l00236"></a><a class="code" href="group__avoptions.html#ggabd75aa30eb8ad6387672df9a1fa79444a2e3a2fc47ae688f28cc4abe59452a032">00236</a> <span class="comment"></span>    <a class="code" href="group__avoptions.html#ggabd75aa30eb8ad6387672df9a1fa79444a2e3a2fc47ae688f28cc4abe59452a032">AV_OPT_TYPE_DURATION</a>   = <a class="code" href="common_8h.html#a1e233db224cd0a3079fd4572d1a3d717">MKBETAG</a>(<span class="charliteral">&#39;D&#39;</span>,<span class="charliteral">&#39;U&#39;</span>,<span class="charliteral">&#39;R&#39;</span>,<span class="charliteral">&#39; &#39;</span>),
<a name="l00237"></a><a class="code" href="group__avoptions.html#ggabd75aa30eb8ad6387672df9a1fa79444afdcd13cbd184901b05e27595e647fadc">00237</a>     <a class="code" href="group__avoptions.html#ggabd75aa30eb8ad6387672df9a1fa79444afdcd13cbd184901b05e27595e647fadc">AV_OPT_TYPE_COLOR</a>      = <a class="code" href="common_8h.html#a1e233db224cd0a3079fd4572d1a3d717">MKBETAG</a>(<span class="charliteral">&#39;C&#39;</span>,<span class="charliteral">&#39;O&#39;</span>,<span class="charliteral">&#39;L&#39;</span>,<span class="charliteral">&#39;R&#39;</span>),
<a name="l00238"></a><a class="code" href="group__avoptions.html#ggabd75aa30eb8ad6387672df9a1fa79444a5628c270688d2ec28643dfff825dbe26">00238</a>     <a class="code" href="group__avoptions.html#ggabd75aa30eb8ad6387672df9a1fa79444a5628c270688d2ec28643dfff825dbe26">AV_OPT_TYPE_CHANNEL_LAYOUT</a> = <a class="code" href="common_8h.html#a1e233db224cd0a3079fd4572d1a3d717">MKBETAG</a>(<span class="charliteral">&#39;C&#39;</span>,<span class="charliteral">&#39;H&#39;</span>,<span class="charliteral">&#39;L&#39;</span>,<span class="charliteral">&#39;A&#39;</span>),
<a name="l00239"></a>00239 <span class="preprocessor">#if FF_API_OLD_AVOPTIONS</span>
<a name="l00240"></a>00240 <span class="preprocessor"></span>    FF_OPT_TYPE_FLAGS = 0,
<a name="l00241"></a>00241     FF_OPT_TYPE_INT,
<a name="l00242"></a>00242     FF_OPT_TYPE_INT64,
<a name="l00243"></a>00243     FF_OPT_TYPE_DOUBLE,
<a name="l00244"></a>00244     FF_OPT_TYPE_FLOAT,
<a name="l00245"></a>00245     FF_OPT_TYPE_STRING,
<a name="l00246"></a>00246     FF_OPT_TYPE_RATIONAL,
<a name="l00247"></a>00247     FF_OPT_TYPE_BINARY,  <span class="comment">///&lt; offset must point to a pointer immediately followed by an int for the length</span>
<a name="l00248"></a>00248 <span class="comment"></span>    FF_OPT_TYPE_CONST=128,
<a name="l00249"></a>00249 <span class="preprocessor">#endif</span>
<a name="l00250"></a>00250 <span class="preprocessor"></span>};
<a name="l00251"></a>00251 <span class="comment"></span>
<a name="l00252"></a>00252 <span class="comment">/**</span>
<a name="l00253"></a>00253 <span class="comment"> * AVOption</span>
<a name="l00254"></a>00254 <span class="comment"> */</span>
<a name="l00255"></a><a class="code" href="structAVOption.html">00255</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structAVOption.html" title="AVOption.">AVOption</a> {
<a name="l00256"></a><a class="code" href="structAVOption.html#a87e81c6e58d6a94d97a98ad15a4e507c">00256</a>     <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="structAVOption.html#a87e81c6e58d6a94d97a98ad15a4e507c">name</a>;
<a name="l00257"></a>00257 <span class="comment"></span>
<a name="l00258"></a>00258 <span class="comment">    /**</span>
<a name="l00259"></a>00259 <span class="comment">     * short English help text</span>
<a name="l00260"></a>00260 <span class="comment">     * @todo What about other languages?</span>
<a name="l00261"></a>00261 <span class="comment">     */</span>
<a name="l00262"></a><a class="code" href="structAVOption.html#a6c72d22b8c599e89abba088b85dfcd8a">00262</a>     <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="structAVOption.html#a6c72d22b8c599e89abba088b85dfcd8a" title="short English help text">help</a>;
<a name="l00263"></a>00263 <span class="comment"></span>
<a name="l00264"></a>00264 <span class="comment">    /**</span>
<a name="l00265"></a>00265 <span class="comment">     * The offset relative to the context structure where the option</span>
<a name="l00266"></a>00266 <span class="comment">     * value is stored. It should be 0 for named constants.</span>
<a name="l00267"></a>00267 <span class="comment">     */</span>
<a name="l00268"></a><a class="code" href="structAVOption.html#a0ab0d209c04b72cfd72808c9e9e46a46">00268</a>     <span class="keywordtype">int</span> <a class="code" href="structAVOption.html#a0ab0d209c04b72cfd72808c9e9e46a46" title="The offset relative to the context structure where the option value is stored.">offset</a>;
<a name="l00269"></a><a class="code" href="structAVOption.html#af50f9be082b4b1cf0d76b1e24face3bc">00269</a>     <span class="keyword">enum</span> <a class="code" href="group__avoptions.html#gabd75aa30eb8ad6387672df9a1fa79444">AVOptionType</a> <a class="code" href="structAVOption.html#af50f9be082b4b1cf0d76b1e24face3bc">type</a>;
<a name="l00270"></a>00270 <span class="comment"></span>
<a name="l00271"></a>00271 <span class="comment">    /**</span>
<a name="l00272"></a>00272 <span class="comment">     * the default value for scalar options</span>
<a name="l00273"></a>00273 <span class="comment">     */</span>
<a name="l00274"></a>00274     <span class="keyword">union </span>{
<a name="l00275"></a><a class="code" href="structAVOption.html#a9ee4ba4426ba1ff7e2f8030d2c49ba35">00275</a>         int64_t <a class="code" href="structAVOption.html#a9ee4ba4426ba1ff7e2f8030d2c49ba35">i64</a>;
<a name="l00276"></a><a class="code" href="structAVOption.html#afd9a2f8e983c9ee8de643621022064f0">00276</a>         <span class="keywordtype">double</span> <a class="code" href="structAVOption.html#afd9a2f8e983c9ee8de643621022064f0">dbl</a>;
<a name="l00277"></a><a class="code" href="structAVOption.html#a3edf01c0c79e387474ef38a3d9e6f79c">00277</a>         <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="structAVOption.html#a3edf01c0c79e387474ef38a3d9e6f79c">str</a>;
<a name="l00278"></a>00278         <span class="comment">/* TODO those are unused now */</span>
<a name="l00279"></a><a class="code" href="structAVOption.html#a3dc71ba8963767a30821b5b2bfc7e79d">00279</a>         <a class="code" href="structAVRational.html" title="rational number numerator/denominator">AVRational</a> <a class="code" href="structAVOption.html#a3dc71ba8963767a30821b5b2bfc7e79d">q</a>;
<a name="l00280"></a>00280     } <a class="code" href="structAVOption.html#aadaee22a6718de3488a91944d3bb92c9" title="the default value for scalar options">default_val</a>;
<a name="l00281"></a><a class="code" href="structAVOption.html#aaf1937648549dce7a4be35268a359a19">00281</a>     <span class="keywordtype">double</span> <a class="code" href="structAVOption.html#aaf1937648549dce7a4be35268a359a19" title="minimum valid value for the option">min</a>;                 <span class="comment">///&lt; minimum valid value for the option</span>
<a name="l00282"></a><a class="code" href="structAVOption.html#a078ff8d3707143690d7d59d87d4706f4">00282</a> <span class="comment"></span>    <span class="keywordtype">double</span> <a class="code" href="structAVOption.html#a078ff8d3707143690d7d59d87d4706f4" title="maximum valid value for the option">max</a>;                 <span class="comment">///&lt; maximum valid value for the option</span>
<a name="l00283"></a>00283 <span class="comment"></span>
<a name="l00284"></a><a class="code" href="structAVOption.html#ae6b670af4b2c7819c35437cab61c2745">00284</a>     <span class="keywordtype">int</span> <a class="code" href="structAVOption.html#ae6b670af4b2c7819c35437cab61c2745">flags</a>;
<a name="l00285"></a><a class="code" href="opt_8h.html#aba0d5e41287b6fbeae5dd59f643695cc">00285</a> <span class="preprocessor">#define AV_OPT_FLAG_ENCODING_PARAM  1   ///&lt; a generic parameter which can be set by the user for muxing or encoding</span>
<a name="l00286"></a><a class="code" href="opt_8h.html#aad820197915e73441f76f5e0c384d78a">00286</a> <span class="preprocessor"></span><span class="preprocessor">#define AV_OPT_FLAG_DECODING_PARAM  2   ///&lt; a generic parameter which can be set by the user for demuxing or decoding</span>
<a name="l00287"></a>00287 <span class="preprocessor"></span><span class="preprocessor">#if FF_API_OPT_TYPE_METADATA</span>
<a name="l00288"></a>00288 <span class="preprocessor"></span><span class="preprocessor">#define AV_OPT_FLAG_METADATA        4   ///&lt; some data extracted or inserted into the file like title, comment, ...</span>
<a name="l00289"></a>00289 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00290"></a><a class="code" href="opt_8h.html#aaa63966a3f547a71a7742f4aea00093a">00290</a> <span class="preprocessor"></span><span class="preprocessor">#define AV_OPT_FLAG_AUDIO_PARAM     8</span>
<a name="l00291"></a><a class="code" href="opt_8h.html#aaf3d0af9d7eca757034486a8eb896246">00291</a> <span class="preprocessor"></span><span class="preprocessor">#define AV_OPT_FLAG_VIDEO_PARAM     16</span>
<a name="l00292"></a><a class="code" href="opt_8h.html#ad27ec6a75c8a2c21329e443b15b368c3">00292</a> <span class="preprocessor"></span><span class="preprocessor">#define AV_OPT_FLAG_SUBTITLE_PARAM  32</span>
<a name="l00293"></a>00293 <span class="preprocessor"></span><span class="comment">/**</span>
<a name="l00294"></a>00294 <span class="comment"> * The option is inteded for exporting values to the caller.</span>
<a name="l00295"></a>00295 <span class="comment"> */</span>
<a name="l00296"></a><a class="code" href="opt_8h.html#adf984463025a7861f3c21b113966cb53">00296</a> <span class="preprocessor">#define AV_OPT_FLAG_EXPORT          64</span>
<a name="l00297"></a>00297 <span class="preprocessor"></span><span class="comment">/**</span>
<a name="l00298"></a>00298 <span class="comment"> * The option may not be set through the AVOptions API, only read.</span>
<a name="l00299"></a>00299 <span class="comment"> * This flag only makes sense when AV_OPT_FLAG_EXPORT is also set.</span>
<a name="l00300"></a>00300 <span class="comment"> */</span>
<a name="l00301"></a><a class="code" href="opt_8h.html#a5f24d30655a5aea4dc8bd7263dbfd78c">00301</a> <span class="preprocessor">#define AV_OPT_FLAG_READONLY        128</span>
<a name="l00302"></a><a class="code" href="opt_8h.html#a1fa5f9ced9142668142f316b0aad2cfc">00302</a> <span class="preprocessor"></span><span class="preprocessor">#define AV_OPT_FLAG_FILTERING_PARAM (1&lt;&lt;16) ///&lt; a generic parameter which can be set by the user for filtering</span>
<a name="l00303"></a>00303 <span class="preprocessor"></span><span class="comment">//FIXME think about enc-audio, ... style flags</span>
<a name="l00304"></a>00304 <span class="comment"></span>
<a name="l00305"></a>00305 <span class="comment">    /**</span>
<a name="l00306"></a>00306 <span class="comment">     * The logical unit to which the option belongs. Non-constant</span>
<a name="l00307"></a>00307 <span class="comment">     * options and corresponding named constants share the same</span>
<a name="l00308"></a>00308 <span class="comment">     * unit. May be NULL.</span>
<a name="l00309"></a>00309 <span class="comment">     */</span>
<a name="l00310"></a><a class="code" href="structAVOption.html#a248d65a7cab7d7bd3a4eb51212ab0e49">00310</a>     <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="structAVOption.html#a248d65a7cab7d7bd3a4eb51212ab0e49" title="The logical unit to which the option belongs.">unit</a>;
<a name="l00311"></a>00311 } <a class="code" href="structAVOption.html" title="AVOption.">AVOption</a>;
<a name="l00312"></a>00312 <span class="comment"></span>
<a name="l00313"></a>00313 <span class="comment">/**</span>
<a name="l00314"></a>00314 <span class="comment"> * A single allowed range of values, or a single allowed value.</span>
<a name="l00315"></a>00315 <span class="comment"> */</span>
<a name="l00316"></a><a class="code" href="structAVOptionRange.html">00316</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structAVOptionRange.html" title="A single allowed range of values, or a single allowed value.">AVOptionRange</a> {
<a name="l00317"></a><a class="code" href="structAVOptionRange.html#a354f95a62affe330479bb9941146d734">00317</a>     <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="structAVOptionRange.html#a354f95a62affe330479bb9941146d734">str</a>;<span class="comment"></span>
<a name="l00318"></a>00318 <span class="comment">    /**</span>
<a name="l00319"></a>00319 <span class="comment">     * Value range.</span>
<a name="l00320"></a>00320 <span class="comment">     * For string ranges this represents the min/max length.</span>
<a name="l00321"></a>00321 <span class="comment">     * For dimensions this represents the min/max pixel count or width/height in multi-component case.</span>
<a name="l00322"></a>00322 <span class="comment">     */</span>
<a name="l00323"></a><a class="code" href="structAVOptionRange.html#adb21ecde2d4e6b47b9107816f9287ccb">00323</a>     <span class="keywordtype">double</span> <a class="code" href="structAVOptionRange.html#adb21ecde2d4e6b47b9107816f9287ccb" title="Value range.">value_min</a>, <a class="code" href="structAVOptionRange.html#aa2876b63377f218ec0faa3482c467086">value_max</a>;<span class="comment"></span>
<a name="l00324"></a>00324 <span class="comment">    /**</span>
<a name="l00325"></a>00325 <span class="comment">     * Value&#39;s component range.</span>
<a name="l00326"></a>00326 <span class="comment">     * For string this represents the unicode range for chars, 0-127 limits to ASCII.</span>
<a name="l00327"></a>00327 <span class="comment">     */</span>
<a name="l00328"></a><a class="code" href="structAVOptionRange.html#a2f107bb96630be02d4aec9657b24bb3a">00328</a>     <span class="keywordtype">double</span> <a class="code" href="structAVOptionRange.html#a2f107bb96630be02d4aec9657b24bb3a" title="Value&#39;s component range.">component_min</a>, <a class="code" href="structAVOptionRange.html#a120c4beda04930e2e9a51237d99c96c9">component_max</a>;<span class="comment"></span>
<a name="l00329"></a>00329 <span class="comment">    /**</span>
<a name="l00330"></a>00330 <span class="comment">     * Range flag.</span>
<a name="l00331"></a>00331 <span class="comment">     * If set to 1 the struct encodes a range, if set to 0 a single value.</span>
<a name="l00332"></a>00332 <span class="comment">     */</span>
<a name="l00333"></a><a class="code" href="structAVOptionRange.html#afb2f043056ff5fea103f24ba98eafafc">00333</a>     <span class="keywordtype">int</span> <a class="code" href="structAVOptionRange.html#afb2f043056ff5fea103f24ba98eafafc" title="Range flag.">is_range</a>;
<a name="l00334"></a>00334 } <a class="code" href="structAVOptionRange.html" title="A single allowed range of values, or a single allowed value.">AVOptionRange</a>;
<a name="l00335"></a>00335 <span class="comment"></span>
<a name="l00336"></a>00336 <span class="comment">/**</span>
<a name="l00337"></a>00337 <span class="comment"> * List of AVOptionRange structs.</span>
<a name="l00338"></a>00338 <span class="comment"> */</span>
<a name="l00339"></a><a class="code" href="structAVOptionRanges.html">00339</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structAVOptionRanges.html" title="List of AVOptionRange structs.">AVOptionRanges</a> {<span class="comment"></span>
<a name="l00340"></a>00340 <span class="comment">    /**</span>
<a name="l00341"></a>00341 <span class="comment">     * Array of option ranges.</span>
<a name="l00342"></a>00342 <span class="comment">     *</span>
<a name="l00343"></a>00343 <span class="comment">     * Most of option types use just one component.</span>
<a name="l00344"></a>00344 <span class="comment">     * Following describes multi-component option types:</span>
<a name="l00345"></a>00345 <span class="comment">     *</span>
<a name="l00346"></a>00346 <span class="comment">     * AV_OPT_TYPE_IMAGE_SIZE:</span>
<a name="l00347"></a>00347 <span class="comment">     * component index 0: range of pixel count (width * height).</span>
<a name="l00348"></a>00348 <span class="comment">     * component index 1: range of width.</span>
<a name="l00349"></a>00349 <span class="comment">     * component index 2: range of height.</span>
<a name="l00350"></a>00350 <span class="comment">     *</span>
<a name="l00351"></a>00351 <span class="comment">     * @note To obtain multi-component version of this structure, user must</span>
<a name="l00352"></a>00352 <span class="comment">     *       provide AV_OPT_MULTI_COMPONENT_RANGE to av_opt_query_ranges or</span>
<a name="l00353"></a>00353 <span class="comment">     *       av_opt_query_ranges_default function.</span>
<a name="l00354"></a>00354 <span class="comment">     *</span>
<a name="l00355"></a>00355 <span class="comment">     * Multi-component range can be read as in following example:</span>
<a name="l00356"></a>00356 <span class="comment">     *</span>
<a name="l00357"></a>00357 <span class="comment">     * @code</span>
<a name="l00358"></a>00358 <span class="comment">     * int range_index, component_index;</span>
<a name="l00359"></a>00359 <span class="comment">     * AVOptionRanges *ranges;</span>
<a name="l00360"></a>00360 <span class="comment">     * AVOptionRange *range[3]; //may require more than 3 in the future.</span>
<a name="l00361"></a>00361 <span class="comment">     * av_opt_query_ranges(&amp;ranges, obj, key, AV_OPT_MULTI_COMPONENT_RANGE);</span>
<a name="l00362"></a>00362 <span class="comment">     * for (range_index = 0; range_index &lt; ranges-&gt;nb_ranges; range_index++) {</span>
<a name="l00363"></a>00363 <span class="comment">     *     for (component_index = 0; component_index &lt; ranges-&gt;nb_components; component_index++)</span>
<a name="l00364"></a>00364 <span class="comment">     *         range[component_index] = ranges-&gt;range[ranges-&gt;nb_ranges * component_index + range_index];</span>
<a name="l00365"></a>00365 <span class="comment">     *     //do something with range here.</span>
<a name="l00366"></a>00366 <span class="comment">     * }</span>
<a name="l00367"></a>00367 <span class="comment">     * av_opt_freep_ranges(&amp;ranges);</span>
<a name="l00368"></a>00368 <span class="comment">     * @endcode</span>
<a name="l00369"></a>00369 <span class="comment">     */</span>
<a name="l00370"></a><a class="code" href="structAVOptionRanges.html#a6e081daa7e707607e63165909b0995ce">00370</a>     <a class="code" href="structAVOptionRange.html" title="A single allowed range of values, or a single allowed value.">AVOptionRange</a> **<a class="code" href="structAVOptionRanges.html#a6e081daa7e707607e63165909b0995ce" title="Array of option ranges.">range</a>;<span class="comment"></span>
<a name="l00371"></a>00371 <span class="comment">    /**</span>
<a name="l00372"></a>00372 <span class="comment">     * Number of ranges per component.</span>
<a name="l00373"></a>00373 <span class="comment">     */</span>
<a name="l00374"></a><a class="code" href="structAVOptionRanges.html#a4cc8d5b5afbb07ae49357a7e0d6a2517">00374</a>     <span class="keywordtype">int</span> <a class="code" href="structAVOptionRanges.html#a4cc8d5b5afbb07ae49357a7e0d6a2517" title="Number of ranges per component.">nb_ranges</a>;<span class="comment"></span>
<a name="l00375"></a>00375 <span class="comment">    /**</span>
<a name="l00376"></a>00376 <span class="comment">     * Number of componentes.</span>
<a name="l00377"></a>00377 <span class="comment">     */</span>
<a name="l00378"></a><a class="code" href="structAVOptionRanges.html#aff53b7303e862ed17b10237ca52ce8a8">00378</a>     <span class="keywordtype">int</span> <a class="code" href="structAVOptionRanges.html#aff53b7303e862ed17b10237ca52ce8a8" title="Number of componentes.">nb_components</a>;
<a name="l00379"></a>00379 } <a class="code" href="structAVOptionRanges.html" title="List of AVOptionRange structs.">AVOptionRanges</a>;
<a name="l00380"></a>00380 
<a name="l00381"></a>00381 
<a name="l00382"></a>00382 <span class="preprocessor">#if FF_API_OLD_AVOPTIONS</span>
<a name="l00383"></a>00383 <span class="preprocessor"></span><span class="comment">/**</span>
<a name="l00384"></a>00384 <span class="comment"> * Set the field of obj with the given name to value.</span>
<a name="l00385"></a>00385 <span class="comment"> *</span>
<a name="l00386"></a>00386 <span class="comment"> * @param[in] obj A struct whose first element is a pointer to an</span>
<a name="l00387"></a>00387 <span class="comment"> * AVClass.</span>
<a name="l00388"></a>00388 <span class="comment"> * @param[in] name the name of the field to set</span>
<a name="l00389"></a>00389 <span class="comment"> * @param[in] val The value to set. If the field is not of a string</span>
<a name="l00390"></a>00390 <span class="comment"> * type, then the given string is parsed.</span>
<a name="l00391"></a>00391 <span class="comment"> * SI postfixes and some named scalars are supported.</span>
<a name="l00392"></a>00392 <span class="comment"> * If the field is of a numeric type, it has to be a numeric or named</span>
<a name="l00393"></a>00393 <span class="comment"> * scalar. Behavior with more than one scalar and +- infix operators</span>
<a name="l00394"></a>00394 <span class="comment"> * is undefined.</span>
<a name="l00395"></a>00395 <span class="comment"> * If the field is of a flags type, it has to be a sequence of numeric</span>
<a name="l00396"></a>00396 <span class="comment"> * scalars or named flags separated by &#39;+&#39; or &#39;-&#39;. Prefixing a flag</span>
<a name="l00397"></a>00397 <span class="comment"> * with &#39;+&#39; causes it to be set without affecting the other flags;</span>
<a name="l00398"></a>00398 <span class="comment"> * similarly, &#39;-&#39; unsets a flag.</span>
<a name="l00399"></a>00399 <span class="comment"> * @param[out] o_out if non-NULL put here a pointer to the AVOption</span>
<a name="l00400"></a>00400 <span class="comment"> * found</span>
<a name="l00401"></a>00401 <span class="comment"> * @param alloc this parameter is currently ignored</span>
<a name="l00402"></a>00402 <span class="comment"> * @return 0 if the value has been set, or an AVERROR code in case of</span>
<a name="l00403"></a>00403 <span class="comment"> * error:</span>
<a name="l00404"></a>00404 <span class="comment"> * AVERROR_OPTION_NOT_FOUND if no matching option exists</span>
<a name="l00405"></a>00405 <span class="comment"> * AVERROR(ERANGE) if the value is out of range</span>
<a name="l00406"></a>00406 <span class="comment"> * AVERROR(EINVAL) if the value is not valid</span>
<a name="l00407"></a>00407 <span class="comment"> * @deprecated use av_opt_set()</span>
<a name="l00408"></a>00408 <span class="comment"> */</span>
<a name="l00409"></a>00409 <a class="code" href="attributes_8h.html#aa6d076561d3a9eea4729ee632652de02">attribute_deprecated</a>
<a name="l00410"></a>00410 <span class="keywordtype">int</span> av_set_string3(<span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keyword">const</span> <span class="keywordtype">char</span> *val, <span class="keywordtype">int</span> alloc, <span class="keyword">const</span> <a class="code" href="structAVOption.html" title="AVOption.">AVOption</a> **o_out);
<a name="l00411"></a>00411 
<a name="l00412"></a>00412 <a class="code" href="attributes_8h.html#aa6d076561d3a9eea4729ee632652de02">attribute_deprecated</a> <span class="keyword">const</span> <a class="code" href="structAVOption.html" title="AVOption.">AVOption</a> *av_set_double(<span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keywordtype">double</span> n);
<a name="l00413"></a>00413 <a class="code" href="attributes_8h.html#aa6d076561d3a9eea4729ee632652de02">attribute_deprecated</a> <span class="keyword">const</span> <a class="code" href="structAVOption.html" title="AVOption.">AVOption</a> *av_set_q(<span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <span class="keywordtype">char</span> *name, <a class="code" href="structAVRational.html" title="rational number numerator/denominator">AVRational</a> n);
<a name="l00414"></a>00414 <a class="code" href="attributes_8h.html#aa6d076561d3a9eea4729ee632652de02">attribute_deprecated</a> <span class="keyword">const</span> <a class="code" href="structAVOption.html" title="AVOption.">AVOption</a> *av_set_int(<span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <span class="keywordtype">char</span> *name, int64_t n);
<a name="l00415"></a>00415 
<a name="l00416"></a>00416 <span class="keywordtype">double</span> av_get_double(<span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keyword">const</span> <a class="code" href="structAVOption.html" title="AVOption.">AVOption</a> **o_out);
<a name="l00417"></a>00417 <a class="code" href="structAVRational.html" title="rational number numerator/denominator">AVRational</a> av_get_q(<span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keyword">const</span> <a class="code" href="structAVOption.html" title="AVOption.">AVOption</a> **o_out);
<a name="l00418"></a>00418 int64_t av_get_int(<span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keyword">const</span> <a class="code" href="structAVOption.html" title="AVOption.">AVOption</a> **o_out);
<a name="l00419"></a>00419 <a class="code" href="attributes_8h.html#aa6d076561d3a9eea4729ee632652de02">attribute_deprecated</a> <span class="keyword">const</span> <span class="keywordtype">char</span> *av_get_string(<span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keyword">const</span> <a class="code" href="structAVOption.html" title="AVOption.">AVOption</a> **o_out, <span class="keywordtype">char</span> *buf, <span class="keywordtype">int</span> buf_len);
<a name="l00420"></a>00420 <a class="code" href="attributes_8h.html#aa6d076561d3a9eea4729ee632652de02">attribute_deprecated</a> <span class="keyword">const</span> <a class="code" href="structAVOption.html" title="AVOption.">AVOption</a> *av_next_option(<a class="code" href="group__depr__guards.html#ga782e553655937c70755555d8503652b8">FF_CONST_AVUTIL55</a> <span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <a class="code" href="structAVOption.html" title="AVOption.">AVOption</a> *last);
<a name="l00421"></a>00421 <span class="preprocessor">#endif</span>
<a name="l00422"></a>00422 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00423"></a>00423 <span class="comment">/**</span>
<a name="l00424"></a>00424 <span class="comment"> * Show the obj options.</span>
<a name="l00425"></a>00425 <span class="comment"> *</span>
<a name="l00426"></a>00426 <span class="comment"> * @param req_flags requested flags for the options to show. Show only the</span>
<a name="l00427"></a>00427 <span class="comment"> * options for which it is opt-&gt;flags &amp; req_flags.</span>
<a name="l00428"></a>00428 <span class="comment"> * @param rej_flags rejected flags for the options to show. Show only the</span>
<a name="l00429"></a>00429 <span class="comment"> * options for which it is !(opt-&gt;flags &amp; req_flags).</span>
<a name="l00430"></a>00430 <span class="comment"> * @param av_log_obj log context to use for showing the options</span>
<a name="l00431"></a>00431 <span class="comment"> */</span>
<a name="l00432"></a>00432 <span class="keywordtype">int</span> <a class="code" href="group__avoptions.html#gaf7394e27d34208b24af8bb4b4a11741b" title="Show the obj options.">av_opt_show2</a>(<span class="keywordtype">void</span> *obj, <span class="keywordtype">void</span> *av_log_obj, <span class="keywordtype">int</span> req_flags, <span class="keywordtype">int</span> rej_flags);
<a name="l00433"></a>00433 <span class="comment"></span>
<a name="l00434"></a>00434 <span class="comment">/**</span>
<a name="l00435"></a>00435 <span class="comment"> * Set the values of all AVOption fields to their default values.</span>
<a name="l00436"></a>00436 <span class="comment"> *</span>
<a name="l00437"></a>00437 <span class="comment"> * @param s an AVOption-enabled struct (its first member must be a pointer to AVClass)</span>
<a name="l00438"></a>00438 <span class="comment"> */</span>
<a name="l00439"></a>00439 <span class="keywordtype">void</span> <a class="code" href="group__avoptions.html#gad4ca968e9058b39b2da630ad0a091bdb" title="Set the values of all AVOption fields to their default values.">av_opt_set_defaults</a>(<span class="keywordtype">void</span> *s);
<a name="l00440"></a>00440 
<a name="l00441"></a>00441 <span class="preprocessor">#if FF_API_OLD_AVOPTIONS</span>
<a name="l00442"></a>00442 <span class="preprocessor"></span><a class="code" href="attributes_8h.html#aa6d076561d3a9eea4729ee632652de02">attribute_deprecated</a>
<a name="l00443"></a>00443 <span class="keywordtype">void</span> av_opt_set_defaults2(<span class="keywordtype">void</span> *s, <span class="keywordtype">int</span> mask, <span class="keywordtype">int</span> flags);
<a name="l00444"></a>00444 <span class="preprocessor">#endif</span>
<a name="l00445"></a>00445 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00446"></a>00446 <span class="comment">/**</span>
<a name="l00447"></a>00447 <span class="comment"> * Parse the key/value pairs list in opts. For each key/value pair</span>
<a name="l00448"></a>00448 <span class="comment"> * found, stores the value in the field in ctx that is named like the</span>
<a name="l00449"></a>00449 <span class="comment"> * key. ctx must be an AVClass context, storing is done using</span>
<a name="l00450"></a>00450 <span class="comment"> * AVOptions.</span>
<a name="l00451"></a>00451 <span class="comment"> *</span>
<a name="l00452"></a>00452 <span class="comment"> * @param opts options string to parse, may be NULL</span>
<a name="l00453"></a>00453 <span class="comment"> * @param key_val_sep a 0-terminated list of characters used to</span>
<a name="l00454"></a>00454 <span class="comment"> * separate key from value</span>
<a name="l00455"></a>00455 <span class="comment"> * @param pairs_sep a 0-terminated list of characters used to separate</span>
<a name="l00456"></a>00456 <span class="comment"> * two pairs from each other</span>
<a name="l00457"></a>00457 <span class="comment"> * @return the number of successfully set key/value pairs, or a negative</span>
<a name="l00458"></a>00458 <span class="comment"> * value corresponding to an AVERROR code in case of error:</span>
<a name="l00459"></a>00459 <span class="comment"> * AVERROR(EINVAL) if opts cannot be parsed,</span>
<a name="l00460"></a>00460 <span class="comment"> * the error code issued by av_opt_set() if a key/value pair</span>
<a name="l00461"></a>00461 <span class="comment"> * cannot be set</span>
<a name="l00462"></a>00462 <span class="comment"> */</span>
<a name="l00463"></a>00463 <span class="keywordtype">int</span> <a class="code" href="group__avoptions.html#gab48669d1326f7d47ef39e5702e34abd2" title="Parse the key/value pairs list in opts.">av_set_options_string</a>(<span class="keywordtype">void</span> *ctx, <span class="keyword">const</span> <span class="keywordtype">char</span> *opts,
<a name="l00464"></a>00464                           <span class="keyword">const</span> <span class="keywordtype">char</span> *key_val_sep, <span class="keyword">const</span> <span class="keywordtype">char</span> *pairs_sep);
<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"> * Parse the key-value pairs list in opts. For each key=value pair found,</span>
<a name="l00468"></a>00468 <span class="comment"> * set the value of the corresponding option in ctx.</span>
<a name="l00469"></a>00469 <span class="comment"> *</span>
<a name="l00470"></a>00470 <span class="comment"> * @param ctx          the AVClass object to set options on</span>
<a name="l00471"></a>00471 <span class="comment"> * @param opts         the options string, key-value pairs separated by a</span>
<a name="l00472"></a>00472 <span class="comment"> *                     delimiter</span>
<a name="l00473"></a>00473 <span class="comment"> * @param shorthand    a NULL-terminated array of options names for shorthand</span>
<a name="l00474"></a>00474 <span class="comment"> *                     notation: if the first field in opts has no key part,</span>
<a name="l00475"></a>00475 <span class="comment"> *                     the key is taken from the first element of shorthand;</span>
<a name="l00476"></a>00476 <span class="comment"> *                     then again for the second, etc., until either opts is</span>
<a name="l00477"></a>00477 <span class="comment"> *                     finished, shorthand is finished or a named option is</span>
<a name="l00478"></a>00478 <span class="comment"> *                     found; after that, all options must be named</span>
<a name="l00479"></a>00479 <span class="comment"> * @param key_val_sep  a 0-terminated list of characters used to separate</span>
<a name="l00480"></a>00480 <span class="comment"> *                     key from value, for example &#39;=&#39;</span>
<a name="l00481"></a>00481 <span class="comment"> * @param pairs_sep    a 0-terminated list of characters used to separate</span>
<a name="l00482"></a>00482 <span class="comment"> *                     two pairs from each other, for example &#39;:&#39; or &#39;,&#39;</span>
<a name="l00483"></a>00483 <span class="comment"> * @return  the number of successfully set key=value pairs, or a negative</span>
<a name="l00484"></a>00484 <span class="comment"> *          value corresponding to an AVERROR code in case of error:</span>
<a name="l00485"></a>00485 <span class="comment"> *          AVERROR(EINVAL) if opts cannot be parsed,</span>
<a name="l00486"></a>00486 <span class="comment"> *          the error code issued by av_set_string3() if a key/value pair</span>
<a name="l00487"></a>00487 <span class="comment"> *          cannot be set</span>
<a name="l00488"></a>00488 <span class="comment"> *</span>
<a name="l00489"></a>00489 <span class="comment"> * Options names must use only the following characters: a-z A-Z 0-9 - . / _</span>
<a name="l00490"></a>00490 <span class="comment"> * Separators must use characters distinct from option names and from each</span>
<a name="l00491"></a>00491 <span class="comment"> * other.</span>
<a name="l00492"></a>00492 <span class="comment"> */</span>
<a name="l00493"></a>00493 <span class="keywordtype">int</span> <a class="code" href="group__avoptions.html#gaa936b1aa7caca67b21cd50819c2b9fb1" title="Parse the key-value pairs list in opts.">av_opt_set_from_string</a>(<span class="keywordtype">void</span> *ctx, <span class="keyword">const</span> <span class="keywordtype">char</span> *opts,
<a name="l00494"></a>00494                            <span class="keyword">const</span> <span class="keywordtype">char</span> *<span class="keyword">const</span> *shorthand,
<a name="l00495"></a>00495                            <span class="keyword">const</span> <span class="keywordtype">char</span> *key_val_sep, <span class="keyword">const</span> <span class="keywordtype">char</span> *pairs_sep);<span class="comment"></span>
<a name="l00496"></a>00496 <span class="comment">/**</span>
<a name="l00497"></a>00497 <span class="comment"> * Free all allocated objects in obj.</span>
<a name="l00498"></a>00498 <span class="comment"> */</span>
<a name="l00499"></a>00499 <span class="keywordtype">void</span> <a class="code" href="group__avoptions.html#gac14db824af52baf8181406e98d116097" title="Free all allocated objects in obj.">av_opt_free</a>(<span class="keywordtype">void</span> *obj);
<a name="l00500"></a>00500 <span class="comment"></span>
<a name="l00501"></a>00501 <span class="comment">/**</span>
<a name="l00502"></a>00502 <span class="comment"> * Check whether a particular flag is set in a flags field.</span>
<a name="l00503"></a>00503 <span class="comment"> *</span>
<a name="l00504"></a>00504 <span class="comment"> * @param field_name the name of the flag field option</span>
<a name="l00505"></a>00505 <span class="comment"> * @param flag_name the name of the flag to check</span>
<a name="l00506"></a>00506 <span class="comment"> * @return non-zero if the flag is set, zero if the flag isn&#39;t set,</span>
<a name="l00507"></a>00507 <span class="comment"> *         isn&#39;t of the right type, or the flags field doesn&#39;t exist.</span>
<a name="l00508"></a>00508 <span class="comment"> */</span>
<a name="l00509"></a>00509 <span class="keywordtype">int</span> <a class="code" href="group__avoptions.html#ga1436a3afc8dbc70ed9e70c8287dcc766" title="Check whether a particular flag is set in a flags field.">av_opt_flag_is_set</a>(<span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <span class="keywordtype">char</span> *field_name, <span class="keyword">const</span> <span class="keywordtype">char</span> *flag_name);
<a name="l00510"></a>00510 <span class="comment"></span>
<a name="l00511"></a>00511 <span class="comment">/**</span>
<a name="l00512"></a>00512 <span class="comment"> * Set all the options from a given dictionary on an object.</span>
<a name="l00513"></a>00513 <span class="comment"> *</span>
<a name="l00514"></a>00514 <span class="comment"> * @param obj a struct whose first element is a pointer to AVClass</span>
<a name="l00515"></a>00515 <span class="comment"> * @param options options to process. This dictionary will be freed and replaced</span>
<a name="l00516"></a>00516 <span class="comment"> *                by a new one containing all options not found in obj.</span>
<a name="l00517"></a>00517 <span class="comment"> *                Of course this new dictionary needs to be freed by caller</span>
<a name="l00518"></a>00518 <span class="comment"> *                with av_dict_free().</span>
<a name="l00519"></a>00519 <span class="comment"> *</span>
<a name="l00520"></a>00520 <span class="comment"> * @return 0 on success, a negative AVERROR if some option was found in obj,</span>
<a name="l00521"></a>00521 <span class="comment"> *         but could not be set.</span>
<a name="l00522"></a>00522 <span class="comment"> *</span>
<a name="l00523"></a>00523 <span class="comment"> * @see av_dict_copy()</span>
<a name="l00524"></a>00524 <span class="comment"> */</span>
<a name="l00525"></a>00525 <span class="keywordtype">int</span> <a class="code" href="group__avoptions.html#gaf1a88e8f152d7835f111b1ef8813fb2e" title="Set all the options from a given dictionary on an object.">av_opt_set_dict</a>(<span class="keywordtype">void</span> *obj, <span class="keyword">struct</span> <a class="code" href="group__lavu__dict.html#ga1d7cc0833bee918994a600556410315f">AVDictionary</a> **options);
<a name="l00526"></a>00526 
<a name="l00527"></a>00527 <span class="comment"></span>
<a name="l00528"></a>00528 <span class="comment">/**</span>
<a name="l00529"></a>00529 <span class="comment"> * Set all the options from a given dictionary on an object.</span>
<a name="l00530"></a>00530 <span class="comment"> *</span>
<a name="l00531"></a>00531 <span class="comment"> * @param obj a struct whose first element is a pointer to AVClass</span>
<a name="l00532"></a>00532 <span class="comment"> * @param options options to process. This dictionary will be freed and replaced</span>
<a name="l00533"></a>00533 <span class="comment"> *                by a new one containing all options not found in obj.</span>
<a name="l00534"></a>00534 <span class="comment"> *                Of course this new dictionary needs to be freed by caller</span>
<a name="l00535"></a>00535 <span class="comment"> *                with av_dict_free().</span>
<a name="l00536"></a>00536 <span class="comment"> * @param search_flags A combination of AV_OPT_SEARCH_*.</span>
<a name="l00537"></a>00537 <span class="comment"> *</span>
<a name="l00538"></a>00538 <span class="comment"> * @return 0 on success, a negative AVERROR if some option was found in obj,</span>
<a name="l00539"></a>00539 <span class="comment"> *         but could not be set.</span>
<a name="l00540"></a>00540 <span class="comment"> *</span>
<a name="l00541"></a>00541 <span class="comment"> * @see av_dict_copy()</span>
<a name="l00542"></a>00542 <span class="comment"> */</span>
<a name="l00543"></a>00543 <span class="keywordtype">int</span> <a class="code" href="group__avoptions.html#ga1824a600b215f1807e77b5f6cfa58586" title="Set all the options from a given dictionary on an object.">av_opt_set_dict2</a>(<span class="keywordtype">void</span> *obj, <span class="keyword">struct</span> <a class="code" href="group__lavu__dict.html#ga1d7cc0833bee918994a600556410315f">AVDictionary</a> **options, <span class="keywordtype">int</span> search_flags);
<a name="l00544"></a>00544 <span class="comment"></span>
<a name="l00545"></a>00545 <span class="comment">/**</span>
<a name="l00546"></a>00546 <span class="comment"> * Extract a key-value pair from the beginning of a string.</span>
<a name="l00547"></a>00547 <span class="comment"> *</span>
<a name="l00548"></a>00548 <span class="comment"> * @param ropts        pointer to the options string, will be updated to</span>
<a name="l00549"></a>00549 <span class="comment"> *                     point to the rest of the string (one of the pairs_sep</span>
<a name="l00550"></a>00550 <span class="comment"> *                     or the final NUL)</span>
<a name="l00551"></a>00551 <span class="comment"> * @param key_val_sep  a 0-terminated list of characters used to separate</span>
<a name="l00552"></a>00552 <span class="comment"> *                     key from value, for example &#39;=&#39;</span>
<a name="l00553"></a>00553 <span class="comment"> * @param pairs_sep    a 0-terminated list of characters used to separate</span>
<a name="l00554"></a>00554 <span class="comment"> *                     two pairs from each other, for example &#39;:&#39; or &#39;,&#39;</span>
<a name="l00555"></a>00555 <span class="comment"> * @param flags        flags; see the AV_OPT_FLAG_* values below</span>
<a name="l00556"></a>00556 <span class="comment"> * @param rkey         parsed key; must be freed using av_free()</span>
<a name="l00557"></a>00557 <span class="comment"> * @param rval         parsed value; must be freed using av_free()</span>
<a name="l00558"></a>00558 <span class="comment"> *</span>
<a name="l00559"></a>00559 <span class="comment"> * @return  &gt;=0 for success, or a negative value corresponding to an</span>
<a name="l00560"></a>00560 <span class="comment"> *          AVERROR code in case of error; in particular:</span>
<a name="l00561"></a>00561 <span class="comment"> *          AVERROR(EINVAL) if no key is present</span>
<a name="l00562"></a>00562 <span class="comment"> *</span>
<a name="l00563"></a>00563 <span class="comment"> */</span>
<a name="l00564"></a>00564 <span class="keywordtype">int</span> <a class="code" href="group__avoptions.html#ga1e459af4e23415b8eb9b05aee81c933c" title="Extract a key-value pair from the beginning of a string.">av_opt_get_key_value</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> **ropts,
<a name="l00565"></a>00565                          <span class="keyword">const</span> <span class="keywordtype">char</span> *key_val_sep, <span class="keyword">const</span> <span class="keywordtype">char</span> *pairs_sep,
<a name="l00566"></a>00566                          <span class="keywordtype">unsigned</span> flags,
<a name="l00567"></a>00567                          <span class="keywordtype">char</span> **rkey, <span class="keywordtype">char</span> **rval);
<a name="l00568"></a>00568 
<a name="l00569"></a>00569 <span class="keyword">enum</span> {
<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">     * Accept to parse a value without a key; the key will then be returned</span>
<a name="l00573"></a>00573 <span class="comment">     * as NULL.</span>
<a name="l00574"></a>00574 <span class="comment">     */</span>
<a name="l00575"></a><a class="code" href="group__avoptions.html#gga61dadd085c1777f559549e05962b2c9eaa836a939d74606db85ce1f09470d1605">00575</a>     <a class="code" href="group__avoptions.html#gga61dadd085c1777f559549e05962b2c9eaa836a939d74606db85ce1f09470d1605" title="Accept to parse a value without a key; the key will then be returned as NULL.">AV_OPT_FLAG_IMPLICIT_KEY</a> = 1,
<a name="l00576"></a>00576 };
<a name="l00577"></a>00577 <span class="comment"></span>
<a name="l00578"></a>00578 <span class="comment">/**</span>
<a name="l00579"></a>00579 <span class="comment"> * @defgroup opt_eval_funcs Evaluating option strings</span>
<a name="l00580"></a>00580 <span class="comment"> * @{</span>
<a name="l00581"></a>00581 <span class="comment"> * This group of functions can be used to evaluate option strings</span>
<a name="l00582"></a>00582 <span class="comment"> * and get numbers out of them. They do the same thing as av_opt_set(),</span>
<a name="l00583"></a>00583 <span class="comment"> * except the result is written into the caller-supplied pointer.</span>
<a name="l00584"></a>00584 <span class="comment"> *</span>
<a name="l00585"></a>00585 <span class="comment"> * @param obj a struct whose first element is a pointer to AVClass.</span>
<a name="l00586"></a>00586 <span class="comment"> * @param o an option for which the string is to be evaluated.</span>
<a name="l00587"></a>00587 <span class="comment"> * @param val string to be evaluated.</span>
<a name="l00588"></a>00588 <span class="comment"> * @param *_out value of the string will be written here.</span>
<a name="l00589"></a>00589 <span class="comment"> *</span>
<a name="l00590"></a>00590 <span class="comment"> * @return 0 on success, a negative number on failure.</span>
<a name="l00591"></a>00591 <span class="comment"> */</span>
<a name="l00592"></a>00592 <span class="keywordtype">int</span> <a class="code" href="group__opt__eval__funcs.html#gae245940b870e13b759354d570decf3dc">av_opt_eval_flags</a> (<span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <a class="code" href="structAVOption.html" title="AVOption.">AVOption</a> *o, <span class="keyword">const</span> <span class="keywordtype">char</span> *val, <span class="keywordtype">int</span>        *flags_out);
<a name="l00593"></a>00593 <span class="keywordtype">int</span> <a class="code" href="group__opt__eval__funcs.html#ga8bcee89d4a51400092e2d653c842bfa8">av_opt_eval_int</a>   (<span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <a class="code" href="structAVOption.html" title="AVOption.">AVOption</a> *o, <span class="keyword">const</span> <span class="keywordtype">char</span> *val, <span class="keywordtype">int</span>        *int_out);
<a name="l00594"></a>00594 <span class="keywordtype">int</span> <a class="code" href="group__opt__eval__funcs.html#gae2285d602e2079f0df141826fc00c666">av_opt_eval_int64</a> (<span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <a class="code" href="structAVOption.html" title="AVOption.">AVOption</a> *o, <span class="keyword">const</span> <span class="keywordtype">char</span> *val, int64_t    *int64_out);
<a name="l00595"></a>00595 <span class="keywordtype">int</span> <a class="code" href="group__opt__eval__funcs.html#ga3c06cf2a2e7efc60d97adbeb7bbb6b44">av_opt_eval_float</a> (<span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <a class="code" href="structAVOption.html" title="AVOption.">AVOption</a> *o, <span class="keyword">const</span> <span class="keywordtype">char</span> *val, <span class="keywordtype">float</span>      *float_out);
<a name="l00596"></a>00596 <span class="keywordtype">int</span> <a class="code" href="group__opt__eval__funcs.html#gac65f3b9753c48616e8dd4dea0c47f9e6">av_opt_eval_double</a>(<span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <a class="code" href="structAVOption.html" title="AVOption.">AVOption</a> *o, <span class="keyword">const</span> <span class="keywordtype">char</span> *val, <span class="keywordtype">double</span>     *double_out);
<a name="l00597"></a>00597 <span class="keywordtype">int</span> <a class="code" href="group__opt__eval__funcs.html#gabd95639131aac582a2f7c4bfc5adb4b0">av_opt_eval_q</a>     (<span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <a class="code" href="structAVOption.html" title="AVOption.">AVOption</a> *o, <span class="keyword">const</span> <span class="keywordtype">char</span> *val, <a class="code" href="structAVRational.html" title="rational number numerator/denominator">AVRational</a> *q_out);<span class="comment"></span>
<a name="l00598"></a>00598 <span class="comment">/**</span>
<a name="l00599"></a>00599 <span class="comment"> * @}</span>
<a name="l00600"></a>00600 <span class="comment"> */</span>
<a name="l00601"></a>00601 
<a name="l00602"></a><a class="code" href="group__avoptions.html#ga25801ba4fc9b5313eb33ec84e082dd72">00602</a> <span class="preprocessor">#define AV_OPT_SEARCH_CHILDREN   0x0001 </span><span class="comment">/**&lt; Search in possible children of the</span>
<a name="l00603"></a>00603 <span class="comment">                                             given object first. */</span>
<a name="l00604"></a>00604 <span class="comment">/**</span>
<a name="l00605"></a>00605 <span class="comment"> *  The obj passed to av_opt_find() is fake -- only a double pointer to AVClass</span>
<a name="l00606"></a>00606 <span class="comment"> *  instead of a required pointer to a struct containing AVClass. This is</span>
<a name="l00607"></a>00607 <span class="comment"> *  useful for searching for options without needing to allocate the corresponding</span>
<a name="l00608"></a>00608 <span class="comment"> *  object.</span>
<a name="l00609"></a>00609 <span class="comment"> */</span>
<a name="l00610"></a><a class="code" href="group__avoptions.html#gaa764998552a6f6f66a47ecd52b345caa">00610</a> <span class="preprocessor">#define AV_OPT_SEARCH_FAKE_OBJ   0x0002</span>
<a name="l00611"></a>00611 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00612"></a>00612 <span class="comment">/**</span>
<a name="l00613"></a>00613 <span class="comment"> *  Allows av_opt_query_ranges and av_opt_query_ranges_default to return more than</span>
<a name="l00614"></a>00614 <span class="comment"> *  one component for certain option types.</span>
<a name="l00615"></a>00615 <span class="comment"> *  @see AVOptionRanges for details.</span>
<a name="l00616"></a>00616 <span class="comment"> */</span>
<a name="l00617"></a><a class="code" href="group__avoptions.html#ga1f10d07c79eec8bd1a8e1b91817e1b1a">00617</a> <span class="preprocessor">#define AV_OPT_MULTI_COMPONENT_RANGE 0x1000</span>
<a name="l00618"></a>00618 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00619"></a>00619 <span class="comment">/**</span>
<a name="l00620"></a>00620 <span class="comment"> * Look for an option in an object. Consider only options which</span>
<a name="l00621"></a>00621 <span class="comment"> * have all the specified flags set.</span>
<a name="l00622"></a>00622 <span class="comment"> *</span>
<a name="l00623"></a>00623 <span class="comment"> * @param[in] obj A pointer to a struct whose first element is a</span>
<a name="l00624"></a>00624 <span class="comment"> *                pointer to an AVClass.</span>
<a name="l00625"></a>00625 <span class="comment"> *                Alternatively a double pointer to an AVClass, if</span>
<a name="l00626"></a>00626 <span class="comment"> *                AV_OPT_SEARCH_FAKE_OBJ search flag is set.</span>
<a name="l00627"></a>00627 <span class="comment"> * @param[in] name The name of the option to look for.</span>
<a name="l00628"></a>00628 <span class="comment"> * @param[in] unit When searching for named constants, name of the unit</span>
<a name="l00629"></a>00629 <span class="comment"> *                 it belongs to.</span>
<a name="l00630"></a>00630 <span class="comment"> * @param opt_flags Find only options with all the specified flags set (AV_OPT_FLAG).</span>
<a name="l00631"></a>00631 <span class="comment"> * @param search_flags A combination of AV_OPT_SEARCH_*.</span>
<a name="l00632"></a>00632 <span class="comment"> *</span>
<a name="l00633"></a>00633 <span class="comment"> * @return A pointer to the option found, or NULL if no option</span>
<a name="l00634"></a>00634 <span class="comment"> *         was found.</span>
<a name="l00635"></a>00635 <span class="comment"> *</span>
<a name="l00636"></a>00636 <span class="comment"> * @note Options found with AV_OPT_SEARCH_CHILDREN flag may not be settable</span>
<a name="l00637"></a>00637 <span class="comment"> * directly with av_opt_set(). Use special calls which take an options</span>
<a name="l00638"></a>00638 <span class="comment"> * AVDictionary (e.g. avformat_open_input()) to set options found with this</span>
<a name="l00639"></a>00639 <span class="comment"> * flag.</span>
<a name="l00640"></a>00640 <span class="comment"> */</span>
<a name="l00641"></a>00641 <span class="keyword">const</span> <a class="code" href="structAVOption.html" title="AVOption.">AVOption</a> *<a class="code" href="group__avoptions.html#gae31ae7fb20113b00108d0ecf53f25664" title="Look for an option in an object.">av_opt_find</a>(<span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keyword">const</span> <span class="keywordtype">char</span> *unit,
<a name="l00642"></a>00642                             <span class="keywordtype">int</span> opt_flags, <span class="keywordtype">int</span> search_flags);
<a name="l00643"></a>00643 <span class="comment"></span>
<a name="l00644"></a>00644 <span class="comment">/**</span>
<a name="l00645"></a>00645 <span class="comment"> * Look for an option in an object. Consider only options which</span>
<a name="l00646"></a>00646 <span class="comment"> * have all the specified flags set.</span>
<a name="l00647"></a>00647 <span class="comment"> *</span>
<a name="l00648"></a>00648 <span class="comment"> * @param[in] obj A pointer to a struct whose first element is a</span>
<a name="l00649"></a>00649 <span class="comment"> *                pointer to an AVClass.</span>
<a name="l00650"></a>00650 <span class="comment"> *                Alternatively a double pointer to an AVClass, if</span>
<a name="l00651"></a>00651 <span class="comment"> *                AV_OPT_SEARCH_FAKE_OBJ search flag is set.</span>
<a name="l00652"></a>00652 <span class="comment"> * @param[in] name The name of the option to look for.</span>
<a name="l00653"></a>00653 <span class="comment"> * @param[in] unit When searching for named constants, name of the unit</span>
<a name="l00654"></a>00654 <span class="comment"> *                 it belongs to.</span>
<a name="l00655"></a>00655 <span class="comment"> * @param opt_flags Find only options with all the specified flags set (AV_OPT_FLAG).</span>
<a name="l00656"></a>00656 <span class="comment"> * @param search_flags A combination of AV_OPT_SEARCH_*.</span>
<a name="l00657"></a>00657 <span class="comment"> * @param[out] target_obj if non-NULL, an object to which the option belongs will be</span>
<a name="l00658"></a>00658 <span class="comment"> * written here. It may be different from obj if AV_OPT_SEARCH_CHILDREN is present</span>
<a name="l00659"></a>00659 <span class="comment"> * in search_flags. This parameter is ignored if search_flags contain</span>
<a name="l00660"></a>00660 <span class="comment"> * AV_OPT_SEARCH_FAKE_OBJ.</span>
<a name="l00661"></a>00661 <span class="comment"> *</span>
<a name="l00662"></a>00662 <span class="comment"> * @return A pointer to the option found, or NULL if no option</span>
<a name="l00663"></a>00663 <span class="comment"> *         was found.</span>
<a name="l00664"></a>00664 <span class="comment"> */</span>
<a name="l00665"></a>00665 <span class="keyword">const</span> <a class="code" href="structAVOption.html" title="AVOption.">AVOption</a> *<a class="code" href="group__avoptions.html#ga3e121fd0b44b34e31756f4fe848d29a7" title="Look for an option in an object.">av_opt_find2</a>(<span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keyword">const</span> <span class="keywordtype">char</span> *unit,
<a name="l00666"></a>00666                              <span class="keywordtype">int</span> opt_flags, <span class="keywordtype">int</span> search_flags, <span class="keywordtype">void</span> **target_obj);
<a name="l00667"></a>00667 <span class="comment"></span>
<a name="l00668"></a>00668 <span class="comment">/**</span>
<a name="l00669"></a>00669 <span class="comment"> * Iterate over all AVOptions belonging to obj.</span>
<a name="l00670"></a>00670 <span class="comment"> *</span>
<a name="l00671"></a>00671 <span class="comment"> * @param obj an AVOptions-enabled struct or a double pointer to an</span>
<a name="l00672"></a>00672 <span class="comment"> *            AVClass describing it.</span>
<a name="l00673"></a>00673 <span class="comment"> * @param prev result of the previous call to av_opt_next() on this object</span>
<a name="l00674"></a>00674 <span class="comment"> *             or NULL</span>
<a name="l00675"></a>00675 <span class="comment"> * @return next AVOption or NULL</span>
<a name="l00676"></a>00676 <span class="comment"> */</span>
<a name="l00677"></a>00677 <span class="keyword">const</span> <a class="code" href="structAVOption.html" title="AVOption.">AVOption</a> *<a class="code" href="group__avoptions.html#ga33723e44fd2f22f42fe7145a08ea8e60" title="Iterate over all AVOptions belonging to obj.">av_opt_next</a>(<a class="code" href="group__depr__guards.html#ga782e553655937c70755555d8503652b8">FF_CONST_AVUTIL55</a> <span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <a class="code" href="structAVOption.html" title="AVOption.">AVOption</a> *prev);
<a name="l00678"></a>00678 <span class="comment"></span>
<a name="l00679"></a>00679 <span class="comment">/**</span>
<a name="l00680"></a>00680 <span class="comment"> * Iterate over AVOptions-enabled children of obj.</span>
<a name="l00681"></a>00681 <span class="comment"> *</span>
<a name="l00682"></a>00682 <span class="comment"> * @param prev result of a previous call to this function or NULL</span>
<a name="l00683"></a>00683 <span class="comment"> * @return next AVOptions-enabled child or NULL</span>
<a name="l00684"></a>00684 <span class="comment"> */</span>
<a name="l00685"></a>00685 <span class="keywordtype">void</span> *<a class="code" href="group__avoptions.html#gaacce30022d2e99c7b9309d3ad3345f69" title="Iterate over AVOptions-enabled children of obj.">av_opt_child_next</a>(<span class="keywordtype">void</span> *obj, <span class="keywordtype">void</span> *prev);
<a name="l00686"></a>00686 <span class="comment"></span>
<a name="l00687"></a>00687 <span class="comment">/**</span>
<a name="l00688"></a>00688 <span class="comment"> * Iterate over potential AVOptions-enabled children of parent.</span>
<a name="l00689"></a>00689 <span class="comment"> *</span>
<a name="l00690"></a>00690 <span class="comment"> * @param prev result of a previous call to this function or NULL</span>
<a name="l00691"></a>00691 <span class="comment"> * @return AVClass corresponding to next potential child or NULL</span>
<a name="l00692"></a>00692 <span class="comment"> */</span>
<a name="l00693"></a>00693 <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="group__avoptions.html#gadee1f425013a0f861a40a72d80f189b1" title="Iterate over potential AVOptions-enabled children of parent.">av_opt_child_class_next</a>(<span class="keyword">const</span> <a class="code" href="structAVClass.html" title="Describe the class of an AVClass context structure.">AVClass</a> *parent, <span class="keyword">const</span> <a class="code" href="structAVClass.html" title="Describe the class of an AVClass context structure.">AVClass</a> *prev);
<a name="l00694"></a>00694 <span class="comment"></span>
<a name="l00695"></a>00695 <span class="comment">/**</span>
<a name="l00696"></a>00696 <span class="comment"> * @defgroup opt_set_funcs Option setting functions</span>
<a name="l00697"></a>00697 <span class="comment"> * @{</span>
<a name="l00698"></a>00698 <span class="comment"> * Those functions set the field of obj with the given name to value.</span>
<a name="l00699"></a>00699 <span class="comment"> *</span>
<a name="l00700"></a>00700 <span class="comment"> * @param[in] obj A struct whose first element is a pointer to an AVClass.</span>
<a name="l00701"></a>00701 <span class="comment"> * @param[in] name the name of the field to set</span>
<a name="l00702"></a>00702 <span class="comment"> * @param[in] val The value to set. In case of av_opt_set() if the field is not</span>
<a name="l00703"></a>00703 <span class="comment"> * of a string type, then the given string is parsed.</span>
<a name="l00704"></a>00704 <span class="comment"> * SI postfixes and some named scalars are supported.</span>
<a name="l00705"></a>00705 <span class="comment"> * If the field is of a numeric type, it has to be a numeric or named</span>
<a name="l00706"></a>00706 <span class="comment"> * scalar. Behavior with more than one scalar and +- infix operators</span>
<a name="l00707"></a>00707 <span class="comment"> * is undefined.</span>
<a name="l00708"></a>00708 <span class="comment"> * If the field is of a flags type, it has to be a sequence of numeric</span>
<a name="l00709"></a>00709 <span class="comment"> * scalars or named flags separated by &#39;+&#39; or &#39;-&#39;. Prefixing a flag</span>
<a name="l00710"></a>00710 <span class="comment"> * with &#39;+&#39; causes it to be set without affecting the other flags;</span>
<a name="l00711"></a>00711 <span class="comment"> * similarly, &#39;-&#39; unsets a flag.</span>
<a name="l00712"></a>00712 <span class="comment"> * @param search_flags flags passed to av_opt_find2. I.e. if AV_OPT_SEARCH_CHILDREN</span>
<a name="l00713"></a>00713 <span class="comment"> * is passed here, then the option may be set on a child of obj.</span>
<a name="l00714"></a>00714 <span class="comment"> *</span>
<a name="l00715"></a>00715 <span class="comment"> * @return 0 if the value has been set, or an AVERROR code in case of</span>
<a name="l00716"></a>00716 <span class="comment"> * error:</span>
<a name="l00717"></a>00717 <span class="comment"> * AVERROR_OPTION_NOT_FOUND if no matching option exists</span>
<a name="l00718"></a>00718 <span class="comment"> * AVERROR(ERANGE) if the value is out of range</span>
<a name="l00719"></a>00719 <span class="comment"> * AVERROR(EINVAL) if the value is not valid</span>
<a name="l00720"></a>00720 <span class="comment"> */</span>
<a name="l00721"></a>00721 <span class="keywordtype">int</span> <a class="code" href="group__opt__set__funcs.html#ga5fd4b92bdf4f392a2847f711676a7537">av_opt_set</a>         (<span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keyword">const</span> <span class="keywordtype">char</span> *val, <span class="keywordtype">int</span> search_flags);
<a name="l00722"></a>00722 <span class="keywordtype">int</span> <a class="code" href="group__opt__set__funcs.html#ga3adf7185c21cc080890a5ec02c2e56b2">av_opt_set_int</a>     (<span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <span class="keywordtype">char</span> *name, int64_t     val, <span class="keywordtype">int</span> search_flags);
<a name="l00723"></a>00723 <span class="keywordtype">int</span> <a class="code" href="group__opt__set__funcs.html#ga11f22424bb01fd58f6b34f220a0fff6a">av_opt_set_double</a>  (<span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keywordtype">double</span>      val, <span class="keywordtype">int</span> search_flags);
<a name="l00724"></a>00724 <span class="keywordtype">int</span> <a class="code" href="group__opt__set__funcs.html#ga4f4f0b06e931c638ee8b4074e3638cef">av_opt_set_q</a>       (<span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <span class="keywordtype">char</span> *name, <a class="code" href="structAVRational.html" title="rational number numerator/denominator">AVRational</a>  val, <span class="keywordtype">int</span> search_flags);
<a name="l00725"></a>00725 <span class="keywordtype">int</span> <a class="code" href="group__opt__set__funcs.html#ga6c32155fd8a96bed2f8cf5ebc030dadf">av_opt_set_bin</a>     (<span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keyword">const</span> uint8_t *val, <span class="keywordtype">int</span> size, <span class="keywordtype">int</span> search_flags);
<a name="l00726"></a>00726 <span class="keywordtype">int</span> <a class="code" href="group__opt__set__funcs.html#ga29c5723116dcc9be891ee2ca61f2df5e">av_opt_set_image_size</a>(<span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keywordtype">int</span> w, <span class="keywordtype">int</span> h, <span class="keywordtype">int</span> search_flags);
<a name="l00727"></a>00727 <span class="keywordtype">int</span> <a class="code" href="group__opt__set__funcs.html#gae8992c7875fd69a0c0e8c010098d402d">av_opt_set_pixel_fmt</a> (<span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keyword">enum</span> <a class="code" href="pixfmt_8h.html#a9a8e335cf3be472042bc9f0cf80cd4c5" title="Pixel format.">AVPixelFormat</a> fmt, <span class="keywordtype">int</span> search_flags);
<a name="l00728"></a>00728 <span class="keywordtype">int</span> <a class="code" href="group__opt__set__funcs.html#gad446f7a7b92442e464d43e400e661040">av_opt_set_sample_fmt</a>(<span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keyword">enum</span> <a class="code" href="group__lavu__sampfmts.html#gaf9a51ca15301871723577c730b5865c5" title="Audio sample formats.">AVSampleFormat</a> fmt, <span class="keywordtype">int</span> search_flags);
<a name="l00729"></a>00729 <span class="keywordtype">int</span> <a class="code" href="group__opt__set__funcs.html#gac4a81110dd4f5c717ec6ccf0a9e94b9f">av_opt_set_video_rate</a>(<span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <span class="keywordtype">char</span> *name, <a class="code" href="structAVRational.html" title="rational number numerator/denominator">AVRational</a> val, <span class="keywordtype">int</span> search_flags);
<a name="l00730"></a>00730 <span class="keywordtype">int</span> <a class="code" href="group__opt__set__funcs.html#gaf25f11e11068f2c41197ba072f25d2a4">av_opt_set_channel_layout</a>(<span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <span class="keywordtype">char</span> *name, int64_t ch_layout, <span class="keywordtype">int</span> search_flags);<span class="comment"></span>
<a name="l00731"></a>00731 <span class="comment">/**</span>
<a name="l00732"></a>00732 <span class="comment"> * @note Any old dictionary present is discarded and replaced with a copy of the new one. The</span>
<a name="l00733"></a>00733 <span class="comment"> * caller still owns val is and responsible for freeing it.</span>
<a name="l00734"></a>00734 <span class="comment"> */</span>
<a name="l00735"></a>00735 <span class="keywordtype">int</span> <a class="code" href="group__opt__set__funcs.html#gad19358af12f0766fedec516e387b8196">av_opt_set_dict_val</a>(<span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keyword">const</span> <a class="code" href="group__lavu__dict.html#ga1d7cc0833bee918994a600556410315f">AVDictionary</a> *val, <span class="keywordtype">int</span> search_flags);
<a name="l00736"></a>00736 <span class="comment"></span>
<a name="l00737"></a>00737 <span class="comment">/**</span>
<a name="l00738"></a>00738 <span class="comment"> * Set a binary option to an integer list.</span>
<a name="l00739"></a>00739 <span class="comment"> *</span>
<a name="l00740"></a>00740 <span class="comment"> * @param obj    AVClass object to set options on</span>
<a name="l00741"></a>00741 <span class="comment"> * @param name   name of the binary option</span>
<a name="l00742"></a>00742 <span class="comment"> * @param val    pointer to an integer list (must have the correct type with</span>
<a name="l00743"></a>00743 <span class="comment"> *               regard to the contents of the list)</span>
<a name="l00744"></a>00744 <span class="comment"> * @param term   list terminator (usually 0 or -1)</span>
<a name="l00745"></a>00745 <span class="comment"> * @param flags  search flags</span>
<a name="l00746"></a>00746 <span class="comment"> */</span>
<a name="l00747"></a><a class="code" href="group__opt__set__funcs.html#gac06fc2b2e32f67f067ed7aaec163447f">00747</a> <span class="preprocessor">#define av_opt_set_int_list(obj, name, val, term, flags) \</span>
<a name="l00748"></a>00748 <span class="preprocessor">    (av_int_list_length(val, term) &gt; INT_MAX / sizeof(*(val)) ? \</span>
<a name="l00749"></a>00749 <span class="preprocessor">     AVERROR(EINVAL) : \</span>
<a name="l00750"></a>00750 <span class="preprocessor">     av_opt_set_bin(obj, name, (const uint8_t *)(val), \</span>
<a name="l00751"></a>00751 <span class="preprocessor">                    av_int_list_length(val, term) * sizeof(*(val)), flags))</span>
<a name="l00752"></a>00752 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00753"></a>00753 <span class="comment">/**</span>
<a name="l00754"></a>00754 <span class="comment"> * @}</span>
<a name="l00755"></a>00755 <span class="comment"> */</span>
<a name="l00756"></a>00756 <span class="comment"></span>
<a name="l00757"></a>00757 <span class="comment">/**</span>
<a name="l00758"></a>00758 <span class="comment"> * @defgroup opt_get_funcs Option getting functions</span>
<a name="l00759"></a>00759 <span class="comment"> * @{</span>
<a name="l00760"></a>00760 <span class="comment"> * Those functions get a value of the option with the given name from an object.</span>
<a name="l00761"></a>00761 <span class="comment"> *</span>
<a name="l00762"></a>00762 <span class="comment"> * @param[in] obj a struct whose first element is a pointer to an AVClass.</span>
<a name="l00763"></a>00763 <span class="comment"> * @param[in] name name of the option to get.</span>
<a name="l00764"></a>00764 <span class="comment"> * @param[in] search_flags flags passed to av_opt_find2. I.e. if AV_OPT_SEARCH_CHILDREN</span>
<a name="l00765"></a>00765 <span class="comment"> * is passed here, then the option may be found in a child of obj.</span>
<a name="l00766"></a>00766 <span class="comment"> * @param[out] out_val value of the option will be written here</span>
<a name="l00767"></a>00767 <span class="comment"> * @return &gt;=0 on success, a negative error code otherwise</span>
<a name="l00768"></a>00768 <span class="comment"> */</span><span class="comment"></span>
<a name="l00769"></a>00769 <span class="comment">/**</span>
<a name="l00770"></a>00770 <span class="comment"> * @note the returned string will be av_malloc()ed and must be av_free()ed by the caller</span>
<a name="l00771"></a>00771 <span class="comment"> */</span>
<a name="l00772"></a>00772 <span class="keywordtype">int</span> <a class="code" href="group__opt__get__funcs.html#gaf31144e60f9ce89dbe8cbea57a0b232c">av_opt_get</a>         (<span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keywordtype">int</span> search_flags, uint8_t   **out_val);
<a name="l00773"></a>00773 <span class="keywordtype">int</span> <a class="code" href="group__opt__get__funcs.html#gaab5b9c0969efe56420536a5d190e59bd">av_opt_get_int</a>     (<span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keywordtype">int</span> search_flags, int64_t    *out_val);
<a name="l00774"></a>00774 <span class="keywordtype">int</span> <a class="code" href="group__opt__get__funcs.html#ga4ee50245cd18a65ec1cd27bc8e0cab83">av_opt_get_double</a>  (<span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keywordtype">int</span> search_flags, <span class="keywordtype">double</span>     *out_val);
<a name="l00775"></a>00775 <span class="keywordtype">int</span> <a class="code" href="group__opt__get__funcs.html#gabc553a1b95468f935eedfa9db86e2a15">av_opt_get_q</a>       (<span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keywordtype">int</span> search_flags, <a class="code" href="structAVRational.html" title="rational number numerator/denominator">AVRational</a> *out_val);
<a name="l00776"></a>00776 <span class="keywordtype">int</span> <a class="code" href="group__opt__get__funcs.html#ga96d9c726c3feff308e7fe447633c9720">av_opt_get_image_size</a>(<span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keywordtype">int</span> search_flags, <span class="keywordtype">int</span> *w_out, <span class="keywordtype">int</span> *h_out);
<a name="l00777"></a>00777 <span class="keywordtype">int</span> <a class="code" href="group__opt__get__funcs.html#ga41fdd93f0483e96548168f9cfaf5bf6b">av_opt_get_pixel_fmt</a> (<span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keywordtype">int</span> search_flags, <span class="keyword">enum</span> <a class="code" href="pixfmt_8h.html#a9a8e335cf3be472042bc9f0cf80cd4c5" title="Pixel format.">AVPixelFormat</a> *out_fmt);
<a name="l00778"></a>00778 <span class="keywordtype">int</span> <a class="code" href="group__opt__get__funcs.html#gade39dd8ce34b193f7012022072e36642">av_opt_get_sample_fmt</a>(<span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keywordtype">int</span> search_flags, <span class="keyword">enum</span> <a class="code" href="group__lavu__sampfmts.html#gaf9a51ca15301871723577c730b5865c5" title="Audio sample formats.">AVSampleFormat</a> *out_fmt);
<a name="l00779"></a>00779 <span class="keywordtype">int</span> <a class="code" href="group__opt__get__funcs.html#gaf565dc77c53e8e56d08ee1a3c642f95f">av_opt_get_video_rate</a>(<span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keywordtype">int</span> search_flags, <a class="code" href="structAVRational.html" title="rational number numerator/denominator">AVRational</a> *out_val);
<a name="l00780"></a>00780 <span class="keywordtype">int</span> <a class="code" href="group__opt__get__funcs.html#ga35864ccde3246be3f56366fd5145fc12">av_opt_get_channel_layout</a>(<span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keywordtype">int</span> search_flags, int64_t *ch_layout);<span class="comment"></span>
<a name="l00781"></a>00781 <span class="comment">/**</span>
<a name="l00782"></a>00782 <span class="comment"> * @param[out] out_val The returned dictionary is a copy of the actual value and must</span>
<a name="l00783"></a>00783 <span class="comment"> * be freed with av_dict_free() by the caller</span>
<a name="l00784"></a>00784 <span class="comment"> */</span>
<a name="l00785"></a>00785 <span class="keywordtype">int</span> <a class="code" href="group__opt__get__funcs.html#ga6ed0b77def62321ff995843211405338">av_opt_get_dict_val</a>(<span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keywordtype">int</span> search_flags, <a class="code" href="group__lavu__dict.html#ga1d7cc0833bee918994a600556410315f">AVDictionary</a> **out_val);<span class="comment"></span>
<a name="l00786"></a>00786 <span class="comment">/**</span>
<a name="l00787"></a>00787 <span class="comment"> * @}</span>
<a name="l00788"></a>00788 <span class="comment"> */</span><span class="comment"></span>
<a name="l00789"></a>00789 <span class="comment">/**</span>
<a name="l00790"></a>00790 <span class="comment"> * Gets a pointer to the requested field in a struct.</span>
<a name="l00791"></a>00791 <span class="comment"> * This function allows accessing a struct even when its fields are moved or</span>
<a name="l00792"></a>00792 <span class="comment"> * renamed since the application making the access has been compiled,</span>
<a name="l00793"></a>00793 <span class="comment"> *</span>
<a name="l00794"></a>00794 <span class="comment"> * @returns a pointer to the field, it can be cast to the correct type and read</span>
<a name="l00795"></a>00795 <span class="comment"> *          or written to.</span>
<a name="l00796"></a>00796 <span class="comment"> */</span>
<a name="l00797"></a>00797 <span class="keywordtype">void</span> *<a class="code" href="group__avoptions.html#gab1d208d09e487741a28016919225bef6" title="Gets a pointer to the requested field in a struct.">av_opt_ptr</a>(<span class="keyword">const</span> <a class="code" href="structAVClass.html" title="Describe the class of an AVClass context structure.">AVClass</a> *avclass, <span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <span class="keywordtype">char</span> *name);
<a name="l00798"></a>00798 <span class="comment"></span>
<a name="l00799"></a>00799 <span class="comment">/**</span>
<a name="l00800"></a>00800 <span class="comment"> * Free an AVOptionRanges struct and set it to NULL.</span>
<a name="l00801"></a>00801 <span class="comment"> */</span>
<a name="l00802"></a>00802 <span class="keywordtype">void</span> <a class="code" href="group__avoptions.html#ga880756f24644ff66c806ed2d9ab3d790" title="Free an AVOptionRanges struct and set it to NULL.">av_opt_freep_ranges</a>(<a class="code" href="structAVOptionRanges.html" title="List of AVOptionRange structs.">AVOptionRanges</a> **ranges);
<a name="l00803"></a>00803 <span class="comment"></span>
<a name="l00804"></a>00804 <span class="comment">/**</span>
<a name="l00805"></a>00805 <span class="comment"> * Get a list of allowed ranges for the given option.</span>
<a name="l00806"></a>00806 <span class="comment"> *</span>
<a name="l00807"></a>00807 <span class="comment"> * The returned list may depend on other fields in obj like for example profile.</span>
<a name="l00808"></a>00808 <span class="comment"> *</span>
<a name="l00809"></a>00809 <span class="comment"> * @param flags is a bitmask of flags, undefined flags should not be set and should be ignored</span>
<a name="l00810"></a>00810 <span class="comment"> *              AV_OPT_SEARCH_FAKE_OBJ indicates that the obj is a double pointer to a AVClass instead of a full instance</span>
<a name="l00811"></a>00811 <span class="comment"> *              AV_OPT_MULTI_COMPONENT_RANGE indicates that function may return more than one component, @see AVOptionRanges</span>
<a name="l00812"></a>00812 <span class="comment"> *</span>
<a name="l00813"></a>00813 <span class="comment"> * The result must be freed with av_opt_freep_ranges.</span>
<a name="l00814"></a>00814 <span class="comment"> *</span>
<a name="l00815"></a>00815 <span class="comment"> * @return number of compontents returned on success, a negative errro code otherwise</span>
<a name="l00816"></a>00816 <span class="comment"> */</span>
<a name="l00817"></a>00817 <span class="keywordtype">int</span> <a class="code" href="group__avoptions.html#ga9751db4da3e0facd522f5b345f4001ef" title="Get a list of allowed ranges for the given option.">av_opt_query_ranges</a>(<a class="code" href="structAVOptionRanges.html" title="List of AVOptionRange structs.">AVOptionRanges</a> **, <span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <span class="keywordtype">char</span> *key, <span class="keywordtype">int</span> flags);
<a name="l00818"></a>00818 <span class="comment"></span>
<a name="l00819"></a>00819 <span class="comment">/**</span>
<a name="l00820"></a>00820 <span class="comment"> * Copy options from src object into dest object.</span>
<a name="l00821"></a>00821 <span class="comment"> *</span>
<a name="l00822"></a>00822 <span class="comment"> * Options that require memory allocation (e.g. string or binary) are malloc&#39;ed in dest object.</span>
<a name="l00823"></a>00823 <span class="comment"> * Original memory allocated for such options is freed unless both src and dest options points to the same memory.</span>
<a name="l00824"></a>00824 <span class="comment"> *</span>
<a name="l00825"></a>00825 <span class="comment"> * @param dest Object to copy from</span>
<a name="l00826"></a>00826 <span class="comment"> * @param src  Object to copy into</span>
<a name="l00827"></a>00827 <span class="comment"> * @return 0 on success, negative on error</span>
<a name="l00828"></a>00828 <span class="comment"> */</span>
<a name="l00829"></a>00829 <span class="keywordtype">int</span> <a class="code" href="group__avoptions.html#ga846d90231d6d8ac78f9d33703268dc29" title="Copy options from src object into dest object.">av_opt_copy</a>(<span class="keywordtype">void</span> *dest, <a class="code" href="group__depr__guards.html#ga782e553655937c70755555d8503652b8">FF_CONST_AVUTIL55</a> <span class="keywordtype">void</span> *src);
<a name="l00830"></a>00830 <span class="comment"></span>
<a name="l00831"></a>00831 <span class="comment">/**</span>
<a name="l00832"></a>00832 <span class="comment"> * Get a default list of allowed ranges for the given option.</span>
<a name="l00833"></a>00833 <span class="comment"> *</span>
<a name="l00834"></a>00834 <span class="comment"> * This list is constructed without using the AVClass.query_ranges() callback</span>
<a name="l00835"></a>00835 <span class="comment"> * and can be used as fallback from within the callback.</span>
<a name="l00836"></a>00836 <span class="comment"> *</span>
<a name="l00837"></a>00837 <span class="comment"> * @param flags is a bitmask of flags, undefined flags should not be set and should be ignored</span>
<a name="l00838"></a>00838 <span class="comment"> *              AV_OPT_SEARCH_FAKE_OBJ indicates that the obj is a double pointer to a AVClass instead of a full instance</span>
<a name="l00839"></a>00839 <span class="comment"> *              AV_OPT_MULTI_COMPONENT_RANGE indicates that function may return more than one component, @see AVOptionRanges</span>
<a name="l00840"></a>00840 <span class="comment"> *</span>
<a name="l00841"></a>00841 <span class="comment"> * The result must be freed with av_opt_free_ranges.</span>
<a name="l00842"></a>00842 <span class="comment"> *</span>
<a name="l00843"></a>00843 <span class="comment"> * @return number of compontents returned on success, a negative errro code otherwise</span>
<a name="l00844"></a>00844 <span class="comment"> */</span>
<a name="l00845"></a>00845 <span class="keywordtype">int</span> <a class="code" href="group__avoptions.html#ga4e50bee09b6a374cc54237314892c001" title="Get a default list of allowed ranges for the given option.">av_opt_query_ranges_default</a>(<a class="code" href="structAVOptionRanges.html" title="List of AVOptionRange structs.">AVOptionRanges</a> **, <span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <span class="keywordtype">char</span> *key, <span class="keywordtype">int</span> flags);
<a name="l00846"></a>00846 <span class="comment"></span>
<a name="l00847"></a>00847 <span class="comment">/**</span>
<a name="l00848"></a>00848 <span class="comment"> * Check if given option is set to its default value.</span>
<a name="l00849"></a>00849 <span class="comment"> *</span>
<a name="l00850"></a>00850 <span class="comment"> * Options o must belong to the obj. This function must not be called to check child&#39;s options state.</span>
<a name="l00851"></a>00851 <span class="comment"> * @see av_opt_is_set_to_default_by_name().</span>
<a name="l00852"></a>00852 <span class="comment"> *</span>
<a name="l00853"></a>00853 <span class="comment"> * @param obj  AVClass object to check option on</span>
<a name="l00854"></a>00854 <span class="comment"> * @param o    option to be checked</span>
<a name="l00855"></a>00855 <span class="comment"> * @return     &gt;0 when option is set to its default,</span>
<a name="l00856"></a>00856 <span class="comment"> *              0 when option is not set its default,</span>
<a name="l00857"></a>00857 <span class="comment"> *             &lt;0 on error</span>
<a name="l00858"></a>00858 <span class="comment"> */</span>
<a name="l00859"></a>00859 <span class="keywordtype">int</span> <a class="code" href="group__avoptions.html#ga3ca54258a4c5ac18999dd19b4444c15a" title="Check if given option is set to its default value.">av_opt_is_set_to_default</a>(<span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <a class="code" href="structAVOption.html" title="AVOption.">AVOption</a> *o);
<a name="l00860"></a>00860 <span class="comment"></span>
<a name="l00861"></a>00861 <span class="comment">/**</span>
<a name="l00862"></a>00862 <span class="comment"> * Check if given option is set to its default value.</span>
<a name="l00863"></a>00863 <span class="comment"> *</span>
<a name="l00864"></a>00864 <span class="comment"> * @param obj          AVClass object to check option on</span>
<a name="l00865"></a>00865 <span class="comment"> * @param name         option name</span>
<a name="l00866"></a>00866 <span class="comment"> * @param search_flags combination of AV_OPT_SEARCH_*</span>
<a name="l00867"></a>00867 <span class="comment"> * @return             &gt;0 when option is set to its default,</span>
<a name="l00868"></a>00868 <span class="comment"> *                     0 when option is not set its default,</span>
<a name="l00869"></a>00869 <span class="comment"> *                     &lt;0 on error</span>
<a name="l00870"></a>00870 <span class="comment"> */</span>
<a name="l00871"></a>00871 <span class="keywordtype">int</span> <a class="code" href="group__avoptions.html#gaa37a02c9d3e6d9f049f2e7174811f5fb" title="Check if given option is set to its default value.">av_opt_is_set_to_default_by_name</a>(<span class="keywordtype">void</span> *obj, <span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keywordtype">int</span> search_flags);
<a name="l00872"></a>00872 
<a name="l00873"></a>00873 
<a name="l00874"></a><a class="code" href="group__avoptions.html#ga844ea4db9927936ea0cfc98e0113750f">00874</a> <span class="preprocessor">#define AV_OPT_SERIALIZE_SKIP_DEFAULTS              0x00000001  ///&lt; Serialize options that are not set to default values only.</span>
<a name="l00875"></a><a class="code" href="group__avoptions.html#ga49bfd169f5bcde70fb38fc036a524d3a">00875</a> <span class="preprocessor"></span><span class="preprocessor">#define AV_OPT_SERIALIZE_OPT_FLAGS_EXACT            0x00000002  ///&lt; Serialize options that exactly match opt_flags only.</span>
<a name="l00876"></a>00876 <span class="preprocessor"></span><span class="comment"></span>
<a name="l00877"></a>00877 <span class="comment">/**</span>
<a name="l00878"></a>00878 <span class="comment"> * Serialize object&#39;s options.</span>
<a name="l00879"></a>00879 <span class="comment"> *</span>
<a name="l00880"></a>00880 <span class="comment"> * Create a string containing object&#39;s serialized options.</span>
<a name="l00881"></a>00881 <span class="comment"> * Such string may be passed back to av_opt_set_from_string() in order to restore option values.</span>
<a name="l00882"></a>00882 <span class="comment"> * A key/value or pairs separator occurring in the serialized value or</span>
<a name="l00883"></a>00883 <span class="comment"> * name string are escaped through the av_escape() function.</span>
<a name="l00884"></a>00884 <span class="comment"> *</span>
<a name="l00885"></a>00885 <span class="comment"> * @param[in]  obj           AVClass object to serialize</span>
<a name="l00886"></a>00886 <span class="comment"> * @param[in]  opt_flags     serialize options with all the specified flags set (AV_OPT_FLAG)</span>
<a name="l00887"></a>00887 <span class="comment"> * @param[in]  flags         combination of AV_OPT_SERIALIZE_* flags</span>
<a name="l00888"></a>00888 <span class="comment"> * @param[out] buffer        Pointer to buffer that will be allocated with string containg serialized options.</span>
<a name="l00889"></a>00889 <span class="comment"> *                           Buffer must be freed by the caller when is no longer needed.</span>
<a name="l00890"></a>00890 <span class="comment"> * @param[in]  key_val_sep   character used to separate key from value</span>
<a name="l00891"></a>00891 <span class="comment"> * @param[in]  pairs_sep     character used to separate two pairs from each other</span>
<a name="l00892"></a>00892 <span class="comment"> * @return                   &gt;= 0 on success, negative on error</span>
<a name="l00893"></a>00893 <span class="comment"> * @warning Separators cannot be neither &#39;\\&#39; nor &#39;\0&#39;. They also cannot be the same.</span>
<a name="l00894"></a>00894 <span class="comment"> */</span>
<a name="l00895"></a>00895 <span class="keywordtype">int</span> <a class="code" href="group__avoptions.html#ga523122ff19a79f2867a9da29bbafa33b" title="Serialize object&#39;s options.">av_opt_serialize</a>(<span class="keywordtype">void</span> *obj, <span class="keywordtype">int</span> opt_flags, <span class="keywordtype">int</span> flags, <span class="keywordtype">char</span> **buffer,
<a name="l00896"></a>00896                      <span class="keyword">const</span> <span class="keywordtype">char</span> key_val_sep, <span class="keyword">const</span> <span class="keywordtype">char</span> pairs_sep);<span class="comment"></span>
<a name="l00897"></a>00897 <span class="comment">/**</span>
<a name="l00898"></a>00898 <span class="comment"> * @}</span>
<a name="l00899"></a>00899 <span class="comment"> */</span>
<a name="l00900"></a>00900 
<a name="l00901"></a>00901 <span class="preprocessor">#endif </span><span class="comment">/* AVUTIL_OPT_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>