• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3<head>
4<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5<title>Codec utilities: GStreamer Base Plugins 1.0 Library Reference Manual</title>
6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7<link rel="home" href="index.html" title="GStreamer Base Plugins 1.0 Library Reference Manual">
8<link rel="up" href="gstreamer-base-utils.html" title="Base Utils Library">
9<link rel="prev" href="gst-plugins-base-libs-Version.html" title="Version">
10<link rel="next" href="gst-plugins-base-libs-Descriptions.html" title="Descriptions">
11<meta name="generator" content="GTK-Doc V1.28 (XML mode)">
12<link rel="stylesheet" href="style.css" type="text/css">
13</head>
14<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
16<td width="100%" align="left" class="shortcuts">
17<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span18                  <a href="#gst-plugins-base-libs-Codec-utilities.description" class="shortcut">Description</a></span>
19</td>
20<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
21<td><a accesskey="u" href="gstreamer-base-utils.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
22<td><a accesskey="p" href="gst-plugins-base-libs-Version.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
23<td><a accesskey="n" href="gst-plugins-base-libs-Descriptions.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
24</tr></table>
25<div class="refentry">
26<a name="gst-plugins-base-libs-Codec-utilities"></a><div class="titlepage"></div>
27<div class="refnamediv"><table width="100%"><tr>
28<td valign="top">
29<h2><span class="refentrytitle"><a name="gst-plugins-base-libs-Codec-utilities.top_of_page"></a>Codec utilities</span></h2>
30<p>Codec utilities — Miscellaneous codec-specific utility functions</p>
31</td>
32<td class="gallery_image" valign="top" align="right"></td>
33</tr></table></div>
34<div class="refsect1">
35<a name="gst-plugins-base-libs-Codec-utilities.functions"></a><h2>Functions</h2>
36<div class="informaltable"><table class="informaltable" width="100%" border="0">
37<colgroup>
38<col width="150px" class="functions_return">
39<col class="functions_name">
40</colgroup>
41<tbody>
42<tr>
43<td class="function_type">
44<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
45</td>
46<td class="function_name">
47<a class="link" href="gst-plugins-base-libs-Codec-utilities.html#gst-codec-utils-aac-get-sample-rate-from-index" title="gst_codec_utils_aac_get_sample_rate_from_index ()">gst_codec_utils_aac_get_sample_rate_from_index</a> <span class="c_punctuation">()</span>
48</td>
49</tr>
50<tr>
51<td class="function_type">
52<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
53</td>
54<td class="function_name">
55<a class="link" href="gst-plugins-base-libs-Codec-utilities.html#gst-codec-utils-aac-get-index-from-sample-rate" title="gst_codec_utils_aac_get_index_from_sample_rate ()">gst_codec_utils_aac_get_index_from_sample_rate</a> <span class="c_punctuation">()</span>
56</td>
57</tr>
58<tr>
59<td class="function_type">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
60</td>
61<td class="function_name">
62<a class="link" href="gst-plugins-base-libs-Codec-utilities.html#gst-codec-utils-aac-get-profile" title="gst_codec_utils_aac_get_profile ()">gst_codec_utils_aac_get_profile</a> <span class="c_punctuation">()</span>
63</td>
64</tr>
65<tr>
66<td class="function_type">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
67</td>
68<td class="function_name">
69<a class="link" href="gst-plugins-base-libs-Codec-utilities.html#gst-codec-utils-aac-get-level" title="gst_codec_utils_aac_get_level ()">gst_codec_utils_aac_get_level</a> <span class="c_punctuation">()</span>
70</td>
71</tr>
72<tr>
73<td class="function_type">
74<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
75</td>
76<td class="function_name">
77<a class="link" href="gst-plugins-base-libs-Codec-utilities.html#gst-codec-utils-aac-get-channels" title="gst_codec_utils_aac_get_channels ()">gst_codec_utils_aac_get_channels</a> <span class="c_punctuation">()</span>
78</td>
79</tr>
80<tr>
81<td class="function_type">
82<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
83</td>
84<td class="function_name">
85<a class="link" href="gst-plugins-base-libs-Codec-utilities.html#gst-codec-utils-aac-get-sample-rate" title="gst_codec_utils_aac_get_sample_rate ()">gst_codec_utils_aac_get_sample_rate</a> <span class="c_punctuation">()</span>
86</td>
87</tr>
88<tr>
89<td class="function_type">
90<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
91</td>
92<td class="function_name">
93<a class="link" href="gst-plugins-base-libs-Codec-utilities.html#gst-codec-utils-aac-caps-set-level-and-profile" title="gst_codec_utils_aac_caps_set_level_and_profile ()">gst_codec_utils_aac_caps_set_level_and_profile</a> <span class="c_punctuation">()</span>
94</td>
95</tr>
96<tr>
97<td class="function_type">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
98</td>
99<td class="function_name">
100<a class="link" href="gst-plugins-base-libs-Codec-utilities.html#gst-codec-utils-h264-get-profile" title="gst_codec_utils_h264_get_profile ()">gst_codec_utils_h264_get_profile</a> <span class="c_punctuation">()</span>
101</td>
102</tr>
103<tr>
104<td class="function_type">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
105</td>
106<td class="function_name">
107<a class="link" href="gst-plugins-base-libs-Codec-utilities.html#gst-codec-utils-h264-get-level" title="gst_codec_utils_h264_get_level ()">gst_codec_utils_h264_get_level</a> <span class="c_punctuation">()</span>
108</td>
109</tr>
110<tr>
111<td class="function_type">
112<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
113</td>
114<td class="function_name">
115<a class="link" href="gst-plugins-base-libs-Codec-utilities.html#gst-codec-utils-h264-caps-set-level-and-profile" title="gst_codec_utils_h264_caps_set_level_and_profile ()">gst_codec_utils_h264_caps_set_level_and_profile</a> <span class="c_punctuation">()</span>
116</td>
117</tr>
118<tr>
119<td class="function_type">
120<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="returnvalue">guint8</span></a>
121</td>
122<td class="function_name">
123<a class="link" href="gst-plugins-base-libs-Codec-utilities.html#gst-codec-utils-h264-get-level-idc" title="gst_codec_utils_h264_get_level_idc ()">gst_codec_utils_h264_get_level_idc</a> <span class="c_punctuation">()</span>
124</td>
125</tr>
126<tr>
127<td class="function_type">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
128</td>
129<td class="function_name">
130<a class="link" href="gst-plugins-base-libs-Codec-utilities.html#gst-codec-utils-h265-get-profile" title="gst_codec_utils_h265_get_profile ()">gst_codec_utils_h265_get_profile</a> <span class="c_punctuation">()</span>
131</td>
132</tr>
133<tr>
134<td class="function_type">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
135</td>
136<td class="function_name">
137<a class="link" href="gst-plugins-base-libs-Codec-utilities.html#gst-codec-utils-h265-get-tier" title="gst_codec_utils_h265_get_tier ()">gst_codec_utils_h265_get_tier</a> <span class="c_punctuation">()</span>
138</td>
139</tr>
140<tr>
141<td class="function_type">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
142</td>
143<td class="function_name">
144<a class="link" href="gst-plugins-base-libs-Codec-utilities.html#gst-codec-utils-h265-get-level" title="gst_codec_utils_h265_get_level ()">gst_codec_utils_h265_get_level</a> <span class="c_punctuation">()</span>
145</td>
146</tr>
147<tr>
148<td class="function_type">
149<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="returnvalue">guint8</span></a>
150</td>
151<td class="function_name">
152<a class="link" href="gst-plugins-base-libs-Codec-utilities.html#gst-codec-utils-h265-get-level-idc" title="gst_codec_utils_h265_get_level_idc ()">gst_codec_utils_h265_get_level_idc</a> <span class="c_punctuation">()</span>
153</td>
154</tr>
155<tr>
156<td class="function_type">
157<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
158</td>
159<td class="function_name">
160<a class="link" href="gst-plugins-base-libs-Codec-utilities.html#gst-codec-utils-h265-caps-set-level-tier-and-profile" title="gst_codec_utils_h265_caps_set_level_tier_and_profile ()">gst_codec_utils_h265_caps_set_level_tier_and_profile</a> <span class="c_punctuation">()</span>
161</td>
162</tr>
163<tr>
164<td class="function_type">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
165</td>
166<td class="function_name">
167<a class="link" href="gst-plugins-base-libs-Codec-utilities.html#gst-codec-utils-mpeg4video-get-profile" title="gst_codec_utils_mpeg4video_get_profile ()">gst_codec_utils_mpeg4video_get_profile</a> <span class="c_punctuation">()</span>
168</td>
169</tr>
170<tr>
171<td class="function_type">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
172</td>
173<td class="function_name">
174<a class="link" href="gst-plugins-base-libs-Codec-utilities.html#gst-codec-utils-mpeg4video-get-level" title="gst_codec_utils_mpeg4video_get_level ()">gst_codec_utils_mpeg4video_get_level</a> <span class="c_punctuation">()</span>
175</td>
176</tr>
177<tr>
178<td class="function_type">
179<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
180</td>
181<td class="function_name">
182<a class="link" href="gst-plugins-base-libs-Codec-utilities.html#gst-codec-utils-mpeg4video-caps-set-level-and-profile" title="gst_codec_utils_mpeg4video_caps_set_level_and_profile ()">gst_codec_utils_mpeg4video_caps_set_level_and_profile</a> <span class="c_punctuation">()</span>
183</td>
184</tr>
185<tr>
186<td class="function_type">
187<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstCaps.html#GstCaps-struct"><span class="returnvalue">GstCaps</span></a> *
188</td>
189<td class="function_name">
190<a class="link" href="gst-plugins-base-libs-Codec-utilities.html#gst-codec-utils-opus-create-caps" title="gst_codec_utils_opus_create_caps ()">gst_codec_utils_opus_create_caps</a> <span class="c_punctuation">()</span>
191</td>
192</tr>
193<tr>
194<td class="function_type">
195<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstCaps.html#GstCaps-struct"><span class="returnvalue">GstCaps</span></a> *
196</td>
197<td class="function_name">
198<a class="link" href="gst-plugins-base-libs-Codec-utilities.html#gst-codec-utils-opus-create-caps-from-header" title="gst_codec_utils_opus_create_caps_from_header ()">gst_codec_utils_opus_create_caps_from_header</a> <span class="c_punctuation">()</span>
199</td>
200</tr>
201<tr>
202<td class="function_type">
203<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
204</td>
205<td class="function_name">
206<a class="link" href="gst-plugins-base-libs-Codec-utilities.html#gst-codec-utils-opus-parse-caps" title="gst_codec_utils_opus_parse_caps ()">gst_codec_utils_opus_parse_caps</a> <span class="c_punctuation">()</span>
207</td>
208</tr>
209<tr>
210<td class="function_type">
211<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#GstBuffer-struct"><span class="returnvalue">GstBuffer</span></a> *
212</td>
213<td class="function_name">
214<a class="link" href="gst-plugins-base-libs-Codec-utilities.html#gst-codec-utils-opus-create-header" title="gst_codec_utils_opus_create_header ()">gst_codec_utils_opus_create_header</a> <span class="c_punctuation">()</span>
215</td>
216</tr>
217<tr>
218<td class="function_type">
219<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
220</td>
221<td class="function_name">
222<a class="link" href="gst-plugins-base-libs-Codec-utilities.html#gst-codec-utils-opus-parse-header" title="gst_codec_utils_opus_parse_header ()">gst_codec_utils_opus_parse_header</a> <span class="c_punctuation">()</span>
223</td>
224</tr>
225</tbody>
226</table></div>
227</div>
228<div class="refsect1">
229<a name="gst-plugins-base-libs-Codec-utilities.includes"></a><h2>Includes</h2>
230<pre class="synopsis">#include &lt;gst/pbutils/pbutils.h&gt;
231</pre>
232</div>
233<div class="refsect1">
234<a name="gst-plugins-base-libs-Codec-utilities.description"></a><h2>Description</h2>
235<p>Provides codec-specific ulility functions such as functions to provide the
236codec profile and level in human-readable string form from header data.</p>
237</div>
238<div class="refsect1">
239<a name="gst-plugins-base-libs-Codec-utilities.functions_details"></a><h2>Functions</h2>
240<div class="refsect2">
241<a name="gst-codec-utils-aac-get-sample-rate-from-index"></a><h3>gst_codec_utils_aac_get_sample_rate_from_index ()</h3>
242<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
243gst_codec_utils_aac_get_sample_rate_from_index
244                               (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> sr_idx</code></em>);</pre>
245<p>Translates the sample rate index found in AAC headers to the actual sample
246rate.</p>
247<div class="refsect3">
248<a name="gst-codec-utils-aac-get-sample-rate-from-index.parameters"></a><h4>Parameters</h4>
249<div class="informaltable"><table class="informaltable" width="100%" border="0">
250<colgroup>
251<col width="150px" class="parameters_name">
252<col class="parameters_description">
253<col width="200px" class="parameters_annotations">
254</colgroup>
255<tbody><tr>
256<td class="parameter_name"><p>sr_idx</p></td>
257<td class="parameter_description"><p>Sample rate index as from the AudioSpecificConfig (MPEG-4
258container) or ADTS frame header</p></td>
259<td class="parameter_annotations"> </td>
260</tr></tbody>
261</table></div>
262</div>
263<div class="refsect3">
264<a name="gst-codec-utils-aac-get-sample-rate-from-index.returns"></a><h4>Returns</h4>
265<p> The sample rate if <em class="parameter"><code>sr_idx</code></em>
266is valid, 0 otherwise.</p>
267</div>
268</div>
269<hr>
270<div class="refsect2">
271<a name="gst-codec-utils-aac-get-index-from-sample-rate"></a><h3>gst_codec_utils_aac_get_index_from_sample_rate ()</h3>
272<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
273gst_codec_utils_aac_get_index_from_sample_rate
274                               (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> rate</code></em>);</pre>
275<p>Translates the sample rate to the index corresponding to it in AAC spec.</p>
276<div class="refsect3">
277<a name="gst-codec-utils-aac-get-index-from-sample-rate.parameters"></a><h4>Parameters</h4>
278<div class="informaltable"><table class="informaltable" width="100%" border="0">
279<colgroup>
280<col width="150px" class="parameters_name">
281<col class="parameters_description">
282<col width="200px" class="parameters_annotations">
283</colgroup>
284<tbody><tr>
285<td class="parameter_name"><p>rate</p></td>
286<td class="parameter_description"><p>Sample rate</p></td>
287<td class="parameter_annotations"> </td>
288</tr></tbody>
289</table></div>
290</div>
291<div class="refsect3">
292<a name="gst-codec-utils-aac-get-index-from-sample-rate.returns"></a><h4>Returns</h4>
293<p> The AAC index for this sample rate, -1 if the rate is not a
294valid AAC sample rate.</p>
295</div>
296</div>
297<hr>
298<div class="refsect2">
299<a name="gst-codec-utils-aac-get-profile"></a><h3>gst_codec_utils_aac_get_profile ()</h3>
300<pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
301gst_codec_utils_aac_get_profile (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *audio_config</code></em>,
302                                 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);</pre>
303<p>Returns the profile of the given AAC stream as a string. The profile is
304normally determined using the AudioObjectType field which is in the first
3055 bits of <em class="parameter"><code>audio_config</code></em>
306</p>
307<div class="refsect3">
308<a name="gst-codec-utils-aac-get-profile.parameters"></a><h4>Parameters</h4>
309<div class="informaltable"><table class="informaltable" width="100%" border="0">
310<colgroup>
311<col width="150px" class="parameters_name">
312<col class="parameters_description">
313<col width="200px" class="parameters_annotations">
314</colgroup>
315<tbody>
316<tr>
317<td class="parameter_name"><p>audio_config</p></td>
318<td class="parameter_description"><p>a pointer to the AudioSpecificConfig
319as specified in the Elementary Stream Descriptor (esds)
320in ISO/IEC 14496-1. </p></td>
321<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len]</span></td>
322</tr>
323<tr>
324<td class="parameter_name"><p>len</p></td>
325<td class="parameter_description"><p>Length of <em class="parameter"><code>audio_config</code></em>
326in bytes</p></td>
327<td class="parameter_annotations"> </td>
328</tr>
329</tbody>
330</table></div>
331</div>
332<div class="refsect3">
333<a name="gst-codec-utils-aac-get-profile.returns"></a><h4>Returns</h4>
334<p> The profile as a const string and <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the profile could not be
335determined.</p>
336</div>
337</div>
338<hr>
339<div class="refsect2">
340<a name="gst-codec-utils-aac-get-level"></a><h3>gst_codec_utils_aac_get_level ()</h3>
341<pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
342gst_codec_utils_aac_get_level (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *audio_config</code></em>,
343                               <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);</pre>
344<p>Determines the level of a stream as defined in ISO/IEC 14496-3. For AAC LC
345streams, the constraints from the AAC audio profile are applied. For AAC
346Main, LTP, SSR and others, the Main profile is used.</p>
347<p>The <em class="parameter"><code>audio_config</code></em>
348 parameter follows the following format, starting from the
349most significant bit of the first byte:</p>
350<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
351<li class="listitem"><p>Bit 0:4 contains the AudioObjectType (if this is 0x5, then the
352real AudioObjectType is carried after the rate and channel data)</p></li>
353<li class="listitem"><p>Bit 5:8 contains the sample frequency index (if this is 0xf, then the
354next 24 bits define the actual sample frequency, and subsequent
355fields are appropriately shifted).</p></li>
356<li class="listitem"><p>Bit 9:12 contains the channel configuration</p></li>
357</ul></div>
358<div class="refsect3">
359<a name="gst-codec-utils-aac-get-level.parameters"></a><h4>Parameters</h4>
360<div class="informaltable"><table class="informaltable" width="100%" border="0">
361<colgroup>
362<col width="150px" class="parameters_name">
363<col class="parameters_description">
364<col width="200px" class="parameters_annotations">
365</colgroup>
366<tbody>
367<tr>
368<td class="parameter_name"><p>audio_config</p></td>
369<td class="parameter_description"><p>a pointer to the AudioSpecificConfig
370as specified in the Elementary Stream Descriptor (esds)
371in ISO/IEC 14496-1. </p></td>
372<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len]</span></td>
373</tr>
374<tr>
375<td class="parameter_name"><p>len</p></td>
376<td class="parameter_description"><p>Length of <em class="parameter"><code>audio_config</code></em>
377in bytes</p></td>
378<td class="parameter_annotations"> </td>
379</tr>
380</tbody>
381</table></div>
382</div>
383<div class="refsect3">
384<a name="gst-codec-utils-aac-get-level.returns"></a><h4>Returns</h4>
385<p> The level as a const string and <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the level could not be
386determined.</p>
387</div>
388</div>
389<hr>
390<div class="refsect2">
391<a name="gst-codec-utils-aac-get-channels"></a><h3>gst_codec_utils_aac_get_channels ()</h3>
392<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
393gst_codec_utils_aac_get_channels (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *audio_config</code></em>,
394                                  <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);</pre>
395<p>Returns the channels of the given AAC stream.</p>
396<div class="refsect3">
397<a name="gst-codec-utils-aac-get-channels.parameters"></a><h4>Parameters</h4>
398<div class="informaltable"><table class="informaltable" width="100%" border="0">
399<colgroup>
400<col width="150px" class="parameters_name">
401<col class="parameters_description">
402<col width="200px" class="parameters_annotations">
403</colgroup>
404<tbody>
405<tr>
406<td class="parameter_name"><p>audio_config</p></td>
407<td class="parameter_description"><p>a pointer to the AudioSpecificConfig
408as specified in the Elementary Stream Descriptor (esds)
409in ISO/IEC 14496-1. </p></td>
410<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len]</span></td>
411</tr>
412<tr>
413<td class="parameter_name"><p>len</p></td>
414<td class="parameter_description"><p>Length of <em class="parameter"><code>audio_config</code></em>
415in bytes</p></td>
416<td class="parameter_annotations"> </td>
417</tr>
418</tbody>
419</table></div>
420</div>
421<div class="refsect3">
422<a name="gst-codec-utils-aac-get-channels.returns"></a><h4>Returns</h4>
423<p> The channels or 0 if the channel could not be determined.</p>
424</div>
425<p class="since">Since: <a class="link" href="ix06.html#api-index-1.10">1.10</a></p>
426</div>
427<hr>
428<div class="refsect2">
429<a name="gst-codec-utils-aac-get-sample-rate"></a><h3>gst_codec_utils_aac_get_sample_rate ()</h3>
430<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
431gst_codec_utils_aac_get_sample_rate (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *audio_config</code></em>,
432                                     <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);</pre>
433<p>Translates the sample rate index found in AAC headers to the actual sample
434rate.</p>
435<div class="refsect3">
436<a name="gst-codec-utils-aac-get-sample-rate.parameters"></a><h4>Parameters</h4>
437<div class="informaltable"><table class="informaltable" width="100%" border="0">
438<colgroup>
439<col width="150px" class="parameters_name">
440<col class="parameters_description">
441<col width="200px" class="parameters_annotations">
442</colgroup>
443<tbody>
444<tr>
445<td class="parameter_name"><p>audio_config</p></td>
446<td class="parameter_description"><p>a pointer to the AudioSpecificConfig
447as specified in the Elementary Stream Descriptor (esds)
448in ISO/IEC 14496-1. </p></td>
449<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len]</span></td>
450</tr>
451<tr>
452<td class="parameter_name"><p>len</p></td>
453<td class="parameter_description"><p>Length of <em class="parameter"><code>audio_config</code></em>
454</p></td>
455<td class="parameter_annotations"> </td>
456</tr>
457</tbody>
458</table></div>
459</div>
460<div class="refsect3">
461<a name="gst-codec-utils-aac-get-sample-rate.returns"></a><h4>Returns</h4>
462<p> The sample rate if sr_idx is valid, 0 otherwise.</p>
463</div>
464<p class="since">Since: <a class="link" href="ix06.html#api-index-1.10">1.10</a></p>
465</div>
466<hr>
467<div class="refsect2">
468<a name="gst-codec-utils-aac-caps-set-level-and-profile"></a><h3>gst_codec_utils_aac_caps_set_level_and_profile ()</h3>
469<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
470gst_codec_utils_aac_caps_set_level_and_profile
471                               (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstCaps.html#GstCaps-struct"><span class="type">GstCaps</span></a> *caps</code></em>,
472                                <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *audio_config</code></em>,
473                                <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);</pre>
474<p>Sets the level and profile on <em class="parameter"><code>caps</code></em>
475 if it can be determined from
476<em class="parameter"><code>audio_config</code></em>
477. See <a class="link" href="gst-plugins-base-libs-Codec-utilities.html#gst-codec-utils-aac-get-level" title="gst_codec_utils_aac_get_level ()"><code class="function">gst_codec_utils_aac_get_level()</code></a> and
478<a class="link" href="gst-plugins-base-libs-Codec-utilities.html#gst-codec-utils-aac-get-profile" title="gst_codec_utils_aac_get_profile ()"><code class="function">gst_codec_utils_aac_get_profile()</code></a> for more details on the parameters.
479<em class="parameter"><code>caps</code></em>
480 must be audio/mpeg caps with an "mpegversion" field of either 2 or 4.
481If mpegversion is 4, the "base-profile" field is also set in <em class="parameter"><code>caps</code></em>
482.</p>
483<div class="refsect3">
484<a name="gst-codec-utils-aac-caps-set-level-and-profile.parameters"></a><h4>Parameters</h4>
485<div class="informaltable"><table class="informaltable" width="100%" border="0">
486<colgroup>
487<col width="150px" class="parameters_name">
488<col class="parameters_description">
489<col width="200px" class="parameters_annotations">
490</colgroup>
491<tbody>
492<tr>
493<td class="parameter_name"><p>caps</p></td>
494<td class="parameter_description"><p>the <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstCaps.html#GstCaps-struct"><span class="type">GstCaps</span></a> to which level and profile fields are to be added</p></td>
495<td class="parameter_annotations"> </td>
496</tr>
497<tr>
498<td class="parameter_name"><p>audio_config</p></td>
499<td class="parameter_description"><p>a pointer to the AudioSpecificConfig
500as specified in the Elementary Stream Descriptor (esds)
501in ISO/IEC 14496-1. (See below for more details). </p></td>
502<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len]</span></td>
503</tr>
504<tr>
505<td class="parameter_name"><p>len</p></td>
506<td class="parameter_description"><p>Length of <em class="parameter"><code>audio_config</code></em>
507in bytes</p></td>
508<td class="parameter_annotations"> </td>
509</tr>
510</tbody>
511</table></div>
512</div>
513<div class="refsect3">
514<a name="gst-codec-utils-aac-caps-set-level-and-profile.returns"></a><h4>Returns</h4>
515<p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the level and profile could be set, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
516</div>
517</div>
518<hr>
519<div class="refsect2">
520<a name="gst-codec-utils-h264-get-profile"></a><h3>gst_codec_utils_h264_get_profile ()</h3>
521<pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
522gst_codec_utils_h264_get_profile (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *sps</code></em>,
523                                  <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);</pre>
524<p>Converts the profile indication (profile_idc) in the stream's
525sequence parameter set into a string. The SPS is expected to have the
526following format, as defined in the H.264 specification. The SPS is viewed
527as a bitstream here, with bit 0 being the most significant bit of the first
528byte.</p>
529<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
530<li class="listitem"><p>Bit 0:7   - Profile indication</p></li>
531<li class="listitem"><p>Bit 8     - constraint_set0_flag</p></li>
532<li class="listitem"><p>Bit 9     - constraint_set1_flag</p></li>
533<li class="listitem"><p>Bit 10    - constraint_set2_flag</p></li>
534<li class="listitem"><p>Bit 11    - constraint_set3_flag</p></li>
535<li class="listitem"><p>Bit 12    - constraint_set3_flag</p></li>
536<li class="listitem"><p>Bit 13:15 - Reserved</p></li>
537<li class="listitem"><p>Bit 16:24 - Level indication</p></li>
538</ul></div>
539<div class="refsect3">
540<a name="gst-codec-utils-h264-get-profile.parameters"></a><h4>Parameters</h4>
541<div class="informaltable"><table class="informaltable" width="100%" border="0">
542<colgroup>
543<col width="150px" class="parameters_name">
544<col class="parameters_description">
545<col width="200px" class="parameters_annotations">
546</colgroup>
547<tbody>
548<tr>
549<td class="parameter_name"><p>sps</p></td>
550<td class="parameter_description"><p>Pointer to the sequence parameter set for the stream. </p></td>
551<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len]</span></td>
552</tr>
553<tr>
554<td class="parameter_name"><p>len</p></td>
555<td class="parameter_description"><p>Length of the data available in <em class="parameter"><code>sps</code></em>
556.</p></td>
557<td class="parameter_annotations"> </td>
558</tr>
559</tbody>
560</table></div>
561</div>
562<div class="refsect3">
563<a name="gst-codec-utils-h264-get-profile.returns"></a><h4>Returns</h4>
564<p> The profile as a const string, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if there is an error.</p>
565</div>
566</div>
567<hr>
568<div class="refsect2">
569<a name="gst-codec-utils-h264-get-level"></a><h3>gst_codec_utils_h264_get_level ()</h3>
570<pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
571gst_codec_utils_h264_get_level (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *sps</code></em>,
572                                <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);</pre>
573<p>Converts the level indication (level_idc) in the stream's
574sequence parameter set into a string. The SPS is expected to have the
575same format as for <a class="link" href="gst-plugins-base-libs-Codec-utilities.html#gst-codec-utils-h264-get-profile" title="gst_codec_utils_h264_get_profile ()"><code class="function">gst_codec_utils_h264_get_profile()</code></a>.</p>
576<div class="refsect3">
577<a name="gst-codec-utils-h264-get-level.parameters"></a><h4>Parameters</h4>
578<div class="informaltable"><table class="informaltable" width="100%" border="0">
579<colgroup>
580<col width="150px" class="parameters_name">
581<col class="parameters_description">
582<col width="200px" class="parameters_annotations">
583</colgroup>
584<tbody>
585<tr>
586<td class="parameter_name"><p>sps</p></td>
587<td class="parameter_description"><p>Pointer to the sequence parameter set for the stream. </p></td>
588<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len]</span></td>
589</tr>
590<tr>
591<td class="parameter_name"><p>len</p></td>
592<td class="parameter_description"><p>Length of the data available in <em class="parameter"><code>sps</code></em>
593.</p></td>
594<td class="parameter_annotations"> </td>
595</tr>
596</tbody>
597</table></div>
598</div>
599<div class="refsect3">
600<a name="gst-codec-utils-h264-get-level.returns"></a><h4>Returns</h4>
601<p> The level as a const string, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if there is an error.</p>
602</div>
603</div>
604<hr>
605<div class="refsect2">
606<a name="gst-codec-utils-h264-caps-set-level-and-profile"></a><h3>gst_codec_utils_h264_caps_set_level_and_profile ()</h3>
607<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
608gst_codec_utils_h264_caps_set_level_and_profile
609                               (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstCaps.html#GstCaps-struct"><span class="type">GstCaps</span></a> *caps</code></em>,
610                                <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *sps</code></em>,
611                                <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);</pre>
612<p>Sets the level and profile in <em class="parameter"><code>caps</code></em>
613 if it can be determined from <em class="parameter"><code>sps</code></em>
614. See
615<a class="link" href="gst-plugins-base-libs-Codec-utilities.html#gst-codec-utils-h264-get-level" title="gst_codec_utils_h264_get_level ()"><code class="function">gst_codec_utils_h264_get_level()</code></a> and <a class="link" href="gst-plugins-base-libs-Codec-utilities.html#gst-codec-utils-h264-get-profile" title="gst_codec_utils_h264_get_profile ()"><code class="function">gst_codec_utils_h264_get_profile()</code></a>
616for more details on the parameters.</p>
617<div class="refsect3">
618<a name="gst-codec-utils-h264-caps-set-level-and-profile.parameters"></a><h4>Parameters</h4>
619<div class="informaltable"><table class="informaltable" width="100%" border="0">
620<colgroup>
621<col width="150px" class="parameters_name">
622<col class="parameters_description">
623<col width="200px" class="parameters_annotations">
624</colgroup>
625<tbody>
626<tr>
627<td class="parameter_name"><p>caps</p></td>
628<td class="parameter_description"><p>the <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstCaps.html#GstCaps-struct"><span class="type">GstCaps</span></a> to which the level and profile are to be added</p></td>
629<td class="parameter_annotations"> </td>
630</tr>
631<tr>
632<td class="parameter_name"><p>sps</p></td>
633<td class="parameter_description"><p>Pointer to the sequence parameter set for the stream. </p></td>
634<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len]</span></td>
635</tr>
636<tr>
637<td class="parameter_name"><p>len</p></td>
638<td class="parameter_description"><p>Length of the data available in <em class="parameter"><code>sps</code></em>
639.</p></td>
640<td class="parameter_annotations"> </td>
641</tr>
642</tbody>
643</table></div>
644</div>
645<div class="refsect3">
646<a name="gst-codec-utils-h264-caps-set-level-and-profile.returns"></a><h4>Returns</h4>
647<p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the level and profile could be set, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
648</div>
649</div>
650<hr>
651<div class="refsect2">
652<a name="gst-codec-utils-h264-get-level-idc"></a><h3>gst_codec_utils_h264_get_level_idc ()</h3>
653<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="returnvalue">guint8</span></a>
654gst_codec_utils_h264_get_level_idc (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *level</code></em>);</pre>
655<p>Transform a level string from the caps into the level_idc</p>
656<div class="refsect3">
657<a name="gst-codec-utils-h264-get-level-idc.parameters"></a><h4>Parameters</h4>
658<div class="informaltable"><table class="informaltable" width="100%" border="0">
659<colgroup>
660<col width="150px" class="parameters_name">
661<col class="parameters_description">
662<col width="200px" class="parameters_annotations">
663</colgroup>
664<tbody><tr>
665<td class="parameter_name"><p>level</p></td>
666<td class="parameter_description"><p>A level string from caps</p></td>
667<td class="parameter_annotations"> </td>
668</tr></tbody>
669</table></div>
670</div>
671<div class="refsect3">
672<a name="gst-codec-utils-h264-get-level-idc.returns"></a><h4>Returns</h4>
673<p> the level_idc or 0 if the level is unknown</p>
674</div>
675</div>
676<hr>
677<div class="refsect2">
678<a name="gst-codec-utils-h265-get-profile"></a><h3>gst_codec_utils_h265_get_profile ()</h3>
679<pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
680gst_codec_utils_h265_get_profile (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *profile_tier_level</code></em>,
681                                  <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);</pre>
682<p>Converts the profile indication (general_profile_idc) in the stream's
683profile_level_tier structure into a string. The profile_tier_level is
684expected to have the following format, as defined in the H.265
685specification. The profile_tier_level is viewed as a bitstream here,
686with bit 0 being the most significant bit of the first byte.</p>
687<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
688<li class="listitem"><p>Bit 0:1   - general_profile_space</p></li>
689<li class="listitem"><p>Bit 2     - general_tier_flag</p></li>
690<li class="listitem"><p>Bit 3:7   - general_profile_idc</p></li>
691<li class="listitem"><p>Bit 8:39  - gernal_profile_compatibility_flags</p></li>
692<li class="listitem"><p>Bit 40    - general_progressive_source_flag</p></li>
693<li class="listitem"><p>Bit 41    - general_interlaced_source_flag</p></li>
694<li class="listitem"><p>Bit 42    - general_non_packed_constraint_flag</p></li>
695<li class="listitem"><p>Bit 43    - general_frame_only_constraint_flag</p></li>
696<li class="listitem"><p>Bit 44:87 - general_reserved_zero_44bits</p></li>
697<li class="listitem"><p>Bit 88:95 - general_level_idc</p></li>
698</ul></div>
699<div class="refsect3">
700<a name="gst-codec-utils-h265-get-profile.parameters"></a><h4>Parameters</h4>
701<div class="informaltable"><table class="informaltable" width="100%" border="0">
702<colgroup>
703<col width="150px" class="parameters_name">
704<col class="parameters_description">
705<col width="200px" class="parameters_annotations">
706</colgroup>
707<tbody>
708<tr>
709<td class="parameter_name"><p>profile_tier_level</p></td>
710<td class="parameter_description"><p>Pointer to the profile_tier_level
711structure for the stream. </p></td>
712<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len]</span></td>
713</tr>
714<tr>
715<td class="parameter_name"><p>len</p></td>
716<td class="parameter_description"><p>Length of the data available in <em class="parameter"><code>profile_tier_level</code></em>
717</p></td>
718<td class="parameter_annotations"> </td>
719</tr>
720</tbody>
721</table></div>
722</div>
723<div class="refsect3">
724<a name="gst-codec-utils-h265-get-profile.returns"></a><h4>Returns</h4>
725<p> The profile as a const string, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if there is an error.</p>
726</div>
727<p class="since">Since: <a class="link" href="ix11.html#api-index-1.4">1.4</a></p>
728</div>
729<hr>
730<div class="refsect2">
731<a name="gst-codec-utils-h265-get-tier"></a><h3>gst_codec_utils_h265_get_tier ()</h3>
732<pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
733gst_codec_utils_h265_get_tier (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *profile_tier_level</code></em>,
734                               <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);</pre>
735<p>Converts the tier indication (general_tier_flag) in the stream's
736profile_tier_level structure into a string. The profile_tier_level
737is expected to have the same format as for <a class="link" href="gst-plugins-base-libs-Codec-utilities.html#gst-codec-utils-h264-get-profile" title="gst_codec_utils_h264_get_profile ()"><code class="function">gst_codec_utils_h264_get_profile()</code></a>.</p>
738<div class="refsect3">
739<a name="gst-codec-utils-h265-get-tier.parameters"></a><h4>Parameters</h4>
740<div class="informaltable"><table class="informaltable" width="100%" border="0">
741<colgroup>
742<col width="150px" class="parameters_name">
743<col class="parameters_description">
744<col width="200px" class="parameters_annotations">
745</colgroup>
746<tbody>
747<tr>
748<td class="parameter_name"><p>profile_tier_level</p></td>
749<td class="parameter_description"><p>Pointer to the profile_tier_level
750for the stream. </p></td>
751<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len]</span></td>
752</tr>
753<tr>
754<td class="parameter_name"><p>len</p></td>
755<td class="parameter_description"><p>Length of the data available in <em class="parameter"><code>profile_tier_level</code></em>
756.</p></td>
757<td class="parameter_annotations"> </td>
758</tr>
759</tbody>
760</table></div>
761</div>
762<div class="refsect3">
763<a name="gst-codec-utils-h265-get-tier.returns"></a><h4>Returns</h4>
764<p> The tier as a const string, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if there is an error.</p>
765</div>
766<p class="since">Since: <a class="link" href="ix11.html#api-index-1.4">1.4</a></p>
767</div>
768<hr>
769<div class="refsect2">
770<a name="gst-codec-utils-h265-get-level"></a><h3>gst_codec_utils_h265_get_level ()</h3>
771<pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
772gst_codec_utils_h265_get_level (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *profile_tier_level</code></em>,
773                                <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);</pre>
774<p>Converts the level indication (general_level_idc) in the stream's
775profile_tier_level structure into a string. The profiel_tier_level is
776expected to have the same format as for <a class="link" href="gst-plugins-base-libs-Codec-utilities.html#gst-codec-utils-h264-get-profile" title="gst_codec_utils_h264_get_profile ()"><code class="function">gst_codec_utils_h264_get_profile()</code></a>.</p>
777<div class="refsect3">
778<a name="gst-codec-utils-h265-get-level.parameters"></a><h4>Parameters</h4>
779<div class="informaltable"><table class="informaltable" width="100%" border="0">
780<colgroup>
781<col width="150px" class="parameters_name">
782<col class="parameters_description">
783<col width="200px" class="parameters_annotations">
784</colgroup>
785<tbody>
786<tr>
787<td class="parameter_name"><p>profile_tier_level</p></td>
788<td class="parameter_description"><p>Pointer to the profile_tier_level
789for the stream. </p></td>
790<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len]</span></td>
791</tr>
792<tr>
793<td class="parameter_name"><p>len</p></td>
794<td class="parameter_description"><p>Length of the data available in <em class="parameter"><code>profile_tier_level</code></em>
795.</p></td>
796<td class="parameter_annotations"> </td>
797</tr>
798</tbody>
799</table></div>
800</div>
801<div class="refsect3">
802<a name="gst-codec-utils-h265-get-level.returns"></a><h4>Returns</h4>
803<p> The level as a const string, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if there is an error.</p>
804</div>
805<p class="since">Since: <a class="link" href="ix11.html#api-index-1.4">1.4</a></p>
806</div>
807<hr>
808<div class="refsect2">
809<a name="gst-codec-utils-h265-get-level-idc"></a><h3>gst_codec_utils_h265_get_level_idc ()</h3>
810<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="returnvalue">guint8</span></a>
811gst_codec_utils_h265_get_level_idc (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *level</code></em>);</pre>
812<p>Transform a level string from the caps into the level_idc</p>
813<div class="refsect3">
814<a name="gst-codec-utils-h265-get-level-idc.parameters"></a><h4>Parameters</h4>
815<div class="informaltable"><table class="informaltable" width="100%" border="0">
816<colgroup>
817<col width="150px" class="parameters_name">
818<col class="parameters_description">
819<col width="200px" class="parameters_annotations">
820</colgroup>
821<tbody><tr>
822<td class="parameter_name"><p>level</p></td>
823<td class="parameter_description"><p>A level string from caps</p></td>
824<td class="parameter_annotations"> </td>
825</tr></tbody>
826</table></div>
827</div>
828<div class="refsect3">
829<a name="gst-codec-utils-h265-get-level-idc.returns"></a><h4>Returns</h4>
830<p> the level_idc or 0 if the level is unknown</p>
831</div>
832<p class="since">Since: <a class="link" href="ix11.html#api-index-1.4">1.4</a></p>
833</div>
834<hr>
835<div class="refsect2">
836<a name="gst-codec-utils-h265-caps-set-level-tier-and-profile"></a><h3>gst_codec_utils_h265_caps_set_level_tier_and_profile ()</h3>
837<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
838gst_codec_utils_h265_caps_set_level_tier_and_profile
839                               (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstCaps.html#GstCaps-struct"><span class="type">GstCaps</span></a> *caps</code></em>,
840                                <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *profile_tier_level</code></em>,
841                                <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);</pre>
842<p>Sets the level, tier and profile in <em class="parameter"><code>caps</code></em>
843 if it can be determined from
844<em class="parameter"><code>profile_tier_level</code></em>
845. See <a class="link" href="gst-plugins-base-libs-Codec-utilities.html#gst-codec-utils-h265-get-level" title="gst_codec_utils_h265_get_level ()"><code class="function">gst_codec_utils_h265_get_level()</code></a>,
846<a class="link" href="gst-plugins-base-libs-Codec-utilities.html#gst-codec-utils-h265-get-tier" title="gst_codec_utils_h265_get_tier ()"><code class="function">gst_codec_utils_h265_get_tier()</code></a> and <a class="link" href="gst-plugins-base-libs-Codec-utilities.html#gst-codec-utils-h265-get-profile" title="gst_codec_utils_h265_get_profile ()"><code class="function">gst_codec_utils_h265_get_profile()</code></a>
847for more details on the parameters.</p>
848<div class="refsect3">
849<a name="gst-codec-utils-h265-caps-set-level-tier-and-profile.parameters"></a><h4>Parameters</h4>
850<div class="informaltable"><table class="informaltable" width="100%" border="0">
851<colgroup>
852<col width="150px" class="parameters_name">
853<col class="parameters_description">
854<col width="200px" class="parameters_annotations">
855</colgroup>
856<tbody>
857<tr>
858<td class="parameter_name"><p>caps</p></td>
859<td class="parameter_description"><p>the <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstCaps.html#GstCaps-struct"><span class="type">GstCaps</span></a> to which the level, tier and profile are to be added</p></td>
860<td class="parameter_annotations"> </td>
861</tr>
862<tr>
863<td class="parameter_name"><p>profile_tier_level</p></td>
864<td class="parameter_description"><p>Pointer to the profile_tier_level
865struct. </p></td>
866<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len]</span></td>
867</tr>
868<tr>
869<td class="parameter_name"><p>len</p></td>
870<td class="parameter_description"><p>Length of the data available in <em class="parameter"><code>profile_tier_level</code></em>
871.</p></td>
872<td class="parameter_annotations"> </td>
873</tr>
874</tbody>
875</table></div>
876</div>
877<div class="refsect3">
878<a name="gst-codec-utils-h265-caps-set-level-tier-and-profile.returns"></a><h4>Returns</h4>
879<p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the level, tier, profile could be set, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
880</div>
881<p class="since">Since: <a class="link" href="ix11.html#api-index-1.4">1.4</a></p>
882</div>
883<hr>
884<div class="refsect2">
885<a name="gst-codec-utils-mpeg4video-get-profile"></a><h3>gst_codec_utils_mpeg4video_get_profile ()</h3>
886<pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
887gst_codec_utils_mpeg4video_get_profile
888                               (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *vis_obj_seq</code></em>,
889                                <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);</pre>
890<p>Converts the profile indication in the stream's visual object sequence into
891a string. <em class="parameter"><code>vis_obj_seq</code></em>
892 is expected to be the data following the visual
893object sequence start code. Only the first byte
894(profile_and_level_indication) is used.</p>
895<div class="refsect3">
896<a name="gst-codec-utils-mpeg4video-get-profile.parameters"></a><h4>Parameters</h4>
897<div class="informaltable"><table class="informaltable" width="100%" border="0">
898<colgroup>
899<col width="150px" class="parameters_name">
900<col class="parameters_description">
901<col width="200px" class="parameters_annotations">
902</colgroup>
903<tbody>
904<tr>
905<td class="parameter_name"><p>vis_obj_seq</p></td>
906<td class="parameter_description"><p>Pointer to the visual object
907sequence for the stream. </p></td>
908<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len]</span></td>
909</tr>
910<tr>
911<td class="parameter_name"><p>len</p></td>
912<td class="parameter_description"><p>Length of the data available in <em class="parameter"><code>sps</code></em>
913.</p></td>
914<td class="parameter_annotations"> </td>
915</tr>
916</tbody>
917</table></div>
918</div>
919<div class="refsect3">
920<a name="gst-codec-utils-mpeg4video-get-profile.returns"></a><h4>Returns</h4>
921<p> The profile as a const string, or NULL if there is an error.</p>
922</div>
923</div>
924<hr>
925<div class="refsect2">
926<a name="gst-codec-utils-mpeg4video-get-level"></a><h3>gst_codec_utils_mpeg4video_get_level ()</h3>
927<pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
928gst_codec_utils_mpeg4video_get_level (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *vis_obj_seq</code></em>,
929                                      <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);</pre>
930<p>Converts the level indication in the stream's visual object sequence into
931a string. <em class="parameter"><code>vis_obj_seq</code></em>
932 is expected to be the data following the visual
933object sequence start code. Only the first byte
934(profile_and_level_indication) is used.</p>
935<div class="refsect3">
936<a name="gst-codec-utils-mpeg4video-get-level.parameters"></a><h4>Parameters</h4>
937<div class="informaltable"><table class="informaltable" width="100%" border="0">
938<colgroup>
939<col width="150px" class="parameters_name">
940<col class="parameters_description">
941<col width="200px" class="parameters_annotations">
942</colgroup>
943<tbody>
944<tr>
945<td class="parameter_name"><p>vis_obj_seq</p></td>
946<td class="parameter_description"><p>Pointer to the visual object
947sequence for the stream. </p></td>
948<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len]</span></td>
949</tr>
950<tr>
951<td class="parameter_name"><p>len</p></td>
952<td class="parameter_description"><p>Length of the data available in <em class="parameter"><code>sps</code></em>
953.</p></td>
954<td class="parameter_annotations"> </td>
955</tr>
956</tbody>
957</table></div>
958</div>
959<div class="refsect3">
960<a name="gst-codec-utils-mpeg4video-get-level.returns"></a><h4>Returns</h4>
961<p> The level as a const string, or NULL if there is an error.</p>
962</div>
963</div>
964<hr>
965<div class="refsect2">
966<a name="gst-codec-utils-mpeg4video-caps-set-level-and-profile"></a><h3>gst_codec_utils_mpeg4video_caps_set_level_and_profile ()</h3>
967<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
968gst_codec_utils_mpeg4video_caps_set_level_and_profile
969                               (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstCaps.html#GstCaps-struct"><span class="type">GstCaps</span></a> *caps</code></em>,
970                                <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *vis_obj_seq</code></em>,
971                                <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);</pre>
972<p>Sets the level and profile in <em class="parameter"><code>caps</code></em>
973 if it can be determined from
974<em class="parameter"><code>vis_obj_seq</code></em>
975. See <a class="link" href="gst-plugins-base-libs-Codec-utilities.html#gst-codec-utils-mpeg4video-get-level" title="gst_codec_utils_mpeg4video_get_level ()"><code class="function">gst_codec_utils_mpeg4video_get_level()</code></a> and
976<a class="link" href="gst-plugins-base-libs-Codec-utilities.html#gst-codec-utils-mpeg4video-get-profile" title="gst_codec_utils_mpeg4video_get_profile ()"><code class="function">gst_codec_utils_mpeg4video_get_profile()</code></a> for more details on the
977parameters.</p>
978<div class="refsect3">
979<a name="gst-codec-utils-mpeg4video-caps-set-level-and-profile.parameters"></a><h4>Parameters</h4>
980<div class="informaltable"><table class="informaltable" width="100%" border="0">
981<colgroup>
982<col width="150px" class="parameters_name">
983<col class="parameters_description">
984<col width="200px" class="parameters_annotations">
985</colgroup>
986<tbody>
987<tr>
988<td class="parameter_name"><p>caps</p></td>
989<td class="parameter_description"><p>the <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstCaps.html#GstCaps-struct"><span class="type">GstCaps</span></a> to which the level and profile are to be added</p></td>
990<td class="parameter_annotations"> </td>
991</tr>
992<tr>
993<td class="parameter_name"><p>vis_obj_seq</p></td>
994<td class="parameter_description"><p>Pointer to the visual object
995sequence for the stream. </p></td>
996<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len]</span></td>
997</tr>
998<tr>
999<td class="parameter_name"><p>len</p></td>
1000<td class="parameter_description"><p>Length of the data available in <em class="parameter"><code>sps</code></em>
1001.</p></td>
1002<td class="parameter_annotations"> </td>
1003</tr>
1004</tbody>
1005</table></div>
1006</div>
1007<div class="refsect3">
1008<a name="gst-codec-utils-mpeg4video-caps-set-level-and-profile.returns"></a><h4>Returns</h4>
1009<p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the level and profile could be set, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
1010</div>
1011</div>
1012<hr>
1013<div class="refsect2">
1014<a name="gst-codec-utils-opus-create-caps"></a><h3>gst_codec_utils_opus_create_caps ()</h3>
1015<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstCaps.html#GstCaps-struct"><span class="returnvalue">GstCaps</span></a> *
1016gst_codec_utils_opus_create_caps (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> rate</code></em>,
1017                                  <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> channels</code></em>,
1018                                  <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> channel_mapping_family</code></em>,
1019                                  <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> stream_count</code></em>,
1020                                  <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> coupled_count</code></em>,
1021                                  <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *channel_mapping</code></em>);</pre>
1022<p>Creates Opus caps from the given parameters.</p>
1023<div class="refsect3">
1024<a name="gst-codec-utils-opus-create-caps.parameters"></a><h4>Parameters</h4>
1025<div class="informaltable"><table class="informaltable" width="100%" border="0">
1026<colgroup>
1027<col width="150px" class="parameters_name">
1028<col class="parameters_description">
1029<col width="200px" class="parameters_annotations">
1030</colgroup>
1031<tbody>
1032<tr>
1033<td class="parameter_name"><p>rate</p></td>
1034<td class="parameter_description"><p>the sample rate</p></td>
1035<td class="parameter_annotations"> </td>
1036</tr>
1037<tr>
1038<td class="parameter_name"><p>channels</p></td>
1039<td class="parameter_description"><p>the number of channels</p></td>
1040<td class="parameter_annotations"> </td>
1041</tr>
1042<tr>
1043<td class="parameter_name"><p>channel_mapping_family</p></td>
1044<td class="parameter_description"><p>the channel mapping family</p></td>
1045<td class="parameter_annotations"> </td>
1046</tr>
1047<tr>
1048<td class="parameter_name"><p>stream_count</p></td>
1049<td class="parameter_description"><p>the number of independent streams</p></td>
1050<td class="parameter_annotations"> </td>
1051</tr>
1052<tr>
1053<td class="parameter_name"><p>coupled_count</p></td>
1054<td class="parameter_description"><p>the number of stereo streams</p></td>
1055<td class="parameter_annotations"> </td>
1056</tr>
1057<tr>
1058<td class="parameter_name"><p>channel_mapping</p></td>
1059<td class="parameter_description"><p>the mapping between the streams. </p></td>
1060<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym>]</span></td>
1061</tr>
1062</tbody>
1063</table></div>
1064</div>
1065<div class="refsect3">
1066<a name="gst-codec-utils-opus-create-caps.returns"></a><h4>Returns</h4>
1067<p> The <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstCaps.html#GstCaps-struct"><span class="type">GstCaps</span></a>, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the parameters would lead to
1068invalid Opus caps.</p>
1069</div>
1070<p class="since">Since: <a class="link" href="ix08.html#api-index-1.8">1.8</a></p>
1071</div>
1072<hr>
1073<div class="refsect2">
1074<a name="gst-codec-utils-opus-create-caps-from-header"></a><h3>gst_codec_utils_opus_create_caps_from_header ()</h3>
1075<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstCaps.html#GstCaps-struct"><span class="returnvalue">GstCaps</span></a> *
1076gst_codec_utils_opus_create_caps_from_header
1077                               (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#GstBuffer-struct"><span class="type">GstBuffer</span></a> *header</code></em>,
1078                                <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#GstBuffer-struct"><span class="type">GstBuffer</span></a> *comments</code></em>);</pre>
1079<p>Creates Opus caps from the given OpusHead <em class="parameter"><code>header</code></em>
1080 and comment header
1081<em class="parameter"><code>comments</code></em>
1082.</p>
1083<div class="refsect3">
1084<a name="gst-codec-utils-opus-create-caps-from-header.parameters"></a><h4>Parameters</h4>
1085<div class="informaltable"><table class="informaltable" width="100%" border="0">
1086<colgroup>
1087<col width="150px" class="parameters_name">
1088<col class="parameters_description">
1089<col width="200px" class="parameters_annotations">
1090</colgroup>
1091<tbody>
1092<tr>
1093<td class="parameter_name"><p>header</p></td>
1094<td class="parameter_description"><p>OpusHead header</p></td>
1095<td class="parameter_annotations"> </td>
1096</tr>
1097<tr>
1098<td class="parameter_name"><p>comments</p></td>
1099<td class="parameter_description"><p>Comment header or NULL. </p></td>
1100<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
1101</tr>
1102</tbody>
1103</table></div>
1104</div>
1105<div class="refsect3">
1106<a name="gst-codec-utils-opus-create-caps-from-header.returns"></a><h4>Returns</h4>
1107<p> The <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstCaps.html#GstCaps-struct"><span class="type">GstCaps</span></a>.</p>
1108</div>
1109<p class="since">Since: <a class="link" href="ix08.html#api-index-1.8">1.8</a></p>
1110</div>
1111<hr>
1112<div class="refsect2">
1113<a name="gst-codec-utils-opus-parse-caps"></a><h3>gst_codec_utils_opus_parse_caps ()</h3>
1114<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
1115gst_codec_utils_opus_parse_caps (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstCaps.html#GstCaps-struct"><span class="type">GstCaps</span></a> *caps</code></em>,
1116                                 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> *rate</code></em>,
1117                                 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *channels</code></em>,
1118                                 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *channel_mapping_family</code></em>,
1119                                 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *stream_count</code></em>,
1120                                 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *coupled_count</code></em>,
1121                                 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> channel_mapping[256]</code></em>);</pre>
1122<p>Parses Opus caps and fills the different fields with defaults if possible.</p>
1123<div class="refsect3">
1124<a name="gst-codec-utils-opus-parse-caps.parameters"></a><h4>Parameters</h4>
1125<div class="informaltable"><table class="informaltable" width="100%" border="0">
1126<colgroup>
1127<col width="150px" class="parameters_name">
1128<col class="parameters_description">
1129<col width="200px" class="parameters_annotations">
1130</colgroup>
1131<tbody>
1132<tr>
1133<td class="parameter_name"><p>caps</p></td>
1134<td class="parameter_description"><p>the <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstCaps.html#GstCaps-struct"><span class="type">GstCaps</span></a> to parse the data from</p></td>
1135<td class="parameter_annotations"> </td>
1136</tr>
1137<tr>
1138<td class="parameter_name"><p>rate</p></td>
1139<td class="parameter_description"><p>the sample rate. </p></td>
1140<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
1141</tr>
1142<tr>
1143<td class="parameter_name"><p>channels</p></td>
1144<td class="parameter_description"><p>the number of channels. </p></td>
1145<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
1146</tr>
1147<tr>
1148<td class="parameter_name"><p>channel_mapping_family</p></td>
1149<td class="parameter_description"><p>the channel mapping family. </p></td>
1150<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
1151</tr>
1152<tr>
1153<td class="parameter_name"><p>stream_count</p></td>
1154<td class="parameter_description"><p>the number of independent streams. </p></td>
1155<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
1156</tr>
1157<tr>
1158<td class="parameter_name"><p>coupled_count</p></td>
1159<td class="parameter_description"><p>the number of stereo streams. </p></td>
1160<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
1161</tr>
1162<tr>
1163<td class="parameter_name"><p>channel_mapping</p></td>
1164<td class="parameter_description"><p>the mapping between the streams. </p></td>
1165<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> fixed-size=256]</span></td>
1166</tr>
1167</tbody>
1168</table></div>
1169</div>
1170<div class="refsect3">
1171<a name="gst-codec-utils-opus-parse-caps.returns"></a><h4>Returns</h4>
1172<p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if parsing was successful, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
1173</div>
1174<p class="since">Since: <a class="link" href="ix08.html#api-index-1.8">1.8</a></p>
1175</div>
1176<hr>
1177<div class="refsect2">
1178<a name="gst-codec-utils-opus-create-header"></a><h3>gst_codec_utils_opus_create_header ()</h3>
1179<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#GstBuffer-struct"><span class="returnvalue">GstBuffer</span></a> *
1180gst_codec_utils_opus_create_header (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> rate</code></em>,
1181                                    <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> channels</code></em>,
1182                                    <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> channel_mapping_family</code></em>,
1183                                    <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> stream_count</code></em>,
1184                                    <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> coupled_count</code></em>,
1185                                    <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *channel_mapping</code></em>,
1186                                    <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint16"><span class="type">guint16</span></a> pre_skip</code></em>,
1187                                    <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint16"><span class="type">gint16</span></a> output_gain</code></em>);</pre>
1188<p>Creates OpusHead header from the given parameters.</p>
1189<div class="refsect3">
1190<a name="gst-codec-utils-opus-create-header.parameters"></a><h4>Parameters</h4>
1191<div class="informaltable"><table class="informaltable" width="100%" border="0">
1192<colgroup>
1193<col width="150px" class="parameters_name">
1194<col class="parameters_description">
1195<col width="200px" class="parameters_annotations">
1196</colgroup>
1197<tbody>
1198<tr>
1199<td class="parameter_name"><p>rate</p></td>
1200<td class="parameter_description"><p>the sample rate</p></td>
1201<td class="parameter_annotations"> </td>
1202</tr>
1203<tr>
1204<td class="parameter_name"><p>channels</p></td>
1205<td class="parameter_description"><p>the number of channels</p></td>
1206<td class="parameter_annotations"> </td>
1207</tr>
1208<tr>
1209<td class="parameter_name"><p>channel_mapping_family</p></td>
1210<td class="parameter_description"><p>the channel mapping family</p></td>
1211<td class="parameter_annotations"> </td>
1212</tr>
1213<tr>
1214<td class="parameter_name"><p>stream_count</p></td>
1215<td class="parameter_description"><p>the number of independent streams</p></td>
1216<td class="parameter_annotations"> </td>
1217</tr>
1218<tr>
1219<td class="parameter_name"><p>coupled_count</p></td>
1220<td class="parameter_description"><p>the number of stereo streams</p></td>
1221<td class="parameter_annotations"> </td>
1222</tr>
1223<tr>
1224<td class="parameter_name"><p>channel_mapping</p></td>
1225<td class="parameter_description"><p>the mapping between the streams. </p></td>
1226<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym>]</span></td>
1227</tr>
1228<tr>
1229<td class="parameter_name"><p>pre_skip</p></td>
1230<td class="parameter_description"><p>Pre-skip in 48kHz samples or 0</p></td>
1231<td class="parameter_annotations"> </td>
1232</tr>
1233<tr>
1234<td class="parameter_name"><p>output_gain</p></td>
1235<td class="parameter_description"><p>Output gain or 0</p></td>
1236<td class="parameter_annotations"> </td>
1237</tr>
1238</tbody>
1239</table></div>
1240</div>
1241<div class="refsect3">
1242<a name="gst-codec-utils-opus-create-header.returns"></a><h4>Returns</h4>
1243<p> The <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#GstBuffer-struct"><span class="type">GstBuffer</span></a> containing the OpusHead.</p>
1244</div>
1245<p class="since">Since: <a class="link" href="ix08.html#api-index-1.8">1.8</a></p>
1246</div>
1247<hr>
1248<div class="refsect2">
1249<a name="gst-codec-utils-opus-parse-header"></a><h3>gst_codec_utils_opus_parse_header ()</h3>
1250<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
1251gst_codec_utils_opus_parse_header (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#GstBuffer-struct"><span class="type">GstBuffer</span></a> *header</code></em>,
1252                                   <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> *rate</code></em>,
1253                                   <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *channels</code></em>,
1254                                   <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *channel_mapping_family</code></em>,
1255                                   <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *stream_count</code></em>,
1256                                   <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *coupled_count</code></em>,
1257                                   <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> channel_mapping[256]</code></em>,
1258                                   <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint16"><span class="type">guint16</span></a> *pre_skip</code></em>,
1259                                   <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint16"><span class="type">gint16</span></a> *output_gain</code></em>);</pre>
1260<p>Parses the OpusHead header.</p>
1261<div class="refsect3">
1262<a name="gst-codec-utils-opus-parse-header.parameters"></a><h4>Parameters</h4>
1263<div class="informaltable"><table class="informaltable" width="100%" border="0">
1264<colgroup>
1265<col width="150px" class="parameters_name">
1266<col class="parameters_description">
1267<col width="200px" class="parameters_annotations">
1268</colgroup>
1269<tbody>
1270<tr>
1271<td class="parameter_name"><p>header</p></td>
1272<td class="parameter_description"><p>the OpusHead <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#GstBuffer-struct"><span class="type">GstBuffer</span></a></p></td>
1273<td class="parameter_annotations"> </td>
1274</tr>
1275<tr>
1276<td class="parameter_name"><p>rate</p></td>
1277<td class="parameter_description"><p>the sample rate. </p></td>
1278<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
1279</tr>
1280<tr>
1281<td class="parameter_name"><p>channels</p></td>
1282<td class="parameter_description"><p>the number of channels. </p></td>
1283<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
1284</tr>
1285<tr>
1286<td class="parameter_name"><p>channel_mapping_family</p></td>
1287<td class="parameter_description"><p>the channel mapping family. </p></td>
1288<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
1289</tr>
1290<tr>
1291<td class="parameter_name"><p>stream_count</p></td>
1292<td class="parameter_description"><p>the number of independent streams. </p></td>
1293<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
1294</tr>
1295<tr>
1296<td class="parameter_name"><p>coupled_count</p></td>
1297<td class="parameter_description"><p>the number of stereo streams. </p></td>
1298<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
1299</tr>
1300<tr>
1301<td class="parameter_name"><p>channel_mapping</p></td>
1302<td class="parameter_description"><p>the mapping between the streams. </p></td>
1303<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> fixed-size=256]</span></td>
1304</tr>
1305<tr>
1306<td class="parameter_name"><p>pre_skip</p></td>
1307<td class="parameter_description"><p>Pre-skip in 48kHz samples or 0. </p></td>
1308<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
1309</tr>
1310<tr>
1311<td class="parameter_name"><p>output_gain</p></td>
1312<td class="parameter_description"><p>Output gain or 0. </p></td>
1313<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
1314</tr>
1315</tbody>
1316</table></div>
1317</div>
1318<div class="refsect3">
1319<a name="gst-codec-utils-opus-parse-header.returns"></a><h4>Returns</h4>
1320<p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if parsing was successful, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
1321</div>
1322<p class="since">Since: <a class="link" href="ix08.html#api-index-1.8">1.8</a></p>
1323</div>
1324</div>
1325<div class="refsect1">
1326<a name="gst-plugins-base-libs-Codec-utilities.other_details"></a><h2>Types and Values</h2>
1327</div>
1328</div>
1329<div class="footer">
1330<hr>Generated by GTK-Doc V1.28</div>
1331</body>
1332</html>