33
30
<h2><span class="refentrytitle"><a name="gst-plugins-base-libs-gstpbutilscodecutils.top_of_page"></a>gstpbutilscodecutils</span></h2>
34
31
<p>gstpbutilscodecutils — Miscellaneous codec-specific utility functions</p>
36
<td valign="top" align="right"></td>
33
<td class="gallery_image" valign="top" align="right"></td>
37
34
</tr></table></div>
38
<div class="refsynopsisdiv">
39
<a name="gst-plugins-base-libs-gstpbutilscodecutils.synopsis"></a><h2>Synopsis</h2>
40
<pre class="synopsis">
41
#include <gst/pbutils/codec-utils.h>
43
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> <a class="link" href="gst-plugins-base-libs-gstpbutilscodecutils.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>
44
(<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> sr_idx</code></em>);
45
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> <a class="link" href="gst-plugins-base-libs-gstpbutilscodecutils.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>
46
(<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> rate</code></em>);
47
const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="gst-plugins-base-libs-gstpbutilscodecutils.html#gst-codec-utils-aac-get-profile" title="gst_codec_utils_aac_get_profile ()">gst_codec_utils_aac_get_profile</a> (<em class="parameter"><code>const <span class="type">guint8</span> *audio_config</code></em>,
48
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);
49
const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="gst-plugins-base-libs-gstpbutilscodecutils.html#gst-codec-utils-aac-get-level" title="gst_codec_utils_aac_get_level ()">gst_codec_utils_aac_get_level</a> (<em class="parameter"><code>const <span class="type">guint8</span> *audio_config</code></em>,
50
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);
51
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="gst-plugins-base-libs-gstpbutilscodecutils.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>
52
(<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstCaps.html#GstCaps"><span class="type">GstCaps</span></a> *caps</code></em>,
53
<em class="parameter"><code>const <span class="type">guint8</span> *audio_config</code></em>,
54
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);
56
const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="gst-plugins-base-libs-gstpbutilscodecutils.html#gst-codec-utils-h264-get-profile" title="gst_codec_utils_h264_get_profile ()">gst_codec_utils_h264_get_profile</a> (<em class="parameter"><code>const <span class="type">guint8</span> *sps</code></em>,
57
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);
58
const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="gst-plugins-base-libs-gstpbutilscodecutils.html#gst-codec-utils-h264-get-level" title="gst_codec_utils_h264_get_level ()">gst_codec_utils_h264_get_level</a> (<em class="parameter"><code>const <span class="type">guint8</span> *sps</code></em>,
59
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);
60
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="gst-plugins-base-libs-gstpbutilscodecutils.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>
61
(<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstCaps.html#GstCaps"><span class="type">GstCaps</span></a> *caps</code></em>,
62
<em class="parameter"><code>const <span class="type">guint8</span> *sps</code></em>,
63
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);
64
<span class="returnvalue">guint8</span> <a class="link" href="gst-plugins-base-libs-gstpbutilscodecutils.html#gst-codec-utils-h264-get-level-idc" title="gst_codec_utils_h264_get_level_idc ()">gst_codec_utils_h264_get_level_idc</a> (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *level</code></em>);
66
const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="gst-plugins-base-libs-gstpbutilscodecutils.html#gst-codec-utils-mpeg4video-get-profile" title="gst_codec_utils_mpeg4video_get_profile ()">gst_codec_utils_mpeg4video_get_profile</a>
67
(<em class="parameter"><code>const <span class="type">guint8</span> *vis_obj_seq</code></em>,
68
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);
69
const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="gst-plugins-base-libs-gstpbutilscodecutils.html#gst-codec-utils-mpeg4video-get-level" title="gst_codec_utils_mpeg4video_get_level ()">gst_codec_utils_mpeg4video_get_level</a>
70
(<em class="parameter"><code>const <span class="type">guint8</span> *vis_obj_seq</code></em>,
71
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);
72
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="gst-plugins-base-libs-gstpbutilscodecutils.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>
73
(<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstCaps.html#GstCaps"><span class="type">GstCaps</span></a> *caps</code></em>,
74
<em class="parameter"><code>const <span class="type">guint8</span> *vis_obj_seq</code></em>,
75
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);
35
<div class="refsect1">
36
<a name="gst-plugins-base-libs-gstpbutilscodecutils.functions"></a><h2>Functions</h2>
37
<div class="informaltable"><table width="100%" border="0">
39
<col width="150px" class="functions_return">
40
<col class="functions_name">
44
<td class="function_type">
45
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
47
<td class="function_name">
48
<a class="link" href="gst-plugins-base-libs-gstpbutilscodecutils.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>
52
<td class="function_type">
53
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
55
<td class="function_name">
56
<a class="link" href="gst-plugins-base-libs-gstpbutilscodecutils.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>
60
<td class="function_type">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
62
<td class="function_name">
63
<a class="link" href="gst-plugins-base-libs-gstpbutilscodecutils.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>
67
<td class="function_type">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
69
<td class="function_name">
70
<a class="link" href="gst-plugins-base-libs-gstpbutilscodecutils.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>
74
<td class="function_type">
75
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
77
<td class="function_name">
78
<a class="link" href="gst-plugins-base-libs-gstpbutilscodecutils.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>
82
<td class="function_type">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
84
<td class="function_name">
85
<a class="link" href="gst-plugins-base-libs-gstpbutilscodecutils.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>
89
<td class="function_type">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
91
<td class="function_name">
92
<a class="link" href="gst-plugins-base-libs-gstpbutilscodecutils.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>
96
<td class="function_type">
97
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
99
<td class="function_name">
100
<a class="link" href="gst-plugins-base-libs-gstpbutilscodecutils.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>
104
<td class="function_type">
105
<span class="returnvalue">guint8</span>
107
<td class="function_name">
108
<a class="link" href="gst-plugins-base-libs-gstpbutilscodecutils.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>
112
<td class="function_type">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
114
<td class="function_name">
115
<a class="link" href="gst-plugins-base-libs-gstpbutilscodecutils.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>
119
<td class="function_type">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
121
<td class="function_name">
122
<a class="link" href="gst-plugins-base-libs-gstpbutilscodecutils.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>
126
<td class="function_type">
127
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
129
<td class="function_name">
130
<a class="link" href="gst-plugins-base-libs-gstpbutilscodecutils.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>
136
<div class="refsect1">
137
<a name="gst-plugins-base-libs-gstpbutilscodecutils.object-hierarchy"></a><h2>Object Hierarchy</h2>
141
<div class="refsect1">
142
<a name="gst-plugins-base-libs-gstpbutilscodecutils.includes"></a><h2>Includes</h2>
143
<pre class="synopsis">#include <gst/pbutils/codec-utils.h>
78
146
<div class="refsect1">
79
147
<a name="gst-plugins-base-libs-gstpbutilscodecutils.description"></a><h2>Description</h2>
82
148
<div class="refsect2">
83
<a name="id-1.2.13.5.4.2.1"></a><p>
149
<a name="id-1.2.13.5.6.2"></a><p>
84
150
Provides codec-specific ulility functions such as functions to provide the
85
151
codec profile and level in human-readable string form from header data.
91
155
<div class="refsect1">
92
<a name="gst-plugins-base-libs-gstpbutilscodecutils.details"></a><h2>Details</h2>
93
<div class="refsect2">
94
<a name="gst-codec-utils-aac-get-sample-rate-from-index"></a><h3>gst_codec_utils_aac_get_sample_rate_from_index ()</h3>
95
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> gst_codec_utils_aac_get_sample_rate_from_index
96
(<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> sr_idx</code></em>);</pre>
98
Translates the sample rate index found in AAC headers to the actual sample
101
<div class="variablelist"><table border="0" class="variablelist">
103
<col align="left" valign="top">
108
<td><p><span class="term"><em class="parameter"><code>sr_idx</code></em> :</span></p></td>
109
<td>Sample rate index as from the AudioSpecificConfig (MPEG-4
110
container) or ADTS frame header</td>
113
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
114
<td>The sample rate if <em class="parameter"><code>sr_idx</code></em> is valid, 0 otherwise.</td>
120
<div class="refsect2">
121
<a name="gst-codec-utils-aac-get-index-from-sample-rate"></a><h3>gst_codec_utils_aac_get_index_from_sample_rate ()</h3>
122
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> gst_codec_utils_aac_get_index_from_sample_rate
123
(<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> rate</code></em>);</pre>
125
Translates the sample rate to the index corresponding to it in AAC spec.
127
<div class="variablelist"><table border="0" class="variablelist">
129
<col align="left" valign="top">
134
<td><p><span class="term"><em class="parameter"><code>rate</code></em> :</span></p></td>
138
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
139
<td>The AAC index for this sample rate, -1 if the rate is not a
140
valid AAC sample rate.</td>
146
<div class="refsect2">
147
<a name="gst-codec-utils-aac-get-profile"></a><h3>gst_codec_utils_aac_get_profile ()</h3>
148
<pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * gst_codec_utils_aac_get_profile (<em class="parameter"><code>const <span class="type">guint8</span> *audio_config</code></em>,
149
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);</pre>
151
Returns the profile of the given AAC stream as a string. The profile is
156
<a name="gst-plugins-base-libs-gstpbutilscodecutils.functions_details"></a><h2>Functions</h2>
157
<div class="refsect2">
158
<a name="gst-codec-utils-aac-get-sample-rate-from-index"></a><h3>gst_codec_utils_aac_get_sample_rate_from_index ()</h3>
159
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
160
gst_codec_utils_aac_get_sample_rate_from_index
161
(<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> sr_idx</code></em>);</pre>
162
<p>Translates the sample rate index found in AAC headers to the actual sample
164
<div class="refsect3">
165
<a name="id-1.2.13.5.7.2.5"></a><h4>Parameters</h4>
166
<div class="informaltable"><table width="100%" border="0">
168
<col width="150px" class="parameters_name">
169
<col class="parameters_description">
170
<col width="200px" class="parameters_annotations">
173
<td class="parameter_name"><p>sr_idx</p></td>
174
<td class="parameter_description"><p>Sample rate index as from the AudioSpecificConfig (MPEG-4
175
container) or ADTS frame header</p></td>
176
<td class="parameter_annotations"> </td>
180
<div class="refsect3">
181
<a name="id-1.2.13.5.7.2.6"></a><h4>Returns</h4>
182
<p> The sample rate if <em class="parameter"><code>sr_idx</code></em>
183
is valid, 0 otherwise.</p>
188
<div class="refsect2">
189
<a name="gst-codec-utils-aac-get-index-from-sample-rate"></a><h3>gst_codec_utils_aac_get_index_from_sample_rate ()</h3>
190
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
191
gst_codec_utils_aac_get_index_from_sample_rate
192
(<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> rate</code></em>);</pre>
193
<p>Translates the sample rate to the index corresponding to it in AAC spec.</p>
194
<div class="refsect3">
195
<a name="id-1.2.13.5.7.3.5"></a><h4>Parameters</h4>
196
<div class="informaltable"><table width="100%" border="0">
198
<col width="150px" class="parameters_name">
199
<col class="parameters_description">
200
<col width="200px" class="parameters_annotations">
203
<td class="parameter_name"><p>rate</p></td>
204
<td class="parameter_description"><p>Sample rate</p></td>
205
<td class="parameter_annotations"> </td>
209
<div class="refsect3">
210
<a name="id-1.2.13.5.7.3.6"></a><h4>Returns</h4>
211
<p> The AAC index for this sample rate, -1 if the rate is not a
212
valid AAC sample rate.</p>
217
<div class="refsect2">
218
<a name="gst-codec-utils-aac-get-profile"></a><h3>gst_codec_utils_aac_get_profile ()</h3>
219
<pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
220
gst_codec_utils_aac_get_profile (<em class="parameter"><code>const <span class="type">guint8</span> *audio_config</code></em>,
221
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);</pre>
222
<p>Returns the profile of the given AAC stream as a string. The profile is
152
223
determined using the AudioObjectType field which is in the first 5 bits of
153
<em class="parameter"><code>audio_config</code></em>.
157
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
158
<h3 class="title">Note</h3>
224
<em class="parameter"><code>audio_config</code></em>
159
227
HE-AAC support has not yet been implemented.
163
<div class="variablelist"><table border="0" class="variablelist">
229
<div class="refsect3">
230
<a name="id-1.2.13.5.7.4.6"></a><h4>Parameters</h4>
231
<div class="informaltable"><table width="100%" border="0">
165
<col align="left" valign="top">
233
<col width="150px" class="parameters_name">
234
<col class="parameters_description">
235
<col width="200px" class="parameters_annotations">
170
<td><p><span class="term"><em class="parameter"><code>audio_config</code></em> :</span></p></td>
171
<td>a pointer to the AudioSpecificConfig as specified in the
239
<td class="parameter_name"><p>audio_config</p></td>
240
<td class="parameter_description"><p>a pointer to the AudioSpecificConfig as specified in the
172
241
Elementary Stream Descriptor (esds) in ISO/IEC 14496-1 (see
173
<a class="link" href="gst-plugins-base-libs-gstpbutilscodecutils.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> for a more details).</td>
176
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
177
<td>Length of <em class="parameter"><code>audio_config</code></em> in bytes</td>
180
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
181
<td>The profile as a const string and <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the profile could not be
242
<a class="link" href="gst-plugins-base-libs-gstpbutilscodecutils.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> for a more details).</p></td>
243
<td class="parameter_annotations"> </td>
246
<td class="parameter_name"><p>len</p></td>
247
<td class="parameter_description"><p>Length of <em class="parameter"><code>audio_config</code></em>
249
<td class="parameter_annotations"> </td>
254
<div class="refsect3">
255
<a name="id-1.2.13.5.7.4.7"></a><h4>Returns</h4>
256
<p> The profile as a const string and <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the profile could not be
188
262
<div class="refsect2">
189
<a name="gst-codec-utils-aac-get-level"></a><h3>gst_codec_utils_aac_get_level ()</h3>
190
<pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * gst_codec_utils_aac_get_level (<em class="parameter"><code>const <span class="type">guint8</span> *audio_config</code></em>,
191
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);</pre>
193
Determines the level of a stream as defined in ISO/IEC 14496-3. For AAC LC
263
<a name="gst-codec-utils-aac-get-level"></a><h3>gst_codec_utils_aac_get_level ()</h3>
264
<pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
265
gst_codec_utils_aac_get_level (<em class="parameter"><code>const <span class="type">guint8</span> *audio_config</code></em>,
266
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);</pre>
267
<p>Determines the level of a stream as defined in ISO/IEC 14496-3. For AAC LC
194
268
streams, the constraints from the AAC audio profile are applied. For AAC
195
Main, LTP, SSR and others, the Main profile is used.
198
The <em class="parameter"><code>audio_config</code></em> parameter follows the following format, starting from the
199
most significant bit of the first byte:
269
Main, LTP, SSR and others, the Main profile is used.</p>
270
<p>The <em class="parameter"><code>audio_config</code></em>
271
parameter follows the following format, starting from the
272
most significant bit of the first byte:</p>
203
273
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
204
274
<li class="listitem"><p>
205
275
Bit 0:4 contains the AudioObjectType
213
283
Bit 9:12 contains the channel configuration
220
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
221
<h3 class="title">Note</h3>
222
287
HE-AAC support has not yet been implemented.
226
<div class="variablelist"><table border="0" class="variablelist">
289
<div class="refsect3">
290
<a name="id-1.2.13.5.7.5.8"></a><h4>Parameters</h4>
291
<div class="informaltable"><table width="100%" border="0">
228
<col align="left" valign="top">
293
<col width="150px" class="parameters_name">
294
<col class="parameters_description">
295
<col width="200px" class="parameters_annotations">
233
<td><p><span class="term"><em class="parameter"><code>audio_config</code></em> :</span></p></td>
234
<td>a pointer to the AudioSpecificConfig as specified in the
235
Elementary Stream Descriptor (esds) in ISO/IEC 14496-1.</td>
238
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
239
<td>Length of <em class="parameter"><code>audio_config</code></em> in bytes</td>
242
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
243
<td>The level as a const string and <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the level could not be
299
<td class="parameter_name"><p>audio_config</p></td>
300
<td class="parameter_description"><p>a pointer to the AudioSpecificConfig as specified in the
301
Elementary Stream Descriptor (esds) in ISO/IEC 14496-1.</p></td>
302
<td class="parameter_annotations"> </td>
305
<td class="parameter_name"><p>len</p></td>
306
<td class="parameter_description"><p>Length of <em class="parameter"><code>audio_config</code></em>
308
<td class="parameter_annotations"> </td>
313
<div class="refsect3">
314
<a name="id-1.2.13.5.7.5.9"></a><h4>Returns</h4>
315
<p> The level as a const string and <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the level could not be
250
321
<div class="refsect2">
251
<a name="gst-codec-utils-aac-caps-set-level-and-profile"></a><h3>gst_codec_utils_aac_caps_set_level_and_profile ()</h3>
252
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gst_codec_utils_aac_caps_set_level_and_profile
253
(<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstCaps.html#GstCaps"><span class="type">GstCaps</span></a> *caps</code></em>,
254
<em class="parameter"><code>const <span class="type">guint8</span> *audio_config</code></em>,
255
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);</pre>
257
Sets the level and profile on <em class="parameter"><code>caps</code></em> if it can be determined from
258
<em class="parameter"><code>audio_config</code></em>. See <a class="link" href="gst-plugins-base-libs-gstpbutilscodecutils.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
259
<a class="link" href="gst-plugins-base-libs-gstpbutilscodecutils.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.
260
<em class="parameter"><code>caps</code></em> must be audio/mpeg caps with an "mpegversion" field of either 2 or 4.
261
If mpegversion is 4, the "base-profile" field is also set in <em class="parameter"><code>caps</code></em>.
263
<div class="variablelist"><table border="0" class="variablelist">
322
<a name="gst-codec-utils-aac-caps-set-level-and-profile"></a><h3>gst_codec_utils_aac_caps_set_level_and_profile ()</h3>
323
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
324
gst_codec_utils_aac_caps_set_level_and_profile
325
(<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstCaps.html#GstCaps"><span class="type">GstCaps</span></a> *caps</code></em>,
326
<em class="parameter"><code>const <span class="type">guint8</span> *audio_config</code></em>,
327
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);</pre>
328
<p>Sets the level and profile on <em class="parameter"><code>caps</code></em>
329
if it can be determined from
330
<em class="parameter"><code>audio_config</code></em>
331
. See <a class="link" href="gst-plugins-base-libs-gstpbutilscodecutils.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
332
<a class="link" href="gst-plugins-base-libs-gstpbutilscodecutils.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.
333
<em class="parameter"><code>caps</code></em>
334
must be audio/mpeg caps with an "mpegversion" field of either 2 or 4.
335
If mpegversion is 4, the "base-profile" field is also set in <em class="parameter"><code>caps</code></em>
337
<div class="refsect3">
338
<a name="id-1.2.13.5.7.6.5"></a><h4>Parameters</h4>
339
<div class="informaltable"><table width="100%" border="0">
265
<col align="left" valign="top">
341
<col width="150px" class="parameters_name">
342
<col class="parameters_description">
343
<col width="200px" class="parameters_annotations">
270
<td><p><span class="term"><em class="parameter"><code>caps</code></em> :</span></p></td>
271
<td>the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstCaps.html#GstCaps"><span class="type">GstCaps</span></a> to which level and profile fields are to be added</td>
347
<td class="parameter_name"><p>caps</p></td>
348
<td class="parameter_description"><p>the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstCaps.html#GstCaps"><span class="type">GstCaps</span></a> to which level and profile fields are to be added</p></td>
349
<td class="parameter_annotations"> </td>
274
<td><p><span class="term"><em class="parameter"><code>audio_config</code></em> :</span></p></td>
275
<td>a pointer to the AudioSpecificConfig as specified in the
352
<td class="parameter_name"><p>audio_config</p></td>
353
<td class="parameter_description"><p>a pointer to the AudioSpecificConfig as specified in the
276
354
Elementary Stream Descriptor (esds) in ISO/IEC 14496-1 (see
277
below for a more details).</td>
280
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
281
<td>Length of <em class="parameter"><code>audio_config</code></em> in bytes</td>
284
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
286
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the level and profile could be set, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</td>
355
below for a more details).</p></td>
356
<td class="parameter_annotations"> </td>
359
<td class="parameter_name"><p>len</p></td>
360
<td class="parameter_description"><p>Length of <em class="parameter"><code>audio_config</code></em>
362
<td class="parameter_annotations"> </td>
367
<div class="refsect3">
368
<a name="id-1.2.13.5.7.6.6"></a><h4>Returns</h4>
369
<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the level and profile could be set, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
292
374
<div class="refsect2">
293
<a name="gst-codec-utils-h264-get-profile"></a><h3>gst_codec_utils_h264_get_profile ()</h3>
294
<pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * gst_codec_utils_h264_get_profile (<em class="parameter"><code>const <span class="type">guint8</span> *sps</code></em>,
295
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);</pre>
297
Converts the profile indication (profile_idc) in the stream's
375
<a name="gst-codec-utils-h264-get-profile"></a><h3>gst_codec_utils_h264_get_profile ()</h3>
376
<pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
377
gst_codec_utils_h264_get_profile (<em class="parameter"><code>const <span class="type">guint8</span> *sps</code></em>,
378
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);</pre>
379
<p>Converts the profile indication (profile_idc) in the stream's
298
380
sequence parameter set into a string. The SPS is expected to have the
299
381
following format, as defined in the H.264 specification. The SPS is viewed
300
382
as a bitstream here, with bit 0 being the most significant bit of the first
305
384
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
306
385
<li class="listitem"><p>Bit 0:7 - Profile indication</p></li>
307
386
<li class="listitem"><p>Bit 8 - constraint_set0_flag</p></li>
312
391
<li class="listitem"><p>Bit 13:15 - Reserved</p></li>
313
392
<li class="listitem"><p>Bit 16:24 - Level indication</p></li>
317
<div class="variablelist"><table border="0" class="variablelist">
394
<div class="refsect3">
395
<a name="id-1.2.13.5.7.7.6"></a><h4>Parameters</h4>
396
<div class="informaltable"><table width="100%" border="0">
319
<col align="left" valign="top">
398
<col width="150px" class="parameters_name">
399
<col class="parameters_description">
400
<col width="200px" class="parameters_annotations">
324
<td><p><span class="term"><em class="parameter"><code>sps</code></em> :</span></p></td>
325
<td>Pointer to the sequence parameter set for the stream.</td>
328
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
329
<td>Length of the data available in <em class="parameter"><code>sps</code></em>.</td>
332
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
333
<td>The profile as a const string, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if there is an error.</td>
404
<td class="parameter_name"><p>sps</p></td>
405
<td class="parameter_description"><p>Pointer to the sequence parameter set for the stream.</p></td>
406
<td class="parameter_annotations"> </td>
409
<td class="parameter_name"><p>len</p></td>
410
<td class="parameter_description"><p>Length of the data available in <em class="parameter"><code>sps</code></em>
412
<td class="parameter_annotations"> </td>
417
<div class="refsect3">
418
<a name="id-1.2.13.5.7.7.7"></a><h4>Returns</h4>
419
<p> The profile as a const string, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if there is an error.</p>
339
424
<div class="refsect2">
340
<a name="gst-codec-utils-h264-get-level"></a><h3>gst_codec_utils_h264_get_level ()</h3>
341
<pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * gst_codec_utils_h264_get_level (<em class="parameter"><code>const <span class="type">guint8</span> *sps</code></em>,
342
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);</pre>
344
Converts the level indication (level_idc) in the stream's
425
<a name="gst-codec-utils-h264-get-level"></a><h3>gst_codec_utils_h264_get_level ()</h3>
426
<pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
427
gst_codec_utils_h264_get_level (<em class="parameter"><code>const <span class="type">guint8</span> *sps</code></em>,
428
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);</pre>
429
<p>Converts the level indication (level_idc) in the stream's
345
430
sequence parameter set into a string. The SPS is expected to have the
346
same format as for <a class="link" href="gst-plugins-base-libs-gstpbutilscodecutils.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>.
348
<div class="variablelist"><table border="0" class="variablelist">
350
<col align="left" valign="top">
355
<td><p><span class="term"><em class="parameter"><code>sps</code></em> :</span></p></td>
356
<td>Pointer to the sequence parameter set for the stream.</td>
359
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
360
<td>Length of the data available in <em class="parameter"><code>sps</code></em>.</td>
363
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
364
<td>The level as a const string, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if there is an error.</td>
370
<div class="refsect2">
371
<a name="gst-codec-utils-h264-caps-set-level-and-profile"></a><h3>gst_codec_utils_h264_caps_set_level_and_profile ()</h3>
372
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gst_codec_utils_h264_caps_set_level_and_profile
373
(<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstCaps.html#GstCaps"><span class="type">GstCaps</span></a> *caps</code></em>,
374
<em class="parameter"><code>const <span class="type">guint8</span> *sps</code></em>,
375
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);</pre>
377
Sets the level and profile in <em class="parameter"><code>caps</code></em> if it can be determined from <em class="parameter"><code>sps</code></em>. See
378
<a class="link" href="gst-plugins-base-libs-gstpbutilscodecutils.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-gstpbutilscodecutils.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>
379
for more details on the parameters.
381
<div class="variablelist"><table border="0" class="variablelist">
383
<col align="left" valign="top">
388
<td><p><span class="term"><em class="parameter"><code>caps</code></em> :</span></p></td>
389
<td>the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstCaps.html#GstCaps"><span class="type">GstCaps</span></a> to which the level and profile are to be added</td>
392
<td><p><span class="term"><em class="parameter"><code>sps</code></em> :</span></p></td>
393
<td>Pointer to the sequence parameter set for the stream.</td>
396
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
397
<td>Length of the data available in <em class="parameter"><code>sps</code></em>.</td>
400
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
402
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the level and profile could be set, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</td>
408
<div class="refsect2">
409
<a name="gst-codec-utils-h264-get-level-idc"></a><h3>gst_codec_utils_h264_get_level_idc ()</h3>
410
<pre class="programlisting"><span class="returnvalue">guint8</span> gst_codec_utils_h264_get_level_idc (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *level</code></em>);</pre>
412
Transform a level string from the caps into the level_idc
414
<div class="variablelist"><table border="0" class="variablelist">
416
<col align="left" valign="top">
421
<td><p><span class="term"><em class="parameter"><code>level</code></em> :</span></p></td>
422
<td>A level string from caps</td>
425
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
426
<td>the level_idc or 0 if the level is unknown</td>
432
<div class="refsect2">
433
<a name="gst-codec-utils-mpeg4video-get-profile"></a><h3>gst_codec_utils_mpeg4video_get_profile ()</h3>
434
<pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * gst_codec_utils_mpeg4video_get_profile
435
(<em class="parameter"><code>const <span class="type">guint8</span> *vis_obj_seq</code></em>,
436
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);</pre>
438
Converts the profile indication in the stream's visual object sequence into
439
a string. <em class="parameter"><code>vis_obj_seq</code></em> is expected to be the data following the visual
440
object sequence start code. Only the first byte
441
(profile_and_level_indication) is used.
443
<div class="variablelist"><table border="0" class="variablelist">
445
<col align="left" valign="top">
450
<td><p><span class="term"><em class="parameter"><code>vis_obj_seq</code></em> :</span></p></td>
451
<td>Pointer to the visual object sequence for the stream.</td>
454
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
455
<td>Length of the data available in <em class="parameter"><code>sps</code></em>.</td>
458
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
459
<td>The profile as a const string, or NULL if there is an error.</td>
465
<div class="refsect2">
466
<a name="gst-codec-utils-mpeg4video-get-level"></a><h3>gst_codec_utils_mpeg4video_get_level ()</h3>
467
<pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * gst_codec_utils_mpeg4video_get_level
468
(<em class="parameter"><code>const <span class="type">guint8</span> *vis_obj_seq</code></em>,
469
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);</pre>
471
Converts the level indication in the stream's visual object sequence into
472
a string. <em class="parameter"><code>vis_obj_seq</code></em> is expected to be the data following the visual
473
object sequence start code. Only the first byte
474
(profile_and_level_indication) is used.
476
<div class="variablelist"><table border="0" class="variablelist">
478
<col align="left" valign="top">
483
<td><p><span class="term"><em class="parameter"><code>vis_obj_seq</code></em> :</span></p></td>
484
<td>Pointer to the visual object sequence for the stream.</td>
487
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
488
<td>Length of the data available in <em class="parameter"><code>sps</code></em>.</td>
491
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
492
<td>The level as a const string, or NULL if there is an error.</td>
498
<div class="refsect2">
499
<a name="gst-codec-utils-mpeg4video-caps-set-level-and-profile"></a><h3>gst_codec_utils_mpeg4video_caps_set_level_and_profile ()</h3>
500
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gst_codec_utils_mpeg4video_caps_set_level_and_profile
501
(<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstCaps.html#GstCaps"><span class="type">GstCaps</span></a> *caps</code></em>,
502
<em class="parameter"><code>const <span class="type">guint8</span> *vis_obj_seq</code></em>,
503
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);</pre>
505
Sets the level and profile in <em class="parameter"><code>caps</code></em> if it can be determined from
506
<em class="parameter"><code>vis_obj_seq</code></em>. See <a class="link" href="gst-plugins-base-libs-gstpbutilscodecutils.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
507
<a class="link" href="gst-plugins-base-libs-gstpbutilscodecutils.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
510
<div class="variablelist"><table border="0" class="variablelist">
512
<col align="left" valign="top">
517
<td><p><span class="term"><em class="parameter"><code>caps</code></em> :</span></p></td>
518
<td>the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstCaps.html#GstCaps"><span class="type">GstCaps</span></a> to which the level and profile are to be added</td>
521
<td><p><span class="term"><em class="parameter"><code>vis_obj_seq</code></em> :</span></p></td>
522
<td>Pointer to the visual object sequence for the stream.</td>
525
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
526
<td>Length of the data available in <em class="parameter"><code>sps</code></em>.</td>
529
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
531
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the level and profile could be set, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</td>
431
same format as for <a class="link" href="gst-plugins-base-libs-gstpbutilscodecutils.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>
432
<div class="refsect3">
433
<a name="id-1.2.13.5.7.8.5"></a><h4>Parameters</h4>
434
<div class="informaltable"><table width="100%" border="0">
436
<col width="150px" class="parameters_name">
437
<col class="parameters_description">
438
<col width="200px" class="parameters_annotations">
442
<td class="parameter_name"><p>sps</p></td>
443
<td class="parameter_description"><p>Pointer to the sequence parameter set for the stream.</p></td>
444
<td class="parameter_annotations"> </td>
447
<td class="parameter_name"><p>len</p></td>
448
<td class="parameter_description"><p>Length of the data available in <em class="parameter"><code>sps</code></em>
450
<td class="parameter_annotations"> </td>
455
<div class="refsect3">
456
<a name="id-1.2.13.5.7.8.6"></a><h4>Returns</h4>
457
<p> The level as a const string, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if there is an error.</p>
462
<div class="refsect2">
463
<a name="gst-codec-utils-h264-caps-set-level-and-profile"></a><h3>gst_codec_utils_h264_caps_set_level_and_profile ()</h3>
464
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
465
gst_codec_utils_h264_caps_set_level_and_profile
466
(<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstCaps.html#GstCaps"><span class="type">GstCaps</span></a> *caps</code></em>,
467
<em class="parameter"><code>const <span class="type">guint8</span> *sps</code></em>,
468
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);</pre>
469
<p>Sets the level and profile in <em class="parameter"><code>caps</code></em>
470
if it can be determined from <em class="parameter"><code>sps</code></em>
472
<a class="link" href="gst-plugins-base-libs-gstpbutilscodecutils.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-gstpbutilscodecutils.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>
473
for more details on the parameters.</p>
474
<div class="refsect3">
475
<a name="id-1.2.13.5.7.9.5"></a><h4>Parameters</h4>
476
<div class="informaltable"><table width="100%" border="0">
478
<col width="150px" class="parameters_name">
479
<col class="parameters_description">
480
<col width="200px" class="parameters_annotations">
484
<td class="parameter_name"><p>caps</p></td>
485
<td class="parameter_description"><p>the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstCaps.html#GstCaps"><span class="type">GstCaps</span></a> to which the level and profile are to be added</p></td>
486
<td class="parameter_annotations"> </td>
489
<td class="parameter_name"><p>sps</p></td>
490
<td class="parameter_description"><p>Pointer to the sequence parameter set for the stream.</p></td>
491
<td class="parameter_annotations"> </td>
494
<td class="parameter_name"><p>len</p></td>
495
<td class="parameter_description"><p>Length of the data available in <em class="parameter"><code>sps</code></em>
497
<td class="parameter_annotations"> </td>
502
<div class="refsect3">
503
<a name="id-1.2.13.5.7.9.6"></a><h4>Returns</h4>
504
<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the level and profile could be set, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
509
<div class="refsect2">
510
<a name="gst-codec-utils-h264-get-level-idc"></a><h3>gst_codec_utils_h264_get_level_idc ()</h3>
511
<pre class="programlisting"><span class="returnvalue">guint8</span>
512
gst_codec_utils_h264_get_level_idc (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *level</code></em>);</pre>
513
<p>Transform a level string from the caps into the level_idc</p>
514
<div class="refsect3">
515
<a name="id-1.2.13.5.7.10.5"></a><h4>Parameters</h4>
516
<div class="informaltable"><table width="100%" border="0">
518
<col width="150px" class="parameters_name">
519
<col class="parameters_description">
520
<col width="200px" class="parameters_annotations">
523
<td class="parameter_name"><p>level</p></td>
524
<td class="parameter_description"><p>A level string from caps</p></td>
525
<td class="parameter_annotations"> </td>
529
<div class="refsect3">
530
<a name="id-1.2.13.5.7.10.6"></a><h4>Returns</h4>
531
<p> the level_idc or 0 if the level is unknown</p>
536
<div class="refsect2">
537
<a name="gst-codec-utils-mpeg4video-get-profile"></a><h3>gst_codec_utils_mpeg4video_get_profile ()</h3>
538
<pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
539
gst_codec_utils_mpeg4video_get_profile
540
(<em class="parameter"><code>const <span class="type">guint8</span> *vis_obj_seq</code></em>,
541
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);</pre>
542
<p>Converts the profile indication in the stream's visual object sequence into
543
a string. <em class="parameter"><code>vis_obj_seq</code></em>
544
is expected to be the data following the visual
545
object sequence start code. Only the first byte
546
(profile_and_level_indication) is used.</p>
547
<div class="refsect3">
548
<a name="id-1.2.13.5.7.11.5"></a><h4>Parameters</h4>
549
<div class="informaltable"><table width="100%" border="0">
551
<col width="150px" class="parameters_name">
552
<col class="parameters_description">
553
<col width="200px" class="parameters_annotations">
557
<td class="parameter_name"><p>vis_obj_seq</p></td>
558
<td class="parameter_description"><p>Pointer to the visual object sequence for the stream.</p></td>
559
<td class="parameter_annotations"> </td>
562
<td class="parameter_name"><p>len</p></td>
563
<td class="parameter_description"><p>Length of the data available in <em class="parameter"><code>sps</code></em>
565
<td class="parameter_annotations"> </td>
570
<div class="refsect3">
571
<a name="id-1.2.13.5.7.11.6"></a><h4>Returns</h4>
572
<p> The profile as a const string, or NULL if there is an error.</p>
577
<div class="refsect2">
578
<a name="gst-codec-utils-mpeg4video-get-level"></a><h3>gst_codec_utils_mpeg4video_get_level ()</h3>
579
<pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
580
gst_codec_utils_mpeg4video_get_level (<em class="parameter"><code>const <span class="type">guint8</span> *vis_obj_seq</code></em>,
581
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);</pre>
582
<p>Converts the level indication in the stream's visual object sequence into
583
a string. <em class="parameter"><code>vis_obj_seq</code></em>
584
is expected to be the data following the visual
585
object sequence start code. Only the first byte
586
(profile_and_level_indication) is used.</p>
587
<div class="refsect3">
588
<a name="id-1.2.13.5.7.12.5"></a><h4>Parameters</h4>
589
<div class="informaltable"><table width="100%" border="0">
591
<col width="150px" class="parameters_name">
592
<col class="parameters_description">
593
<col width="200px" class="parameters_annotations">
597
<td class="parameter_name"><p>vis_obj_seq</p></td>
598
<td class="parameter_description"><p>Pointer to the visual object sequence for the stream.</p></td>
599
<td class="parameter_annotations"> </td>
602
<td class="parameter_name"><p>len</p></td>
603
<td class="parameter_description"><p>Length of the data available in <em class="parameter"><code>sps</code></em>
605
<td class="parameter_annotations"> </td>
610
<div class="refsect3">
611
<a name="id-1.2.13.5.7.12.6"></a><h4>Returns</h4>
612
<p> The level as a const string, or NULL if there is an error.</p>
617
<div class="refsect2">
618
<a name="gst-codec-utils-mpeg4video-caps-set-level-and-profile"></a><h3>gst_codec_utils_mpeg4video_caps_set_level_and_profile ()</h3>
619
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
620
gst_codec_utils_mpeg4video_caps_set_level_and_profile
621
(<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstCaps.html#GstCaps"><span class="type">GstCaps</span></a> *caps</code></em>,
622
<em class="parameter"><code>const <span class="type">guint8</span> *vis_obj_seq</code></em>,
623
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);</pre>
624
<p>Sets the level and profile in <em class="parameter"><code>caps</code></em>
625
if it can be determined from
626
<em class="parameter"><code>vis_obj_seq</code></em>
627
. See <a class="link" href="gst-plugins-base-libs-gstpbutilscodecutils.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
628
<a class="link" href="gst-plugins-base-libs-gstpbutilscodecutils.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
630
<div class="refsect3">
631
<a name="id-1.2.13.5.7.13.5"></a><h4>Parameters</h4>
632
<div class="informaltable"><table width="100%" border="0">
634
<col width="150px" class="parameters_name">
635
<col class="parameters_description">
636
<col width="200px" class="parameters_annotations">
640
<td class="parameter_name"><p>caps</p></td>
641
<td class="parameter_description"><p>the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstCaps.html#GstCaps"><span class="type">GstCaps</span></a> to which the level and profile are to be added</p></td>
642
<td class="parameter_annotations"> </td>
645
<td class="parameter_name"><p>vis_obj_seq</p></td>
646
<td class="parameter_description"><p>Pointer to the visual object sequence for the stream.</p></td>
647
<td class="parameter_annotations"> </td>
650
<td class="parameter_name"><p>len</p></td>
651
<td class="parameter_description"><p>Length of the data available in <em class="parameter"><code>sps</code></em>
653
<td class="parameter_annotations"> </td>
658
<div class="refsect3">
659
<a name="id-1.2.13.5.7.13.6"></a><h4>Returns</h4>
660
<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the level and profile could be set, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
665
<div class="refsect1">
666
<a name="gst-plugins-base-libs-gstpbutilscodecutils.other_details"></a><h2>Types and Values</h2>
538
669
<div class="footer">
540
Generated by GTK-Doc V1.19</div>
671
Generated by GTK-Doc V1.20</div>
b'\\ No newline at end of file'