Initialize Tizen 2.3
[framework/multimedia/gst-plugins-base0.10.git] / mobile / docs / libs / html / gst-plugins-base-libs-gstpbutilscodecutils.html
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>gstpbutilscodecutils</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="index.html" title="GStreamer Base Plugins 0.10 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-gstpluginsbaseversion.html" title="gstpluginsbaseversion">
10 <link rel="next" href="gst-plugins-base-libs-gstpbutilsdescriptions.html" title="gstpbutilsdescriptions">
11 <meta name="generator" content="GTK-Doc V1.18 (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="2">
16 <tr valign="middle">
17 <td><a accesskey="p" href="gst-plugins-base-libs-gstpluginsbaseversion.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="gstreamer-base-utils.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20 <th width="100%" align="center">GStreamer Base Plugins 0.10 Library Reference Manual</th>
21 <td><a accesskey="n" href="gst-plugins-base-libs-gstpbutilsdescriptions.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
22 </tr>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#gst-plugins-base-libs-gstpbutilscodecutils.synopsis" class="shortcut">Top</a>
25                    | 
26                   <a href="#gst-plugins-base-libs-gstpbutilscodecutils.description" class="shortcut">Description</a>
27 </td></tr>
28 </table>
29 <div class="refentry">
30 <a name="gst-plugins-base-libs-gstpbutilscodecutils"></a><div class="titlepage"></div>
31 <div class="refnamediv"><table width="100%"><tr>
32 <td valign="top">
33 <h2><span class="refentrytitle"><a name="gst-plugins-base-libs-gstpbutilscodecutils.top_of_page"></a>gstpbutilscodecutils</span></h2>
34 <p>gstpbutilscodecutils — Miscellaneous codec-specific utility functions</p>
35 </td>
36 <td valign="top" align="right"></td>
37 </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 &lt;gst/pbutils/codec-utils.h&gt;
42
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 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>,
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> len</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-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>,
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 <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>
50                                                         (<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>,
51                                                          <em class="parameter"><code>const <span class="type">guint8</span> *audio_config</code></em>,
52                                                          <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>);
53
54 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>,
55                                                          <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-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>,
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 <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>
59                                                         (<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>,
60                                                          <em class="parameter"><code>const <span class="type">guint8</span> *sps</code></em>,
61                                                          <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>);
62 <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>);
63
64 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>
65                                                         (<em class="parameter"><code>const <span class="type">guint8</span> *vis_obj_seq</code></em>,
66                                                          <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>);
67 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>
68                                                         (<em class="parameter"><code>const <span class="type">guint8</span> *vis_obj_seq</code></em>,
69                                                          <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>);
70 <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>
71                                                         (<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>,
72                                                          <em class="parameter"><code>const <span class="type">guint8</span> *vis_obj_seq</code></em>,
73                                                          <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>);
74 </pre>
75 </div>
76 <div class="refsect1">
77 <a name="gst-plugins-base-libs-gstpbutilscodecutils.description"></a><h2>Description</h2>
78 <p>
79 </p>
80 <div class="refsect2">
81 <a name="idp27788672"></a><p>
82 Provides codec-specific ulility functions such as functions to provide the
83 codec profile and level in human-readable string form from header data.
84 </p>
85 </div>
86 <p>
87 </p>
88 </div>
89 <div class="refsect1">
90 <a name="gst-plugins-base-libs-gstpbutilscodecutils.details"></a><h2>Details</h2>
91 <div class="refsect2">
92 <a name="gst-codec-utils-aac-get-sample-rate-from-index"></a><h3>gst_codec_utils_aac_get_sample_rate_from_index ()</h3>
93 <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
94                                                         (<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>
95 <p>
96 Translates the sample rate index found in AAC headers to the actual sample
97 rate.
98 </p>
99 <div class="variablelist"><table border="0">
100 <col align="left" valign="top">
101 <tbody>
102 <tr>
103 <td><p><span class="term"><em class="parameter"><code>sr_idx</code></em> :</span></p></td>
104 <td>Sample rate index as from the AudioSpecificConfig (MPEG-4
105 container) or ADTS frame header</td>
106 </tr>
107 <tr>
108 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
109 <td>The sample rate if <em class="parameter"><code>sr_idx</code></em> is valid, 0 otherwise.</td>
110 </tr>
111 </tbody>
112 </table></div>
113 <p class="since">Since 0.10.31</p>
114 </div>
115 <hr>
116 <div class="refsect2">
117 <a name="gst-codec-utils-aac-get-profile"></a><h3>gst_codec_utils_aac_get_profile ()</h3>
118 <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>,
119                                                          <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>
120 <p>
121 Returns the profile of the given AAC stream as a string. The profile is
122 determined using the AudioObjectType field which is in the first 5 bits of
123 <em class="parameter"><code>audio_config</code></em>.
124 </p>
125 <p>
126 </p>
127 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
128 <h3 class="title">Note</h3>
129 HE-AAC support has not yet been implemented.
130 </div>
131 <p>
132 </p>
133 <div class="variablelist"><table border="0">
134 <col align="left" valign="top">
135 <tbody>
136 <tr>
137 <td><p><span class="term"><em class="parameter"><code>audio_config</code></em> :</span></p></td>
138 <td>a pointer to the AudioSpecificConfig as specified in the
139 Elementary Stream Descriptor (esds) in ISO/IEC 14496-1 (see
140 <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>
141 </tr>
142 <tr>
143 <td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
144 <td>Length of <em class="parameter"><code>audio_config</code></em> in bytes</td>
145 </tr>
146 <tr>
147 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
148 <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
149 determined.</td>
150 </tr>
151 </tbody>
152 </table></div>
153 <p class="since">Since 0.10.31</p>
154 </div>
155 <hr>
156 <div class="refsect2">
157 <a name="gst-codec-utils-aac-get-level"></a><h3>gst_codec_utils_aac_get_level ()</h3>
158 <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>,
159                                                          <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>
160 <p>
161 Determines the level of a stream as defined in ISO/IEC 14496-3. For AAC LC
162 streams, the constraints from the AAC audio profile are applied. For AAC
163 Main, LTP, SSR and others, the Main profile is used.
164 </p>
165 <p>
166 The <em class="parameter"><code>audio_config</code></em> parameter follows the following format, starting from the
167 most significant bit of the first byte:
168 </p>
169 <p>
170 </p>
171 <div class="itemizedlist"><ul class="itemizedlist" type="disc">
172 <li class="listitem"><p>
173     Bit 0:4 contains the AudioObjectType
174   </p></li>
175 <li class="listitem"><p>
176     Bit 5:8 contains the sample frequency index (if this is 0xf, then the
177             next 24 bits define the actual sample frequency, and subsequent
178             fields are appropriately shifted).
179    </p></li>
180 <li class="listitem"><p>
181     Bit 9:12 contains the channel configuration
182   </p></li>
183 </ul></div>
184 <p>
185 </p>
186 <p>
187 </p>
188 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
189 <h3 class="title">Note</h3>
190 HE-AAC support has not yet been implemented.
191 </div>
192 <p>
193 </p>
194 <div class="variablelist"><table border="0">
195 <col align="left" valign="top">
196 <tbody>
197 <tr>
198 <td><p><span class="term"><em class="parameter"><code>audio_config</code></em> :</span></p></td>
199 <td>a pointer to the AudioSpecificConfig as specified in the
200 Elementary Stream Descriptor (esds) in ISO/IEC 14496-1.</td>
201 </tr>
202 <tr>
203 <td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
204 <td>Length of <em class="parameter"><code>audio_config</code></em> in bytes</td>
205 </tr>
206 <tr>
207 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
208 <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
209 determined.</td>
210 </tr>
211 </tbody>
212 </table></div>
213 <p class="since">Since 0.10.31</p>
214 </div>
215 <hr>
216 <div class="refsect2">
217 <a name="gst-codec-utils-aac-caps-set-level-and-profile"></a><h3>gst_codec_utils_aac_caps_set_level_and_profile ()</h3>
218 <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
219                                                         (<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>,
220                                                          <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>
223 Sets the level and profile on <em class="parameter"><code>caps</code></em> if it can be determined from
224 <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
225 <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.
226 <em class="parameter"><code>caps</code></em> must be audio/mpeg caps with an "mpegversion" field of either 2 or 4.
227 If mpegversion is 4, the "base-profile" field is also set in <em class="parameter"><code>caps</code></em>.
228 </p>
229 <div class="variablelist"><table border="0">
230 <col align="left" valign="top">
231 <tbody>
232 <tr>
233 <td><p><span class="term"><em class="parameter"><code>caps</code></em> :</span></p></td>
234 <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>
235 </tr>
236 <tr>
237 <td><p><span class="term"><em class="parameter"><code>audio_config</code></em> :</span></p></td>
238 <td>a pointer to the AudioSpecificConfig as specified in the
239 Elementary Stream Descriptor (esds) in ISO/IEC 14496-1 (see
240 below for a more details).</td>
241 </tr>
242 <tr>
243 <td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
244 <td>Length of <em class="parameter"><code>audio_config</code></em> in bytes</td>
245 </tr>
246 <tr>
247 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
248 <td>
249 <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>
250 </tr>
251 </tbody>
252 </table></div>
253 <p class="since">Since 0.10.31</p>
254 </div>
255 <hr>
256 <div class="refsect2">
257 <a name="gst-codec-utils-h264-get-profile"></a><h3>gst_codec_utils_h264_get_profile ()</h3>
258 <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>,
259                                                          <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>
260 <p>
261 Converts the profile indication (profile_idc) in the stream's
262 sequence parameter set into a string. The SPS is expected to have the
263 following format, as defined in the H.264 specification. The SPS is viewed
264 as a bitstream here, with bit 0 being the most significant bit of the first
265 byte.
266 </p>
267 <p>
268 </p>
269 <div class="itemizedlist"><ul class="itemizedlist" type="disc">
270 <li class="listitem"><p>Bit 0:7   - Profile indication</p></li>
271 <li class="listitem"><p>Bit 8     - constraint_set0_flag</p></li>
272 <li class="listitem"><p>Bit 9     - constraint_set1_flag</p></li>
273 <li class="listitem"><p>Bit 10    - constraint_set2_flag</p></li>
274 <li class="listitem"><p>Bit 11    - constraint_set3_flag</p></li>
275 <li class="listitem"><p>Bit 12    - constraint_set3_flag</p></li>
276 <li class="listitem"><p>Bit 13:15 - Reserved</p></li>
277 <li class="listitem"><p>Bit 16:24 - Level indication</p></li>
278 </ul></div>
279 <p>
280 </p>
281 <div class="variablelist"><table border="0">
282 <col align="left" valign="top">
283 <tbody>
284 <tr>
285 <td><p><span class="term"><em class="parameter"><code>sps</code></em> :</span></p></td>
286 <td>Pointer to the sequence parameter set for the stream.</td>
287 </tr>
288 <tr>
289 <td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
290 <td>Length of the data available in <em class="parameter"><code>sps</code></em>.</td>
291 </tr>
292 <tr>
293 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
294 <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>
295 </tr>
296 </tbody>
297 </table></div>
298 <p class="since">Since 0.10.31</p>
299 </div>
300 <hr>
301 <div class="refsect2">
302 <a name="gst-codec-utils-h264-get-level"></a><h3>gst_codec_utils_h264_get_level ()</h3>
303 <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>,
304                                                          <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>
305 <p>
306 Converts the level indication (level_idc) in the stream's
307 sequence parameter set into a string. The SPS is expected to have the
308 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>.
309 </p>
310 <div class="variablelist"><table border="0">
311 <col align="left" valign="top">
312 <tbody>
313 <tr>
314 <td><p><span class="term"><em class="parameter"><code>sps</code></em> :</span></p></td>
315 <td>Pointer to the sequence parameter set for the stream.</td>
316 </tr>
317 <tr>
318 <td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
319 <td>Length of the data available in <em class="parameter"><code>sps</code></em>.</td>
320 </tr>
321 <tr>
322 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
323 <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>
324 </tr>
325 </tbody>
326 </table></div>
327 <p class="since">Since 0.10.31</p>
328 </div>
329 <hr>
330 <div class="refsect2">
331 <a name="gst-codec-utils-h264-caps-set-level-and-profile"></a><h3>gst_codec_utils_h264_caps_set_level_and_profile ()</h3>
332 <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
333                                                         (<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>,
334                                                          <em class="parameter"><code>const <span class="type">guint8</span> *sps</code></em>,
335                                                          <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>
336 <p>
337 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
338 <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>
339 for more details on the parameters.
340 </p>
341 <div class="variablelist"><table border="0">
342 <col align="left" valign="top">
343 <tbody>
344 <tr>
345 <td><p><span class="term"><em class="parameter"><code>caps</code></em> :</span></p></td>
346 <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>
347 </tr>
348 <tr>
349 <td><p><span class="term"><em class="parameter"><code>sps</code></em> :</span></p></td>
350 <td>Pointer to the sequence parameter set for the stream.</td>
351 </tr>
352 <tr>
353 <td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
354 <td>Length of the data available in <em class="parameter"><code>sps</code></em>.</td>
355 </tr>
356 <tr>
357 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
358 <td>
359 <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>
360 </tr>
361 </tbody>
362 </table></div>
363 <p class="since">Since 0.10.31</p>
364 </div>
365 <hr>
366 <div class="refsect2">
367 <a name="gst-codec-utils-h264-get-level-idc"></a><h3>gst_codec_utils_h264_get_level_idc ()</h3>
368 <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>
369 <p>
370 Transform a level string from the caps into the level_idc
371 </p>
372 <div class="variablelist"><table border="0">
373 <col align="left" valign="top">
374 <tbody>
375 <tr>
376 <td><p><span class="term"><em class="parameter"><code>level</code></em> :</span></p></td>
377 <td>A level string from caps</td>
378 </tr>
379 <tr>
380 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
381 <td>the level_idc or 0 if the level is unknown</td>
382 </tr>
383 </tbody>
384 </table></div>
385 <p class="since">Since 0.10.36</p>
386 </div>
387 <hr>
388 <div class="refsect2">
389 <a name="gst-codec-utils-mpeg4video-get-profile"></a><h3>gst_codec_utils_mpeg4video_get_profile ()</h3>
390 <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
391                                                         (<em class="parameter"><code>const <span class="type">guint8</span> *vis_obj_seq</code></em>,
392                                                          <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>
393 <p>
394 Converts the profile indication in the stream's visual object sequence into
395 a string. <em class="parameter"><code>vis_obj_seq</code></em> is expected to be the data following the visual
396 object sequence start code. Only the first byte
397 (profile_and_level_indication) is used.
398 </p>
399 <div class="variablelist"><table border="0">
400 <col align="left" valign="top">
401 <tbody>
402 <tr>
403 <td><p><span class="term"><em class="parameter"><code>vis_obj_seq</code></em> :</span></p></td>
404 <td>Pointer to the visual object sequence for the stream.</td>
405 </tr>
406 <tr>
407 <td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
408 <td>Length of the data available in <em class="parameter"><code>sps</code></em>.</td>
409 </tr>
410 <tr>
411 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
412 <td>The profile as a const string, or NULL if there is an error.</td>
413 </tr>
414 </tbody>
415 </table></div>
416 <p class="since">Since 0.10.31</p>
417 </div>
418 <hr>
419 <div class="refsect2">
420 <a name="gst-codec-utils-mpeg4video-get-level"></a><h3>gst_codec_utils_mpeg4video_get_level ()</h3>
421 <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
422                                                         (<em class="parameter"><code>const <span class="type">guint8</span> *vis_obj_seq</code></em>,
423                                                          <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>
424 <p>
425 Converts the level indication in the stream's visual object sequence into
426 a string. <em class="parameter"><code>vis_obj_seq</code></em> is expected to be the data following the visual
427 object sequence start code. Only the first byte
428 (profile_and_level_indication) is used.
429 </p>
430 <div class="variablelist"><table border="0">
431 <col align="left" valign="top">
432 <tbody>
433 <tr>
434 <td><p><span class="term"><em class="parameter"><code>vis_obj_seq</code></em> :</span></p></td>
435 <td>Pointer to the visual object sequence for the stream.</td>
436 </tr>
437 <tr>
438 <td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
439 <td>Length of the data available in <em class="parameter"><code>sps</code></em>.</td>
440 </tr>
441 <tr>
442 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
443 <td>The level as a const string, or NULL if there is an error.</td>
444 </tr>
445 </tbody>
446 </table></div>
447 <p class="since">Since 0.10.31</p>
448 </div>
449 <hr>
450 <div class="refsect2">
451 <a name="gst-codec-utils-mpeg4video-caps-set-level-and-profile"></a><h3>gst_codec_utils_mpeg4video_caps_set_level_and_profile ()</h3>
452 <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
453                                                         (<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>,
454                                                          <em class="parameter"><code>const <span class="type">guint8</span> *vis_obj_seq</code></em>,
455                                                          <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>
456 <p>
457 Sets the level and profile in <em class="parameter"><code>caps</code></em> if it can be determined from
458 <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
459 <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
460 parameters.
461 </p>
462 <div class="variablelist"><table border="0">
463 <col align="left" valign="top">
464 <tbody>
465 <tr>
466 <td><p><span class="term"><em class="parameter"><code>caps</code></em> :</span></p></td>
467 <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>
468 </tr>
469 <tr>
470 <td><p><span class="term"><em class="parameter"><code>vis_obj_seq</code></em> :</span></p></td>
471 <td>Pointer to the visual object sequence for the stream.</td>
472 </tr>
473 <tr>
474 <td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
475 <td>Length of the data available in <em class="parameter"><code>sps</code></em>.</td>
476 </tr>
477 <tr>
478 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
479 <td>
480 <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>
481 </tr>
482 </tbody>
483 </table></div>
484 <p class="since">Since 0.10.31</p>
485 </div>
486 </div>
487 </div>
488 <div class="footer">
489 <hr>
490           Generated by GTK-Doc V1.18</div>
491 </body>
492 </html>