Repository URL to install this package:
|
Version:
8:3.0.2-1ubuntu3 ▾
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>FFmpeg: libavfilter/buffersink.h Source File</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
 <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 Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File List</span></a></li>
<li><a href="globals.html"><span>Globals</span></a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark"> </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 id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_07c4be17d34b4a7a38dbd1b8cb6b1e6c.html">libavfilter</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">buffersink.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="buffersink_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * This file is part of FFmpeg.</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> * FFmpeg is free software; you can redistribute it and/or</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> * modify it under the terms of the GNU Lesser General Public</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * License as published by the Free Software Foundation; either</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * version 2.1 of the License, or (at your option) any later version.</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> *</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> * FFmpeg is distributed in the hope that it will be useful,</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> * Lesser General Public License for more details.</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> *</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> * You should have received a copy of the GNU Lesser General Public</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> * License along with FFmpeg; if not, write to the Free Software</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> */</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> </div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="preprocessor">#ifndef AVFILTER_BUFFERSINK_H</span></div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor"></span><span class="preprocessor">#define AVFILTER_BUFFERSINK_H</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor"></span><span class="comment"></span></div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="comment">/**</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment"> * @file</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="comment"> * @ingroup lavfi_buffersink</span></div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="comment"> * memory buffer sink API for audio and video</span></div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="comment"> */</span></div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> </div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor">#include "<a class="code" href="avfilter_8h.html">avfilter.h</a>"</span></div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="comment"></span></div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="comment">/**</span></div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="comment"> * @defgroup lavfi_buffersink Buffer sink API</span></div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="comment"> * @ingroup lavfi</span></div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="comment"> * @{</span></div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="comment"> */</span></div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="comment"></span></div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="comment">/**</span></div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="comment"> * Get a frame with filtered data from sink and put it in frame.</span></div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="comment"> *</span></div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="comment"> * @param ctx pointer to a buffersink or abuffersink filter context.</span></div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span> <span class="comment"> * @param frame pointer to an allocated frame that will be filled with data.</span></div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span> <span class="comment"> * The data must be freed using av_frame_unref() / av_frame_free()</span></div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span> <span class="comment"> * @param flags a combination of AV_BUFFERSINK_FLAG_* flags</span></div>
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span> <span class="comment"> *</span></div>
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span> <span class="comment"> * @return >= 0 in for success, a negative AVERROR code for failure.</span></div>
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span> <span class="comment"> */</span></div>
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span> <span class="keywordtype">int</span> <a class="code" href="group__lavfi__buffersink.html#ga71ae9c529c8da51681e12faa37d1a395">av_buffersink_get_frame_flags</a>(<a class="code" href="structAVFilterContext.html">AVFilterContext</a> *ctx, <a class="code" href="structAVFrame.html">AVFrame</a> *<a class="code" href="demuxing__decoding_8c.html#ad7d33d579a8d4241a5e643e39287a209">frame</a>, <span class="keywordtype">int</span> flags);</div>
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span> <span class="comment"></span></div>
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span> <span class="comment">/**</span></div>
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span> <span class="comment"> * Tell av_buffersink_get_buffer_ref() to read video/samples buffer</span></div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span> <span class="comment"> * reference, but not remove it from the buffer. This is useful if you</span></div>
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span> <span class="comment"> * need only to read a video/samples buffer, without to fetch it.</span></div>
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span> <span class="comment"> */</span></div>
<div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="group__lavfi__buffersink.html#ga9453fc0e81d30237080b51575da0f0d8"> 53</a></span> <span class="preprocessor">#define AV_BUFFERSINK_FLAG_PEEK 1</span></div>
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span> <span class="preprocessor"></span><span class="comment"></span></div>
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span> <span class="comment">/**</span></div>
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span> <span class="comment"> * Tell av_buffersink_get_buffer_ref() not to request a frame from its input.</span></div>
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span> <span class="comment"> * If a frame is already buffered, it is read (and removed from the buffer),</span></div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span> <span class="comment"> * but if no frame is present, return AVERROR(EAGAIN).</span></div>
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span> <span class="comment"> */</span></div>
<div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="group__lavfi__buffersink.html#gade670e86ece8d740194c916fa1ea6cc0"> 60</a></span> <span class="preprocessor">#define AV_BUFFERSINK_FLAG_NO_REQUEST 2</span></div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span> <span class="preprocessor"></span><span class="comment"></span></div>
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span> <span class="comment">/**</span></div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span> <span class="comment"> * Struct to use for initializing a buffersink context.</span></div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span> <span class="comment"> */</span></div>
<div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="structAVBufferSinkParams.html"> 65</a></span> <span class="keyword">typedef</span> <span class="keyword">struct </span>{</div>
<div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="structAVBufferSinkParams.html#a025d4705672eb83b131f5587b7cd2898"> 66</a></span>  <span class="keyword">const</span> <span class="keyword">enum</span> <a class="code" href="pixfmt_8h.html#a9a8e335cf3be472042bc9f0cf80cd4c5">AVPixelFormat</a> *<a class="code" href="structAVBufferSinkParams.html#a025d4705672eb83b131f5587b7cd2898">pixel_fmts</a>; <span class="comment">///< list of allowed pixel formats, terminated by AV_PIX_FMT_NONE</span></div>
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span> <span class="comment"></span>} <a class="code" href="structAVBufferSinkParams.html">AVBufferSinkParams</a>;</div>
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span> <span class="comment"></span></div>
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span> <span class="comment">/**</span></div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span> <span class="comment"> * Create an AVBufferSinkParams structure.</span></div>
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span> <span class="comment"> *</span></div>
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span> <span class="comment"> * Must be freed with av_free().</span></div>
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span> <span class="comment"> */</span></div>
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span> <a class="code" href="structAVBufferSinkParams.html">AVBufferSinkParams</a> *<a class="code" href="group__lavfi__buffersink.html#gac27f0473a1e3dc340cf8e557b6fa98dd">av_buffersink_params_alloc</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span> <span class="comment"></span></div>
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span> <span class="comment">/**</span></div>
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span> <span class="comment"> * Struct to use for initializing an abuffersink context.</span></div>
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span> <span class="comment"> */</span></div>
<div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="structAVABufferSinkParams.html"> 79</a></span> <span class="keyword">typedef</span> <span class="keyword">struct </span>{</div>
<div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="structAVABufferSinkParams.html#afed7e06a41ad6a92f78421179514d9c3"> 80</a></span>  <span class="keyword">const</span> <span class="keyword">enum</span> <a class="code" href="group__lavu__sampfmts.html#gaf9a51ca15301871723577c730b5865c5">AVSampleFormat</a> *<a class="code" href="structAVABufferSinkParams.html#afed7e06a41ad6a92f78421179514d9c3">sample_fmts</a>; <span class="comment">///< list of allowed sample formats, terminated by AV_SAMPLE_FMT_NONE</span></div>
<div class="line"><a name="l00081"></a><span class="lineno"><a class="line" href="structAVABufferSinkParams.html#a168a137676e4ed7facf2e027bc1fbce7"> 81</a></span> <span class="comment"></span> <span class="keyword">const</span> int64_t *<a class="code" href="structAVABufferSinkParams.html#a168a137676e4ed7facf2e027bc1fbce7">channel_layouts</a>; <span class="comment">///< list of allowed channel layouts, terminated by -1</span></div>
<div class="line"><a name="l00082"></a><span class="lineno"><a class="line" href="structAVABufferSinkParams.html#acc8caf60d796e7765ff8361dd4abb74d"> 82</a></span> <span class="comment"></span> <span class="keyword">const</span> <span class="keywordtype">int</span> *<a class="code" href="structAVABufferSinkParams.html#acc8caf60d796e7765ff8361dd4abb74d">channel_counts</a>; <span class="comment">///< list of allowed channel counts, terminated by -1</span></div>
<div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="structAVABufferSinkParams.html#a45e4a312b57e62be05e334283fefa904"> 83</a></span> <span class="comment"></span> <span class="keywordtype">int</span> <a class="code" href="structAVABufferSinkParams.html#a45e4a312b57e62be05e334283fefa904">all_channel_counts</a>; <span class="comment">///< if not 0, accept any channel count or layout</span></div>
<div class="line"><a name="l00084"></a><span class="lineno"><a class="line" href="structAVABufferSinkParams.html#ab634ced9e52896f1cf4e3a4574e27ae5"> 84</a></span> <span class="comment"></span> <span class="keywordtype">int</span> *<a class="code" href="structAVABufferSinkParams.html#ab634ced9e52896f1cf4e3a4574e27ae5">sample_rates</a>; <span class="comment">///< list of allowed sample rates, terminated by -1</span></div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span> <span class="comment"></span>} <a class="code" href="structAVABufferSinkParams.html">AVABufferSinkParams</a>;</div>
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span> <span class="comment"></span></div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span> <span class="comment">/**</span></div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span> <span class="comment"> * Create an AVABufferSinkParams structure.</span></div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span> <span class="comment"> *</span></div>
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span> <span class="comment"> * Must be freed with av_free().</span></div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span> <span class="comment"> */</span></div>
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span> <a class="code" href="structAVABufferSinkParams.html">AVABufferSinkParams</a> *<a class="code" href="group__lavfi__buffersink.html#ga87d2066b9a7f5dfaff00a0e0ac2e25e7">av_abuffersink_params_alloc</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span> <span class="comment"></span></div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span> <span class="comment">/**</span></div>
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span> <span class="comment"> * Set the frame size for an audio buffer sink.</span></div>
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span> <span class="comment"> *</span></div>
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span> <span class="comment"> * All calls to av_buffersink_get_buffer_ref will return a buffer with</span></div>
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span> <span class="comment"> * exactly the specified number of samples, or AVERROR(EAGAIN) if there is</span></div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span> <span class="comment"> * not enough. The last buffer at EOF will be padded with 0.</span></div>
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span> <span class="comment"> */</span></div>
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span> <span class="keywordtype">void</span> <a class="code" href="group__lavfi__buffersink.html#ga359d7d1e42c27ca14c07559d4e9adba7">av_buffersink_set_frame_size</a>(<a class="code" href="structAVFilterContext.html">AVFilterContext</a> *ctx, <span class="keywordtype">unsigned</span> frame_size);</div>
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span> <span class="comment"></span></div>
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span> <span class="comment">/**</span></div>
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span> <span class="comment"> * Get the frame rate of the input.</span></div>
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span> <span class="comment"> */</span></div>
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span> <a class="code" href="structAVRational.html">AVRational</a> <a class="code" href="group__lavfi__buffersink.html#ga9e788b28139d9b5063676ac81870737b">av_buffersink_get_frame_rate</a>(<a class="code" href="structAVFilterContext.html">AVFilterContext</a> *ctx);</div>
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span> <span class="comment"></span></div>
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span> <span class="comment">/**</span></div>
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span> <span class="comment"> * Get a frame with filtered data from sink and put it in frame.</span></div>
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span> <span class="comment"> *</span></div>
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span> <span class="comment"> * @param ctx pointer to a context of a buffersink or abuffersink AVFilter.</span></div>
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span> <span class="comment"> * @param frame pointer to an allocated frame that will be filled with data.</span></div>
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span> <span class="comment"> * The data must be freed using av_frame_unref() / av_frame_free()</span></div>
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span> <span class="comment"> *</span></div>
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span> <span class="comment"> * @return</span></div>
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span> <span class="comment"> * - >= 0 if a frame was successfully returned.</span></div>
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span> <span class="comment"> * - AVERROR(EAGAIN) if no frames are available at this point; more</span></div>
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span> <span class="comment"> * input frames must be added to the filtergraph to get more output.</span></div>
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span> <span class="comment"> * - AVERROR_EOF if there will be no more output frames on this sink.</span></div>
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span> <span class="comment"> * - A different negative AVERROR code in other failure cases.</span></div>
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span> <span class="comment"> */</span></div>
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span> <span class="keywordtype">int</span> <a class="code" href="group__lavfi__buffersink.html#ga653228f4cbca427c654d844a5fc59cfa">av_buffersink_get_frame</a>(<a class="code" href="structAVFilterContext.html">AVFilterContext</a> *ctx, <a class="code" href="structAVFrame.html">AVFrame</a> *<a class="code" href="demuxing__decoding_8c.html#ad7d33d579a8d4241a5e643e39287a209">frame</a>);</div>
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span> <span class="comment"></span></div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span> <span class="comment">/**</span></div>
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span> <span class="comment"> * Same as av_buffersink_get_frame(), but with the ability to specify the number</span></div>
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span> <span class="comment"> * of samples read. This function is less efficient than</span></div>
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span> <span class="comment"> * av_buffersink_get_frame(), because it copies the data around.</span></div>
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span> <span class="comment"> *</span></div>
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span> <span class="comment"> * @param ctx pointer to a context of the abuffersink AVFilter.</span></div>
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span> <span class="comment"> * @param frame pointer to an allocated frame that will be filled with data.</span></div>
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span> <span class="comment"> * The data must be freed using av_frame_unref() / av_frame_free()</span></div>
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span> <span class="comment"> * frame will contain exactly nb_samples audio samples, except at</span></div>
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span> <span class="comment"> * the end of stream, when it can contain less than nb_samples.</span></div>
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span> <span class="comment"> *</span></div>
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span> <span class="comment"> * @return The return codes have the same meaning as for</span></div>
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span> <span class="comment"> * av_buffersink_get_samples().</span></div>
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span> <span class="comment"> *</span></div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span> <span class="comment"> * @warning do not mix this function with av_buffersink_get_frame(). Use only one or</span></div>
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span> <span class="comment"> * the other with a single sink, not both.</span></div>
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span> <span class="comment"> */</span></div>
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span> <span class="keywordtype">int</span> <a class="code" href="group__lavfi__buffersink.html#ga9c06b3744579f165cc032160c154828a">av_buffersink_get_samples</a>(<a class="code" href="structAVFilterContext.html">AVFilterContext</a> *ctx, <a class="code" href="structAVFrame.html">AVFrame</a> *<a class="code" href="demuxing__decoding_8c.html#ad7d33d579a8d4241a5e643e39287a209">frame</a>, <span class="keywordtype">int</span> nb_samples);</div>
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span> <span class="comment"></span></div>
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span> <span class="comment">/**</span></div>
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span> <span class="comment"> * @}</span></div>
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span> <span class="comment"> */</span></div>
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span> </div>
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span> <span class="preprocessor">#endif </span><span class="comment">/* AVFILTER_BUFFERSINK_H */</span><span class="preprocessor"></span></div>
<div class="ttc" id="structAVFrame_html"><div class="ttname"><a href="structAVFrame.html">AVFrame</a></div><div class="ttdoc">This structure describes decoded (raw) audio or video data. </div><div class="ttdef"><b>Definition:</b> <a href="frame_8h_source.html#l00181">frame.h:181</a></div></div>
<div class="ttc" id="group__lavfi__buffersink_html_gac27f0473a1e3dc340cf8e557b6fa98dd"><div class="ttname"><a href="group__lavfi__buffersink.html#gac27f0473a1e3dc340cf8e557b6fa98dd">av_buffersink_params_alloc</a></div><div class="ttdeci">AVBufferSinkParams * av_buffersink_params_alloc(void)</div><div class="ttdoc">Create an AVBufferSinkParams structure. </div></div>
<div class="ttc" id="avfilter_8h_html"><div class="ttname"><a href="avfilter_8h.html">avfilter.h</a></div><div class="ttdoc">Main libavfilter public API header. </div></div>
<div class="ttc" id="structAVABufferSinkParams_html_acc8caf60d796e7765ff8361dd4abb74d"><div class="ttname"><a href="structAVABufferSinkParams.html#acc8caf60d796e7765ff8361dd4abb74d">AVABufferSinkParams::channel_counts</a></div><div class="ttdeci">const int * channel_counts</div><div class="ttdoc">list of allowed channel counts, terminated by -1 </div><div class="ttdef"><b>Definition:</b> <a href="buffersink_8h_source.html#l00082">buffersink.h:82</a></div></div>
<div class="ttc" id="group__lavfi__buffersink_html_ga87d2066b9a7f5dfaff00a0e0ac2e25e7"><div class="ttname"><a href="group__lavfi__buffersink.html#ga87d2066b9a7f5dfaff00a0e0ac2e25e7">av_abuffersink_params_alloc</a></div><div class="ttdeci">AVABufferSinkParams * av_abuffersink_params_alloc(void)</div><div class="ttdoc">Create an AVABufferSinkParams structure. </div></div>
<div class="ttc" id="structAVABufferSinkParams_html_afed7e06a41ad6a92f78421179514d9c3"><div class="ttname"><a href="structAVABufferSinkParams.html#afed7e06a41ad6a92f78421179514d9c3">AVABufferSinkParams::sample_fmts</a></div><div class="ttdeci">enum AVSampleFormat * sample_fmts</div><div class="ttdoc">list of allowed sample formats, terminated by AV_SAMPLE_FMT_NONE </div><div class="ttdef"><b>Definition:</b> <a href="buffersink_8h_source.html#l00080">buffersink.h:80</a></div></div>
<div class="ttc" id="demuxing__decoding_8c_html_ad7d33d579a8d4241a5e643e39287a209"><div class="ttname"><a href="demuxing__decoding_8c.html#ad7d33d579a8d4241a5e643e39287a209">frame</a></div><div class="ttdeci">static AVFrame * frame</div><div class="ttdef"><b>Definition:</b> <a href="demuxing__decoding_8c_source.html#l00053">demuxing_decoding.c:53</a></div></div>
<div class="ttc" id="structAVABufferSinkParams_html_ab634ced9e52896f1cf4e3a4574e27ae5"><div class="ttname"><a href="structAVABufferSinkParams.html#ab634ced9e52896f1cf4e3a4574e27ae5">AVABufferSinkParams::sample_rates</a></div><div class="ttdeci">int * sample_rates</div><div class="ttdoc">list of allowed sample rates, terminated by -1 </div><div class="ttdef"><b>Definition:</b> <a href="buffersink_8h_source.html#l00084">buffersink.h:84</a></div></div>
<div class="ttc" id="group__lavfi__buffersink_html_ga71ae9c529c8da51681e12faa37d1a395"><div class="ttname"><a href="group__lavfi__buffersink.html#ga71ae9c529c8da51681e12faa37d1a395">av_buffersink_get_frame_flags</a></div><div class="ttdeci">int av_buffersink_get_frame_flags(AVFilterContext *ctx, AVFrame *frame, int flags)</div><div class="ttdoc">Get a frame with filtered data from sink and put it in frame. </div></div>
<div class="ttc" id="structAVABufferSinkParams_html"><div class="ttname"><a href="structAVABufferSinkParams.html">AVABufferSinkParams</a></div><div class="ttdoc">Struct to use for initializing an abuffersink context. </div><div class="ttdef"><b>Definition:</b> <a href="buffersink_8h_source.html#l00079">buffersink.h:79</a></div></div>
<div class="ttc" id="group__lavfi__buffersink_html_ga9c06b3744579f165cc032160c154828a"><div class="ttname"><a href="group__lavfi__buffersink.html#ga9c06b3744579f165cc032160c154828a">av_buffersink_get_samples</a></div><div class="ttdeci">int av_buffersink_get_samples(AVFilterContext *ctx, AVFrame *frame, int nb_samples)</div><div class="ttdoc">Same as av_buffersink_get_frame(), but with the ability to specify the number of samples read...</div></div>
<div class="ttc" id="structAVBufferSinkParams_html"><div class="ttname"><a href="structAVBufferSinkParams.html">AVBufferSinkParams</a></div><div class="ttdoc">Struct to use for initializing a buffersink context. </div><div class="ttdef"><b>Definition:</b> <a href="buffersink_8h_source.html#l00065">buffersink.h:65</a></div></div>
<div class="ttc" id="group__lavu__sampfmts_html_gaf9a51ca15301871723577c730b5865c5"><div class="ttname"><a href="group__lavu__sampfmts.html#gaf9a51ca15301871723577c730b5865c5">AVSampleFormat</a></div><div class="ttdeci">AVSampleFormat</div><div class="ttdoc">Audio sample formats. </div><div class="ttdef"><b>Definition:</b> <a href="samplefmt_8h_source.html#l00059">samplefmt.h:59</a></div></div>
<div class="ttc" id="structAVABufferSinkParams_html_a45e4a312b57e62be05e334283fefa904"><div class="ttname"><a href="structAVABufferSinkParams.html#a45e4a312b57e62be05e334283fefa904">AVABufferSinkParams::all_channel_counts</a></div><div class="ttdeci">int all_channel_counts</div><div class="ttdoc">if not 0, accept any channel count or layout </div><div class="ttdef"><b>Definition:</b> <a href="buffersink_8h_source.html#l00083">buffersink.h:83</a></div></div>
<div class="ttc" id="structAVRational_html"><div class="ttname"><a href="structAVRational.html">AVRational</a></div><div class="ttdoc">rational number numerator/denominator </div><div class="ttdef"><b>Definition:</b> <a href="rational_8h_source.html#l00043">rational.h:43</a></div></div>
<div class="ttc" id="group__lavfi__buffersink_html_ga9e788b28139d9b5063676ac81870737b"><div class="ttname"><a href="group__lavfi__buffersink.html#ga9e788b28139d9b5063676ac81870737b">av_buffersink_get_frame_rate</a></div><div class="ttdeci">AVRational av_buffersink_get_frame_rate(AVFilterContext *ctx)</div><div class="ttdoc">Get the frame rate of the input. </div></div>
<div class="ttc" id="structAVBufferSinkParams_html_a025d4705672eb83b131f5587b7cd2898"><div class="ttname"><a href="structAVBufferSinkParams.html#a025d4705672eb83b131f5587b7cd2898">AVBufferSinkParams::pixel_fmts</a></div><div class="ttdeci">enum AVPixelFormat * pixel_fmts</div><div class="ttdoc">list of allowed pixel formats, terminated by AV_PIX_FMT_NONE </div><div class="ttdef"><b>Definition:</b> <a href="buffersink_8h_source.html#l00066">buffersink.h:66</a></div></div>
<div class="ttc" id="group__lavfi__buffersink_html_ga359d7d1e42c27ca14c07559d4e9adba7"><div class="ttname"><a href="group__lavfi__buffersink.html#ga359d7d1e42c27ca14c07559d4e9adba7">av_buffersink_set_frame_size</a></div><div class="ttdeci">void av_buffersink_set_frame_size(AVFilterContext *ctx, unsigned frame_size)</div><div class="ttdoc">Set the frame size for an audio buffer sink. </div></div>
<div class="ttc" id="structAVFilterContext_html"><div class="ttname"><a href="structAVFilterContext.html">AVFilterContext</a></div><div class="ttdoc">An instance of a filter. </div><div class="ttdef"><b>Definition:</b> <a href="avfilter_8h_source.html#l00304">avfilter.h:304</a></div></div>
<div class="ttc" id="group__lavfi__buffersink_html_ga653228f4cbca427c654d844a5fc59cfa"><div class="ttname"><a href="group__lavfi__buffersink.html#ga653228f4cbca427c654d844a5fc59cfa">av_buffersink_get_frame</a></div><div class="ttdeci">int av_buffersink_get_frame(AVFilterContext *ctx, AVFrame *frame)</div><div class="ttdoc">Get a frame with filtered data from sink and put it in frame. </div></div>
<div class="ttc" id="structAVABufferSinkParams_html_a168a137676e4ed7facf2e027bc1fbce7"><div class="ttname"><a href="structAVABufferSinkParams.html#a168a137676e4ed7facf2e027bc1fbce7">AVABufferSinkParams::channel_layouts</a></div><div class="ttdeci">const int64_t * channel_layouts</div><div class="ttdoc">list of allowed channel layouts, terminated by -1 </div><div class="ttdef"><b>Definition:</b> <a href="buffersink_8h_source.html#l00081">buffersink.h:81</a></div></div>
<div class="ttc" id="pixfmt_8h_html_a9a8e335cf3be472042bc9f0cf80cd4c5"><div class="ttname"><a href="pixfmt_8h.html#a9a8e335cf3be472042bc9f0cf80cd4c5">AVPixelFormat</a></div><div class="ttdeci">AVPixelFormat</div><div class="ttdoc">Pixel format. </div><div class="ttdef"><b>Definition:</b> <a href="pixfmt_8h_source.html#l00061">pixfmt.h:61</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.6
</small></address>
</body>
</html>