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 / api / metadata_8c-example.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"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>FFmpeg: metadata.c</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">FFmpeg
   &#160;<span id="projectnumber">3.0.2</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<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><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><!-- top -->
<!-- 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>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Pages</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>

<div class="header">
  <div class="headertitle">
<div class="title">metadata.c</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><span class="comment">/*</span></div>
<div class="line"><span class="comment"> * Copyright (c) 2011 Reinhard Tartler</span></div>
<div class="line"><span class="comment"> *</span></div>
<div class="line"><span class="comment"> * Permission is hereby granted, free of charge, to any person obtaining a copy</span></div>
<div class="line"><span class="comment"> * of this software and associated documentation files (the &quot;Software&quot;), to deal</span></div>
<div class="line"><span class="comment"> * in the Software without restriction, including without limitation the rights</span></div>
<div class="line"><span class="comment"> * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell</span></div>
<div class="line"><span class="comment"> * copies of the Software, and to permit persons to whom the Software is</span></div>
<div class="line"><span class="comment"> * furnished to do so, subject to the following conditions:</span></div>
<div class="line"><span class="comment"> *</span></div>
<div class="line"><span class="comment"> * The above copyright notice and this permission notice shall be included in</span></div>
<div class="line"><span class="comment"> * all copies or substantial portions of the Software.</span></div>
<div class="line"><span class="comment"> *</span></div>
<div class="line"><span class="comment"> * THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span></div>
<div class="line"><span class="comment"> * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span></div>
<div class="line"><span class="comment"> * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL</span></div>
<div class="line"><span class="comment"> * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span></div>
<div class="line"><span class="comment"> * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span></div>
<div class="line"><span class="comment"> * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN</span></div>
<div class="line"><span class="comment"> * THE SOFTWARE.</span></div>
<div class="line"><span class="comment"> */</span></div>
<div class="line"><span class="comment"></span></div>
<div class="line"><span class="comment">/**</span></div>
<div class="line"><span class="comment"> * @file</span></div>
<div class="line"><span class="comment"> * Shows how the metadata API can be used in application programs.</span></div>
<div class="line"><span class="comment"> * @example metadata.c</span></div>
<div class="line"><span class="comment"> */</span></div>
<div class="line"></div>
<div class="line"><span class="preprocessor">#include &lt;stdio.h&gt;</span></div>
<div class="line"></div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="avformat_8h.html">libavformat/avformat.h</a>&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="dict_8h.html">libavutil/dict.h</a>&gt;</span></div>
<div class="line"></div>
<div class="line"><span class="keywordtype">int</span> <a name="a0"></a><a class="code" href="metadata_8c.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a> (<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> **argv)</div>
<div class="line">{</div>
<div class="line">    <a name="_a1"></a><a class="code" href="structAVFormatContext.html">AVFormatContext</a> *<a name="a2"></a><a class="code" href="demuxing__decoding_8c.html#a409462acdf7aebe5bfbe1bcd811efa5d">fmt_ctx</a> = NULL;</div>
<div class="line">    <a name="_a3"></a><a class="code" href="structAVDictionaryEntry.html">AVDictionaryEntry</a> *tag = NULL;</div>
<div class="line">    <span class="keywordtype">int</span> ret;</div>
<div class="line"></div>
<div class="line">    <span class="keywordflow">if</span> (argc != 2) {</div>
<div class="line">        printf(<span class="stringliteral">&quot;usage: %s &lt;input_file&gt;\n&quot;</span></div>
<div class="line">               <span class="stringliteral">&quot;example program to demonstrate the use of the libavformat metadata API.\n&quot;</span></div>
<div class="line">               <span class="stringliteral">&quot;\n&quot;</span>, argv[0]);</div>
<div class="line">        <span class="keywordflow">return</span> 1;</div>
<div class="line">    }</div>
<div class="line"></div>
<div class="line">    <a name="a4"></a><a class="code" href="group__lavf__core.html#ga917265caec45ef5a0646356ed1a507e3">av_register_all</a>();</div>
<div class="line">    <span class="keywordflow">if</span> ((ret = <a name="a5"></a><a class="code" href="group__lavf__decoding.html#ga31d601155e9035d5b0e7efedc894ee49">avformat_open_input</a>(&amp;fmt_ctx, argv[1], NULL, NULL)))</div>
<div class="line">        <span class="keywordflow">return</span> ret;</div>
<div class="line"></div>
<div class="line">    <span class="keywordflow">while</span> ((tag = <a name="a6"></a><a class="code" href="group__lavu__dict.html#gae67f143237b2cb2936c9b147aa6dfde3">av_dict_get</a>(fmt_ctx-&gt;<a name="a7"></a><a class="code" href="structAVFormatContext.html#a3019a56080ed2e3297ff25bc2ff88adf">metadata</a>, <span class="stringliteral">&quot;&quot;</span>, tag, <a name="a8"></a><a class="code" href="group__lavu__dict.html#ga341bbd1ea599dfb0510f419e5272fecc">AV_DICT_IGNORE_SUFFIX</a>)))</div>
<div class="line">        printf(<span class="stringliteral">&quot;%s=%s\n&quot;</span>, tag-&gt;<a name="a9"></a><a class="code" href="structAVDictionaryEntry.html#a38fc80176f8f839282bb61c03392e194">key</a>, tag-&gt;<a name="a10"></a><a class="code" href="structAVDictionaryEntry.html#aa38678f2cad36f120d42e56449c5edb4">value</a>);</div>
<div class="line"></div>
<div class="line">    <a name="a11"></a><a class="code" href="group__lavf__decoding.html#gae804b99aec044690162b8b9b110236a4">avformat_close_input</a>(&amp;fmt_ctx);</div>
<div class="line">    <span class="keywordflow">return</span> 0;</div>
<div class="line">}</div>
</div><!-- fragment --> </div><!-- contents -->
<!-- start footer part -->
<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.8.6
</small></address>
</body>
</html>