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>GstVideoDecoder: GStreamer Base Plugins 1.0 Library Reference Manual</title> 6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 7<link rel="home" href="index.html" title="GStreamer Base Plugins 1.0 Library Reference Manual"> 8<link rel="up" href="gstreamer-video.html" title="Video Library"> 9<link rel="prev" href="GstVideoOverlay.html" title="GstVideoOverlay"> 10<link rel="next" href="GstVideoEncoder.html" title="GstVideoEncoder"> 11<meta name="generator" content="GTK-Doc V1.28 (XML mode)"> 12<link rel="stylesheet" href="style.css" type="text/css"> 13</head> 14<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 15<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle"> 16<td width="100%" align="left" class="shortcuts"> 17<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> 18 <a href="#GstVideoDecoder.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> 19 <a href="#GstVideoDecoder.object-hierarchy" class="shortcut">Object Hierarchy</a></span> 20</td> 21<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> 22<td><a accesskey="u" href="gstreamer-video.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> 23<td><a accesskey="p" href="GstVideoOverlay.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> 24<td><a accesskey="n" href="GstVideoEncoder.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> 25</tr></table> 26<div class="refentry"> 27<a name="GstVideoDecoder"></a><div class="titlepage"></div> 28<div class="refnamediv"><table width="100%"><tr> 29<td valign="top"> 30<h2><span class="refentrytitle"><a name="GstVideoDecoder.top_of_page"></a>GstVideoDecoder</span></h2> 31<p>GstVideoDecoder — Base class for video decoders</p> 32</td> 33<td class="gallery_image" valign="top" align="right"></td> 34</tr></table></div> 35<div class="refsect1"> 36<a name="GstVideoDecoder.functions"></a><h2>Functions</h2> 37<div class="informaltable"><table class="informaltable" width="100%" border="0"> 38<colgroup> 39<col width="150px" class="functions_return"> 40<col class="functions_name"> 41</colgroup> 42<tbody> 43<tr> 44<td class="define_keyword">#define</td> 45<td class="function_name"> 46<a class="link" href="GstVideoDecoder.html#GST-VIDEO-DECODER-ERROR:CAPS" title="GST_VIDEO_DECODER_ERROR()">GST_VIDEO_DECODER_ERROR</a><span class="c_punctuation">()</span> 47</td> 48</tr> 49<tr> 50<td class="define_keyword">#define</td> 51<td class="function_name"> 52<a class="link" href="GstVideoDecoder.html#GST-VIDEO-DECODER-SINK-PAD:CAPS" title="GST_VIDEO_DECODER_SINK_PAD()">GST_VIDEO_DECODER_SINK_PAD</a><span class="c_punctuation">()</span> 53</td> 54</tr> 55<tr> 56<td class="define_keyword">#define</td> 57<td class="function_name"> 58<a class="link" href="GstVideoDecoder.html#GST-VIDEO-DECODER-SRC-PAD:CAPS" title="GST_VIDEO_DECODER_SRC_PAD()">GST_VIDEO_DECODER_SRC_PAD</a><span class="c_punctuation">()</span> 59</td> 60</tr> 61<tr> 62<td class="define_keyword">#define</td> 63<td class="function_name"> 64<a class="link" href="GstVideoDecoder.html#GST-VIDEO-DECODER-STREAM-LOCK:CAPS" title="GST_VIDEO_DECODER_STREAM_LOCK()">GST_VIDEO_DECODER_STREAM_LOCK</a><span class="c_punctuation">()</span> 65</td> 66</tr> 67<tr> 68<td class="define_keyword">#define</td> 69<td class="function_name"> 70<a class="link" href="GstVideoDecoder.html#GST-VIDEO-DECODER-STREAM-UNLOCK:CAPS" title="GST_VIDEO_DECODER_STREAM_UNLOCK()">GST_VIDEO_DECODER_STREAM_UNLOCK</a><span class="c_punctuation">()</span> 71</td> 72</tr> 73<tr> 74<td class="define_keyword">#define</td> 75<td class="function_name"> 76<a class="link" href="GstVideoDecoder.html#GST-VIDEO-DECODER-INPUT-SEGMENT:CAPS" title="GST_VIDEO_DECODER_INPUT_SEGMENT()">GST_VIDEO_DECODER_INPUT_SEGMENT</a><span class="c_punctuation">()</span> 77</td> 78</tr> 79<tr> 80<td class="define_keyword">#define</td> 81<td class="function_name"> 82<a class="link" href="GstVideoDecoder.html#GST-VIDEO-DECODER-OUTPUT-SEGMENT:CAPS" title="GST_VIDEO_DECODER_OUTPUT_SEGMENT()">GST_VIDEO_DECODER_OUTPUT_SEGMENT</a><span class="c_punctuation">()</span> 83</td> 84</tr> 85<tr> 86<td class="function_type"> 87<span class="returnvalue">void</span> 88</td> 89<td class="function_name"> 90<a class="link" href="GstVideoDecoder.html#gst-video-decoder-add-to-frame" title="gst_video_decoder_add_to_frame ()">gst_video_decoder_add_to_frame</a> <span class="c_punctuation">()</span> 91</td> 92</tr> 93<tr> 94<td class="function_type"> 95<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#GstBuffer-struct"><span class="returnvalue">GstBuffer</span></a> * 96</td> 97<td class="function_name"> 98<a class="link" href="GstVideoDecoder.html#gst-video-decoder-allocate-output-buffer" title="gst_video_decoder_allocate_output_buffer ()">gst_video_decoder_allocate_output_buffer</a> <span class="c_punctuation">()</span> 99</td> 100</tr> 101<tr> 102<td class="function_type"> 103<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a> 104</td> 105<td class="function_name"> 106<a class="link" href="GstVideoDecoder.html#gst-video-decoder-allocate-output-frame" title="gst_video_decoder_allocate_output_frame ()">gst_video_decoder_allocate_output_frame</a> <span class="c_punctuation">()</span> 107</td> 108</tr> 109<tr> 110<td class="function_type"> 111<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a> 112</td> 113<td class="function_name"> 114<a class="link" href="GstVideoDecoder.html#gst-video-decoder-allocate-output-frame-with-params" title="gst_video_decoder_allocate_output_frame_with_params ()">gst_video_decoder_allocate_output_frame_with_params</a> <span class="c_punctuation">()</span> 115</td> 116</tr> 117<tr> 118<td class="function_type"> 119<span class="returnvalue">void</span> 120</td> 121<td class="function_name"> 122<a class="link" href="GstVideoDecoder.html#gst-video-decoder-get-allocator" title="gst_video_decoder_get_allocator ()">gst_video_decoder_get_allocator</a> <span class="c_punctuation">()</span> 123</td> 124</tr> 125<tr> 126<td class="function_type"> 127<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBufferPool.html#GstBufferPool-struct"><span class="returnvalue">GstBufferPool</span></a> * 128</td> 129<td class="function_name"> 130<a class="link" href="GstVideoDecoder.html#gst-video-decoder-get-buffer-pool" title="gst_video_decoder_get_buffer_pool ()">gst_video_decoder_get_buffer_pool</a> <span class="c_punctuation">()</span> 131</td> 132</tr> 133<tr> 134<td class="function_type"> 135<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a> 136</td> 137<td class="function_name"> 138<a class="link" href="GstVideoDecoder.html#gst-video-decoder-drop-frame" title="gst_video_decoder_drop_frame ()">gst_video_decoder_drop_frame</a> <span class="c_punctuation">()</span> 139</td> 140</tr> 141<tr> 142<td class="function_type"> 143<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a> 144</td> 145<td class="function_name"> 146<a class="link" href="GstVideoDecoder.html#gst-video-decoder-finish-frame" title="gst_video_decoder_finish_frame ()">gst_video_decoder_finish_frame</a> <span class="c_punctuation">()</span> 147</td> 148</tr> 149<tr> 150<td class="function_type"> 151<span class="returnvalue">void</span> 152</td> 153<td class="function_name"> 154<a class="link" href="GstVideoDecoder.html#gst-video-decoder-release-frame" title="gst_video_decoder_release_frame ()">gst_video_decoder_release_frame</a> <span class="c_punctuation">()</span> 155</td> 156</tr> 157<tr> 158<td class="function_type"> 159<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 160</td> 161<td class="function_name"> 162<a class="link" href="GstVideoDecoder.html#gst-video-decoder-negotiate" title="gst_video_decoder_negotiate ()">gst_video_decoder_negotiate</a> <span class="c_punctuation">()</span> 163</td> 164</tr> 165<tr> 166<td class="function_type"> 167<a class="link" href="gst-plugins-base-libs-GstVideo-Codec-utility-function.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="returnvalue">GstVideoCodecFrame</span></a> * 168</td> 169<td class="function_name"> 170<a class="link" href="GstVideoDecoder.html#gst-video-decoder-get-frame" title="gst_video_decoder_get_frame ()">gst_video_decoder_get_frame</a> <span class="c_punctuation">()</span> 171</td> 172</tr> 173<tr> 174<td class="function_type"> 175<a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * 176</td> 177<td class="function_name"> 178<a class="link" href="GstVideoDecoder.html#gst-video-decoder-get-frames" title="gst_video_decoder_get_frames ()">gst_video_decoder_get_frames</a> <span class="c_punctuation">()</span> 179</td> 180</tr> 181<tr> 182<td class="function_type"> 183<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstClock.html#GstClockTimeDiff"><span class="returnvalue">GstClockTimeDiff</span></a> 184</td> 185<td class="function_name"> 186<a class="link" href="GstVideoDecoder.html#gst-video-decoder-get-max-decode-time" title="gst_video_decoder_get_max_decode_time ()">gst_video_decoder_get_max_decode_time</a> <span class="c_punctuation">()</span> 187</td> 188</tr> 189<tr> 190<td class="function_type"> 191<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> 192</td> 193<td class="function_name"> 194<a class="link" href="GstVideoDecoder.html#gst-video-decoder-get-max-errors" title="gst_video_decoder_get_max_errors ()">gst_video_decoder_get_max_errors</a> <span class="c_punctuation">()</span> 195</td> 196</tr> 197<tr> 198<td class="function_type"> 199<a class="link" href="gst-plugins-base-libs-GstVideo-Codec-utility-function.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="returnvalue">GstVideoCodecFrame</span></a> * 200</td> 201<td class="function_name"> 202<a class="link" href="GstVideoDecoder.html#gst-video-decoder-get-oldest-frame" title="gst_video_decoder_get_oldest_frame ()">gst_video_decoder_get_oldest_frame</a> <span class="c_punctuation">()</span> 203</td> 204</tr> 205<tr> 206<td class="function_type"> 207<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 208</td> 209<td class="function_name"> 210<a class="link" href="GstVideoDecoder.html#gst-video-decoder-get-packetized" title="gst_video_decoder_get_packetized ()">gst_video_decoder_get_packetized</a> <span class="c_punctuation">()</span> 211</td> 212</tr> 213<tr> 214<td class="function_type"> 215<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"><span class="returnvalue">gsize</span></a> 216</td> 217<td class="function_name"> 218<a class="link" href="GstVideoDecoder.html#gst-video-decoder-get-pending-frame-size" title="gst_video_decoder_get_pending_frame_size ()">gst_video_decoder_get_pending_frame_size</a> <span class="c_punctuation">()</span> 219</td> 220</tr> 221<tr> 222<td class="function_type"> 223<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a> 224</td> 225<td class="function_name"> 226<a class="link" href="GstVideoDecoder.html#gst-video-decoder-get-qos-proportion" title="gst_video_decoder_get_qos_proportion ()">gst_video_decoder_get_qos_proportion</a> <span class="c_punctuation">()</span> 227</td> 228</tr> 229<tr> 230<td class="function_type"> 231<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a> 232</td> 233<td class="function_name"> 234<a class="link" href="GstVideoDecoder.html#gst-video-decoder-have-frame" title="gst_video_decoder_have_frame ()">gst_video_decoder_have_frame</a> <span class="c_punctuation">()</span> 235</td> 236</tr> 237<tr> 238<td class="function_type"> 239<span class="returnvalue">void</span> 240</td> 241<td class="function_name"> 242<a class="link" href="GstVideoDecoder.html#gst-video-decoder-get-latency" title="gst_video_decoder_get_latency ()">gst_video_decoder_get_latency</a> <span class="c_punctuation">()</span> 243</td> 244</tr> 245<tr> 246<td class="function_type"> 247<span class="returnvalue">void</span> 248</td> 249<td class="function_name"> 250<a class="link" href="GstVideoDecoder.html#gst-video-decoder-set-latency" title="gst_video_decoder_set_latency ()">gst_video_decoder_set_latency</a> <span class="c_punctuation">()</span> 251</td> 252</tr> 253<tr> 254<td class="function_type"> 255<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> 256</td> 257<td class="function_name"> 258<a class="link" href="GstVideoDecoder.html#gst-video-decoder-get-estimate-rate" title="gst_video_decoder_get_estimate_rate ()">gst_video_decoder_get_estimate_rate</a> <span class="c_punctuation">()</span> 259</td> 260</tr> 261<tr> 262<td class="function_type"> 263<a class="link" href="gst-plugins-base-libs-GstVideo-Codec-utility-function.html#GstVideoCodecState" title="struct GstVideoCodecState"><span class="returnvalue">GstVideoCodecState</span></a> * 264</td> 265<td class="function_name"> 266<a class="link" href="GstVideoDecoder.html#gst-video-decoder-get-output-state" title="gst_video_decoder_get_output_state ()">gst_video_decoder_get_output_state</a> <span class="c_punctuation">()</span> 267</td> 268</tr> 269<tr> 270<td class="function_type"> 271<span class="returnvalue">void</span> 272</td> 273<td class="function_name"> 274<a class="link" href="GstVideoDecoder.html#gst-video-decoder-set-estimate-rate" title="gst_video_decoder_set_estimate_rate ()">gst_video_decoder_set_estimate_rate</a> <span class="c_punctuation">()</span> 275</td> 276</tr> 277<tr> 278<td class="function_type"> 279<a class="link" href="gst-plugins-base-libs-GstVideo-Codec-utility-function.html#GstVideoCodecState" title="struct GstVideoCodecState"><span class="returnvalue">GstVideoCodecState</span></a> * 280</td> 281<td class="function_name"> 282<a class="link" href="GstVideoDecoder.html#gst-video-decoder-set-output-state" title="gst_video_decoder_set_output_state ()">gst_video_decoder_set_output_state</a> <span class="c_punctuation">()</span> 283</td> 284</tr> 285<tr> 286<td class="function_type"> 287<a class="link" href="gst-plugins-base-libs-GstVideo-Codec-utility-function.html#GstVideoCodecState" title="struct GstVideoCodecState"><span class="returnvalue">GstVideoCodecState</span></a> * 288</td> 289<td class="function_name"> 290<a class="link" href="GstVideoDecoder.html#gst-video-decoder-set-interlaced-output-state" title="gst_video_decoder_set_interlaced_output_state ()">gst_video_decoder_set_interlaced_output_state</a> <span class="c_punctuation">()</span> 291</td> 292</tr> 293<tr> 294<td class="function_type"> 295<span class="returnvalue">void</span> 296</td> 297<td class="function_name"> 298<a class="link" href="GstVideoDecoder.html#gst-video-decoder-set-max-errors" title="gst_video_decoder_set_max_errors ()">gst_video_decoder_set_max_errors</a> <span class="c_punctuation">()</span> 299</td> 300</tr> 301<tr> 302<td class="function_type"> 303<span class="returnvalue">void</span> 304</td> 305<td class="function_name"> 306<a class="link" href="GstVideoDecoder.html#gst-video-decoder-set-packetized" title="gst_video_decoder_set_packetized ()">gst_video_decoder_set_packetized</a> <span class="c_punctuation">()</span> 307</td> 308</tr> 309<tr> 310<td class="function_type"> 311<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 312</td> 313<td class="function_name"> 314<a class="link" href="GstVideoDecoder.html#gst-video-decoder-get-needs-format" title="gst_video_decoder_get_needs_format ()">gst_video_decoder_get_needs_format</a> <span class="c_punctuation">()</span> 315</td> 316</tr> 317<tr> 318<td class="function_type"> 319<span class="returnvalue">void</span> 320</td> 321<td class="function_name"> 322<a class="link" href="GstVideoDecoder.html#gst-video-decoder-set-needs-format" title="gst_video_decoder_set_needs_format ()">gst_video_decoder_set_needs_format</a> <span class="c_punctuation">()</span> 323</td> 324</tr> 325<tr> 326<td class="function_type"> 327<span class="returnvalue">void</span> 328</td> 329<td class="function_name"> 330<a class="link" href="GstVideoDecoder.html#gst-video-decoder-merge-tags" title="gst_video_decoder_merge_tags ()">gst_video_decoder_merge_tags</a> <span class="c_punctuation">()</span> 331</td> 332</tr> 333<tr> 334<td class="function_type"> 335<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstCaps.html#GstCaps-struct"><span class="returnvalue">GstCaps</span></a> * 336</td> 337<td class="function_name"> 338<a class="link" href="GstVideoDecoder.html#gst-video-decoder-proxy-getcaps" title="gst_video_decoder_proxy_getcaps ()">gst_video_decoder_proxy_getcaps</a> <span class="c_punctuation">()</span> 339</td> 340</tr> 341<tr> 342<td class="function_type"> 343<span class="returnvalue">void</span> 344</td> 345<td class="function_name"> 346<a class="link" href="GstVideoDecoder.html#gst-video-decoder-set-use-default-pad-acceptcaps" title="gst_video_decoder_set_use_default_pad_acceptcaps ()">gst_video_decoder_set_use_default_pad_acceptcaps</a> <span class="c_punctuation">()</span> 347</td> 348</tr> 349</tbody> 350</table></div> 351</div> 352<div class="refsect1"> 353<a name="GstVideoDecoder.other"></a><h2>Types and Values</h2> 354<div class="informaltable"><table class="informaltable" width="100%" border="0"> 355<colgroup> 356<col width="150px" class="name"> 357<col class="description"> 358</colgroup> 359<tbody> 360<tr> 361<td class="define_keyword">#define</td> 362<td class="function_name"><a class="link" href="GstVideoDecoder.html#GST-VIDEO-DECODER-FLOW-NEED-DATA:CAPS" title="GST_VIDEO_DECODER_FLOW_NEED_DATA">GST_VIDEO_DECODER_FLOW_NEED_DATA</a></td> 363</tr> 364<tr> 365<td class="define_keyword">#define</td> 366<td class="function_name"><a class="link" href="GstVideoDecoder.html#GST-VIDEO-DECODER-MAX-ERRORS:CAPS" title="GST_VIDEO_DECODER_MAX_ERRORS">GST_VIDEO_DECODER_MAX_ERRORS</a></td> 367</tr> 368<tr> 369<td class="define_keyword">#define</td> 370<td class="function_name"><a class="link" href="GstVideoDecoder.html#GST-VIDEO-DECODER-SINK-NAME:CAPS" title="GST_VIDEO_DECODER_SINK_NAME">GST_VIDEO_DECODER_SINK_NAME</a></td> 371</tr> 372<tr> 373<td class="define_keyword">#define</td> 374<td class="function_name"><a class="link" href="GstVideoDecoder.html#GST-VIDEO-DECODER-SRC-NAME:CAPS" title="GST_VIDEO_DECODER_SRC_NAME">GST_VIDEO_DECODER_SRC_NAME</a></td> 375</tr> 376<tr> 377<td class="datatype_keyword">struct</td> 378<td class="function_name"><a class="link" href="GstVideoDecoder.html#GstVideoDecoder-struct" title="struct GstVideoDecoder">GstVideoDecoder</a></td> 379</tr> 380<tr> 381<td class="datatype_keyword">struct</td> 382<td class="function_name"><a class="link" href="GstVideoDecoder.html#GstVideoDecoderClass" title="struct GstVideoDecoderClass">GstVideoDecoderClass</a></td> 383</tr> 384</tbody> 385</table></div> 386</div> 387<div class="refsect1"> 388<a name="GstVideoDecoder.object-hierarchy"></a><h2>Object Hierarchy</h2> 389<pre class="screen"> <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a> 390 <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a> 391 <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstObject.html#GstObject-struct">GstObject</a> 392 <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstElement.html#GstElement-struct">GstElement</a> 393 <span class="lineart">╰──</span> GstVideoDecoder 394</pre> 395</div> 396<div class="refsect1"> 397<a name="GstVideoDecoder.includes"></a><h2>Includes</h2> 398<pre class="synopsis">#include <gst/video/video.h> 399</pre> 400</div> 401<div class="refsect1"> 402<a name="GstVideoDecoder.description"></a><h2>Description</h2> 403<p>This base class is for video decoders turning encoded data into raw video 404frames.</p> 405<p>The GstVideoDecoder base class and derived subclasses should cooperate as 406follows:</p> 407<div class="refsect3"> 408<a name="id-1.2.15.20.7.4"></a><h4>Configuration</h4> 409<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 410<li class="listitem"><p>Initially, GstVideoDecoder calls <em class="parameter"><code>start</code></em> 411 when the decoder element 412is activated, which allows the subclass to perform any global setup.</p></li> 413<li class="listitem"><p>GstVideoDecoder calls <em class="parameter"><code>set_format</code></em> 414 to inform the subclass of caps 415describing input video data that it is about to receive, including 416possibly configuration data. 417While unlikely, it might be called more than once, if changing input 418parameters require reconfiguration.</p></li> 419<li class="listitem"><p>Incoming data buffers are processed as needed, described in Data 420Processing below.</p></li> 421<li class="listitem"><p>GstVideoDecoder calls <em class="parameter"><code>stop</code></em> 422 at end of all processing.</p></li> 423</ul></div> 424</div> 425<div class="refsect3"> 426<a name="id-1.2.15.20.7.5"></a><h4>Data processing</h4> 427<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> 428<p>The base class gathers input data, and optionally allows subclass 429 to parse this into subsequently manageable chunks, typically 430 corresponding to and referred to as 'frames'.</p> 431<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; "> 432<li class="listitem"><p>Each input frame is provided in turn to the subclass' <em class="parameter"><code>handle_frame</code></em> 433 434callback. 435The ownership of the frame is given to the <em class="parameter"><code>handle_frame</code></em> 436 callback.</p></li> 437<li class="listitem"><p>If codec processing results in decoded data, the subclass should call 438<em class="parameter"><code>gst_video_decoder_finish_frame</code></em> 439 to have decoded data pushed. 440downstream. Otherwise, the subclass must call 441<em class="parameter"><code>gst_video_decoder_drop_frame</code></em> 442, to allow the base class to do timestamp 443and offset tracking, and possibly to requeue the frame for a later 444attempt in the case of reverse playback.</p></li> 445</ul></div> 446</li></ul></div> 447</div> 448<div class="refsect3"> 449<a name="id-1.2.15.20.7.6"></a><h4>Shutdown phase</h4> 450<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>The GstVideoDecoder class calls <em class="parameter"><code>stop</code></em> 451 to inform the subclass that data 452parsing will be stopped.</p></li></ul></div> 453</div> 454<div class="refsect3"> 455<a name="id-1.2.15.20.7.7"></a><h4>Additional Notes</h4> 456<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 457<li class="listitem"> 458<p>Seeking/Flushing</p> 459<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>When the pipeline is seeked or otherwise flushed, the subclass is 460informed via a call to its <em class="parameter"><code>reset</code></em> 461 callback, with the hard parameter 462set to true. This indicates the subclass should drop any internal data 463queues and timestamps and prepare for a fresh set of buffers to arrive 464for parsing and decoding.</p></li></ul></div> 465</li> 466<li class="listitem"> 467<p>End Of Stream</p> 468<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>At end-of-stream, the subclass <em class="parameter"><code>parse</code></em> 469 function may be called some final 470times with the at_eos parameter set to true, indicating that the element 471should not expect any more data to be arriving, and it should parse and 472remaining frames and call <a class="link" href="GstVideoDecoder.html#gst-video-decoder-have-frame" title="gst_video_decoder_have_frame ()"><code class="function">gst_video_decoder_have_frame()</code></a> if possible.</p></li></ul></div> 473</li> 474</ul></div> 475<p>The subclass is responsible for providing pad template caps for 476source and sink pads. The pads need to be named "sink" and "src". It also 477needs to provide information about the ouptput caps, when they are known. 478This may be when the base class calls the subclass' <em class="parameter"><code>set_format</code></em> 479 function, 480though it might be during decoding, before calling 481<em class="parameter"><code>gst_video_decoder_finish_frame</code></em> 482. This is done via 483<em class="parameter"><code>gst_video_decoder_set_output_state</code></em> 484</p> 485<p>The subclass is also responsible for providing (presentation) timestamps 486(likely based on corresponding input ones). If that is not applicable 487or possible, the base class provides limited framerate based interpolation.</p> 488<p>Similarly, the base class provides some limited (legacy) seeking support 489if specifically requested by the subclass, as full-fledged support 490should rather be left to upstream demuxer, parser or alike. This simple 491approach caters for seeking and duration reporting using estimated input 492bitrates. To enable it, a subclass should call 493<em class="parameter"><code>gst_video_decoder_set_estimate_rate</code></em> 494 to enable handling of incoming 495byte-streams.</p> 496<p>The base class provides some support for reverse playback, in particular 497in case incoming data is not packetized or upstream does not provide 498fragments on keyframe boundaries. However, the subclass should then be 499prepared for the parsing and frame processing stage to occur separately 500(in normal forward processing, the latter immediately follows the former), 501The subclass also needs to ensure the parsing stage properly marks 502keyframes, unless it knows the upstream elements will do so properly for 503incoming data.</p> 504<p>The bare minimum that a functional subclass needs to implement is:</p> 505<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 506<li class="listitem"><p>Provide pad templates</p></li> 507<li class="listitem"><p>Inform the base class of output caps via 508 <em class="parameter"><code>gst_video_decoder_set_output_state</code></em> 509</p></li> 510<li class="listitem"><p>Parse input data, if it is not considered packetized from upstream 511 Data will be provided to <em class="parameter"><code>parse</code></em> 512 which should invoke 513 <em class="parameter"><code>gst_video_decoder_add_to_frame</code></em> 514 and <em class="parameter"><code>gst_video_decoder_have_frame</code></em> 515 to 516 separate the data belonging to each video frame.</p></li> 517<li class="listitem"><p>Accept data in <em class="parameter"><code>handle_frame</code></em> 518 and provide decoded results to 519 <em class="parameter"><code>gst_video_decoder_finish_frame</code></em> 520, or call <em class="parameter"><code>gst_video_decoder_drop_frame</code></em> 521.</p></li> 522</ul></div> 523</div> 524</div> 525<div class="refsect1"> 526<a name="GstVideoDecoder.functions_details"></a><h2>Functions</h2> 527<div class="refsect2"> 528<a name="GST-VIDEO-DECODER-ERROR:CAPS"></a><h3>GST_VIDEO_DECODER_ERROR()</h3> 529<pre class="programlisting">#define GST_VIDEO_DECODER_ERROR(el, w, domain, code, text, debug, ret)</pre> 530<p>Utility function that video decoder elements can use in case they encountered 531a data processing error that may be fatal for the current "data unit" but 532need not prevent subsequent decoding. Such errors are counted and if there 533are too many, as configured in the context's max_errors, the pipeline will 534post an error message and the application will be requested to stop further 535media processing. Otherwise, it is considered a "glitch" and only a warning 536is logged. In either case, <em class="parameter"><code>ret</code></em> 537 is set to the proper value to 538return to upstream/caller (indicating either GST_FLOW_ERROR or GST_FLOW_OK).</p> 539<div class="refsect3"> 540<a name="GST-VIDEO-DECODER-ERROR.parameters"></a><h4>Parameters</h4> 541<div class="informaltable"><table class="informaltable" width="100%" border="0"> 542<colgroup> 543<col width="150px" class="parameters_name"> 544<col class="parameters_description"> 545<col width="200px" class="parameters_annotations"> 546</colgroup> 547<tbody> 548<tr> 549<td class="parameter_name"><p>el</p></td> 550<td class="parameter_description"><p>the base video decoder element that generates the error</p></td> 551<td class="parameter_annotations"> </td> 552</tr> 553<tr> 554<td class="parameter_name"><p>w</p></td> 555<td class="parameter_description"><p>element defined weight of the error, added to error count</p></td> 556<td class="parameter_annotations"> </td> 557</tr> 558<tr> 559<td class="parameter_name"><p>domain</p></td> 560<td class="parameter_description"><p>like CORE, LIBRARY, RESOURCE or STREAM (see <span class="type">gstreamer-GstGError</span>)</p></td> 561<td class="parameter_annotations"> </td> 562</tr> 563<tr> 564<td class="parameter_name"><p>code</p></td> 565<td class="parameter_description"><p>error code defined for that domain (see <span class="type">gstreamer-GstGError</span>)</p></td> 566<td class="parameter_annotations"> </td> 567</tr> 568<tr> 569<td class="parameter_name"><p>text</p></td> 570<td class="parameter_description"><p>the message to display (format string and args enclosed in 571parentheses)</p></td> 572<td class="parameter_annotations"> </td> 573</tr> 574<tr> 575<td class="parameter_name"><p>debug</p></td> 576<td class="parameter_description"><p>debugging information for the message (format string and args 577enclosed in parentheses)</p></td> 578<td class="parameter_annotations"> </td> 579</tr> 580<tr> 581<td class="parameter_name"><p>ret</p></td> 582<td class="parameter_description"><p>variable to receive return value</p></td> 583<td class="parameter_annotations"> </td> 584</tr> 585</tbody> 586</table></div> 587</div> 588</div> 589<hr> 590<div class="refsect2"> 591<a name="GST-VIDEO-DECODER-SINK-PAD:CAPS"></a><h3>GST_VIDEO_DECODER_SINK_PAD()</h3> 592<pre class="programlisting">#define GST_VIDEO_DECODER_SINK_PAD(obj) (((GstVideoDecoder *) (obj))->sinkpad) 593</pre> 594<p>Gives the pointer to the sink <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GstPad-struct"><span class="type">GstPad</span></a> object of the element.</p> 595<div class="refsect3"> 596<a name="GST-VIDEO-DECODER-SINK-PAD.parameters"></a><h4>Parameters</h4> 597<div class="informaltable"><table class="informaltable" width="100%" border="0"> 598<colgroup> 599<col width="150px" class="parameters_name"> 600<col class="parameters_description"> 601<col width="200px" class="parameters_annotations"> 602</colgroup> 603<tbody><tr> 604<td class="parameter_name"><p>obj</p></td> 605<td class="parameter_description"><p>a <a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a></p></td> 606<td class="parameter_annotations"> </td> 607</tr></tbody> 608</table></div> 609</div> 610</div> 611<hr> 612<div class="refsect2"> 613<a name="GST-VIDEO-DECODER-SRC-PAD:CAPS"></a><h3>GST_VIDEO_DECODER_SRC_PAD()</h3> 614<pre class="programlisting">#define GST_VIDEO_DECODER_SRC_PAD(obj) (((GstVideoDecoder *) (obj))->srcpad) 615</pre> 616<p>Gives the pointer to the source <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GstPad-struct"><span class="type">GstPad</span></a> object of the element.</p> 617<div class="refsect3"> 618<a name="GST-VIDEO-DECODER-SRC-PAD.parameters"></a><h4>Parameters</h4> 619<div class="informaltable"><table class="informaltable" width="100%" border="0"> 620<colgroup> 621<col width="150px" class="parameters_name"> 622<col class="parameters_description"> 623<col width="200px" class="parameters_annotations"> 624</colgroup> 625<tbody><tr> 626<td class="parameter_name"><p>obj</p></td> 627<td class="parameter_description"><p>a <a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a></p></td> 628<td class="parameter_annotations"> </td> 629</tr></tbody> 630</table></div> 631</div> 632</div> 633<hr> 634<div class="refsect2"> 635<a name="GST-VIDEO-DECODER-STREAM-LOCK:CAPS"></a><h3>GST_VIDEO_DECODER_STREAM_LOCK()</h3> 636<pre class="programlisting">#define GST_VIDEO_DECODER_STREAM_LOCK(decoder) g_rec_mutex_lock (&GST_VIDEO_DECODER (decoder)->stream_lock) 637</pre> 638<p>Obtain a lock to protect the decoder function from concurrent access.</p> 639<div class="refsect3"> 640<a name="GST-VIDEO-DECODER-STREAM-LOCK.parameters"></a><h4>Parameters</h4> 641<div class="informaltable"><table class="informaltable" width="100%" border="0"> 642<colgroup> 643<col width="150px" class="parameters_name"> 644<col class="parameters_description"> 645<col width="200px" class="parameters_annotations"> 646</colgroup> 647<tbody><tr> 648<td class="parameter_name"><p>decoder</p></td> 649<td class="parameter_description"><p>video decoder instance</p></td> 650<td class="parameter_annotations"> </td> 651</tr></tbody> 652</table></div> 653</div> 654</div> 655<hr> 656<div class="refsect2"> 657<a name="GST-VIDEO-DECODER-STREAM-UNLOCK:CAPS"></a><h3>GST_VIDEO_DECODER_STREAM_UNLOCK()</h3> 658<pre class="programlisting">#define GST_VIDEO_DECODER_STREAM_UNLOCK(decoder) g_rec_mutex_unlock (&GST_VIDEO_DECODER (decoder)->stream_lock) 659</pre> 660<p>Release the lock that protects the decoder function from concurrent access.</p> 661<div class="refsect3"> 662<a name="GST-VIDEO-DECODER-STREAM-UNLOCK.parameters"></a><h4>Parameters</h4> 663<div class="informaltable"><table class="informaltable" width="100%" border="0"> 664<colgroup> 665<col width="150px" class="parameters_name"> 666<col class="parameters_description"> 667<col width="200px" class="parameters_annotations"> 668</colgroup> 669<tbody><tr> 670<td class="parameter_name"><p>decoder</p></td> 671<td class="parameter_description"><p>video decoder instance</p></td> 672<td class="parameter_annotations"> </td> 673</tr></tbody> 674</table></div> 675</div> 676</div> 677<hr> 678<div class="refsect2"> 679<a name="GST-VIDEO-DECODER-INPUT-SEGMENT:CAPS"></a><h3>GST_VIDEO_DECODER_INPUT_SEGMENT()</h3> 680<pre class="programlisting">#define GST_VIDEO_DECODER_INPUT_SEGMENT(obj) (GST_VIDEO_DECODER_CAST (obj)->input_segment) 681</pre> 682<p>Gives the segment of the element.</p> 683<div class="refsect3"> 684<a name="GST-VIDEO-DECODER-INPUT-SEGMENT.parameters"></a><h4>Parameters</h4> 685<div class="informaltable"><table class="informaltable" width="100%" border="0"> 686<colgroup> 687<col width="150px" class="parameters_name"> 688<col class="parameters_description"> 689<col width="200px" class="parameters_annotations"> 690</colgroup> 691<tbody><tr> 692<td class="parameter_name"><p>obj</p></td> 693<td class="parameter_description"><p>base decoder instance</p></td> 694<td class="parameter_annotations"> </td> 695</tr></tbody> 696</table></div> 697</div> 698</div> 699<hr> 700<div class="refsect2"> 701<a name="GST-VIDEO-DECODER-OUTPUT-SEGMENT:CAPS"></a><h3>GST_VIDEO_DECODER_OUTPUT_SEGMENT()</h3> 702<pre class="programlisting">#define GST_VIDEO_DECODER_OUTPUT_SEGMENT(obj) (GST_VIDEO_DECODER_CAST (obj)->output_segment) 703</pre> 704<p>Gives the segment of the element.</p> 705<div class="refsect3"> 706<a name="GST-VIDEO-DECODER-OUTPUT-SEGMENT.parameters"></a><h4>Parameters</h4> 707<div class="informaltable"><table class="informaltable" width="100%" border="0"> 708<colgroup> 709<col width="150px" class="parameters_name"> 710<col class="parameters_description"> 711<col width="200px" class="parameters_annotations"> 712</colgroup> 713<tbody><tr> 714<td class="parameter_name"><p>obj</p></td> 715<td class="parameter_description"><p>base decoder instance</p></td> 716<td class="parameter_annotations"> </td> 717</tr></tbody> 718</table></div> 719</div> 720</div> 721<hr> 722<div class="refsect2"> 723<a name="gst-video-decoder-add-to-frame"></a><h3>gst_video_decoder_add_to_frame ()</h3> 724<pre class="programlisting"><span class="returnvalue">void</span> 725gst_video_decoder_add_to_frame (<em class="parameter"><code><a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a> *decoder</code></em>, 726 <em class="parameter"><code><span class="type">int</span> n_bytes</code></em>);</pre> 727<p>Removes next <em class="parameter"><code>n_bytes</code></em> 728 of input data and adds it to currently parsed frame.</p> 729<div class="refsect3"> 730<a name="gst-video-decoder-add-to-frame.parameters"></a><h4>Parameters</h4> 731<div class="informaltable"><table class="informaltable" width="100%" border="0"> 732<colgroup> 733<col width="150px" class="parameters_name"> 734<col class="parameters_description"> 735<col width="200px" class="parameters_annotations"> 736</colgroup> 737<tbody> 738<tr> 739<td class="parameter_name"><p>decoder</p></td> 740<td class="parameter_description"><p>a <a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a></p></td> 741<td class="parameter_annotations"> </td> 742</tr> 743<tr> 744<td class="parameter_name"><p>n_bytes</p></td> 745<td class="parameter_description"><p>the number of bytes to add</p></td> 746<td class="parameter_annotations"> </td> 747</tr> 748</tbody> 749</table></div> 750</div> 751</div> 752<hr> 753<div class="refsect2"> 754<a name="gst-video-decoder-allocate-output-buffer"></a><h3>gst_video_decoder_allocate_output_buffer ()</h3> 755<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#GstBuffer-struct"><span class="returnvalue">GstBuffer</span></a> * 756gst_video_decoder_allocate_output_buffer 757 (<em class="parameter"><code><a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a> *decoder</code></em>);</pre> 758<p>Helper function that allocates a buffer to hold a video frame for <em class="parameter"><code>decoder</code></em> 759's 760current <a class="link" href="gst-plugins-base-libs-GstVideo-Codec-utility-function.html#GstVideoCodecState" title="struct GstVideoCodecState"><span class="type">GstVideoCodecState</span></a>.</p> 761<p>You should use <a class="link" href="GstVideoDecoder.html#gst-video-decoder-allocate-output-frame" title="gst_video_decoder_allocate_output_frame ()"><code class="function">gst_video_decoder_allocate_output_frame()</code></a> instead of this 762function, if possible at all.</p> 763<div class="refsect3"> 764<a name="gst-video-decoder-allocate-output-buffer.parameters"></a><h4>Parameters</h4> 765<div class="informaltable"><table class="informaltable" width="100%" border="0"> 766<colgroup> 767<col width="150px" class="parameters_name"> 768<col class="parameters_description"> 769<col width="200px" class="parameters_annotations"> 770</colgroup> 771<tbody><tr> 772<td class="parameter_name"><p>decoder</p></td> 773<td class="parameter_description"><p>a <a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a></p></td> 774<td class="parameter_annotations"> </td> 775</tr></tbody> 776</table></div> 777</div> 778<div class="refsect3"> 779<a name="gst-video-decoder-allocate-output-buffer.returns"></a><h4>Returns</h4> 780<p>allocated buffer, or NULL if no buffer could be 781allocated (e.g. when downstream is flushing or shutting down). </p> 782<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> 783</div> 784</div> 785<hr> 786<div class="refsect2"> 787<a name="gst-video-decoder-allocate-output-frame"></a><h3>gst_video_decoder_allocate_output_frame ()</h3> 788<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a> 789gst_video_decoder_allocate_output_frame 790 (<em class="parameter"><code><a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a> *decoder</code></em>, 791 <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideo-Codec-utility-function.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a> *frame</code></em>);</pre> 792<p>Helper function that allocates a buffer to hold a video frame for <em class="parameter"><code>decoder</code></em> 793's 794current <a class="link" href="gst-plugins-base-libs-GstVideo-Codec-utility-function.html#GstVideoCodecState" title="struct GstVideoCodecState"><span class="type">GstVideoCodecState</span></a>. Subclass should already have configured video 795state and set src pad caps.</p> 796<p>The buffer allocated here is owned by the frame and you should only 797keep references to the frame, not the buffer.</p> 798<div class="refsect3"> 799<a name="gst-video-decoder-allocate-output-frame.parameters"></a><h4>Parameters</h4> 800<div class="informaltable"><table class="informaltable" width="100%" border="0"> 801<colgroup> 802<col width="150px" class="parameters_name"> 803<col class="parameters_description"> 804<col width="200px" class="parameters_annotations"> 805</colgroup> 806<tbody> 807<tr> 808<td class="parameter_name"><p>decoder</p></td> 809<td class="parameter_description"><p>a <a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a></p></td> 810<td class="parameter_annotations"> </td> 811</tr> 812<tr> 813<td class="parameter_name"><p>frame</p></td> 814<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstVideo-Codec-utility-function.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a></p></td> 815<td class="parameter_annotations"> </td> 816</tr> 817</tbody> 818</table></div> 819</div> 820<div class="refsect3"> 821<a name="gst-video-decoder-allocate-output-frame.returns"></a><h4>Returns</h4> 822<p> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GST-FLOW-OK:CAPS"><code class="literal">GST_FLOW_OK</code></a> if an output buffer could be allocated</p> 823</div> 824</div> 825<hr> 826<div class="refsect2"> 827<a name="gst-video-decoder-allocate-output-frame-with-params"></a><h3>gst_video_decoder_allocate_output_frame_with_params ()</h3> 828<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a> 829gst_video_decoder_allocate_output_frame_with_params 830 (<em class="parameter"><code><a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a> *decoder</code></em>, 831 <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideo-Codec-utility-function.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a> *frame</code></em>, 832 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBufferPool.html#GstBufferPoolAcquireParams"><span class="type">GstBufferPoolAcquireParams</span></a> *params</code></em>);</pre> 833<p>Same as <a class="link" href="GstVideoDecoder.html#gst-video-decoder-allocate-output-frame" title="gst_video_decoder_allocate_output_frame ()"><span class="type">gst_video_decoder_allocate_output_frame</span></a> except it allows passing 834<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBufferPool.html#GstBufferPoolAcquireParams"><span class="type">GstBufferPoolAcquireParams</span></a> to the sub call gst_buffer_pool_acquire_buffer.</p> 835<div class="refsect3"> 836<a name="gst-video-decoder-allocate-output-frame-with-params.parameters"></a><h4>Parameters</h4> 837<div class="informaltable"><table class="informaltable" width="100%" border="0"> 838<colgroup> 839<col width="150px" class="parameters_name"> 840<col class="parameters_description"> 841<col width="200px" class="parameters_annotations"> 842</colgroup> 843<tbody> 844<tr> 845<td class="parameter_name"><p>decoder</p></td> 846<td class="parameter_description"><p>a <a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a></p></td> 847<td class="parameter_annotations"> </td> 848</tr> 849<tr> 850<td class="parameter_name"><p>frame</p></td> 851<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstVideo-Codec-utility-function.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a></p></td> 852<td class="parameter_annotations"> </td> 853</tr> 854<tr> 855<td class="parameter_name"><p>params</p></td> 856<td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBufferPool.html#GstBufferPoolAcquireParams"><span class="type">GstBufferPoolAcquireParams</span></a></p></td> 857<td class="parameter_annotations"> </td> 858</tr> 859</tbody> 860</table></div> 861</div> 862<div class="refsect3"> 863<a name="gst-video-decoder-allocate-output-frame-with-params.returns"></a><h4>Returns</h4> 864<p> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GST-FLOW-OK:CAPS"><code class="literal">GST_FLOW_OK</code></a> if an output buffer could be allocated</p> 865</div> 866<p class="since">Since: <a class="link" href="ix05.html#api-index-1.12">1.12</a></p> 867</div> 868<hr> 869<div class="refsect2"> 870<a name="gst-video-decoder-get-allocator"></a><h3>gst_video_decoder_get_allocator ()</h3> 871<pre class="programlisting"><span class="returnvalue">void</span> 872gst_video_decoder_get_allocator (<em class="parameter"><code><a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a> *decoder</code></em>, 873 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstAllocator.html#GstAllocator-struct"><span class="type">GstAllocator</span></a> **allocator</code></em>, 874 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstAllocator.html#GstAllocationParams-struct"><span class="type">GstAllocationParams</span></a> *params</code></em>);</pre> 875<p>Lets <a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a> sub-classes to know the memory <em class="parameter"><code>allocator</code></em> 876 877used by the base class and its <em class="parameter"><code>params</code></em> 878.</p> 879<p>Unref the <em class="parameter"><code>allocator</code></em> 880 after use it.</p> 881<div class="refsect3"> 882<a name="gst-video-decoder-get-allocator.parameters"></a><h4>Parameters</h4> 883<div class="informaltable"><table class="informaltable" width="100%" border="0"> 884<colgroup> 885<col width="150px" class="parameters_name"> 886<col class="parameters_description"> 887<col width="200px" class="parameters_annotations"> 888</colgroup> 889<tbody> 890<tr> 891<td class="parameter_name"><p>decoder</p></td> 892<td class="parameter_description"><p>a <a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a></p></td> 893<td class="parameter_annotations"> </td> 894</tr> 895<tr> 896<td class="parameter_name"><p>allocator</p></td> 897<td class="parameter_description"><p>the <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstAllocator.html#GstAllocator-struct"><span class="type">GstAllocator</span></a> 898used. </p></td> 899<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td> 900</tr> 901<tr> 902<td class="parameter_name"><p>params</p></td> 903<td class="parameter_description"><p>the 904<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstAllocator.html#GstAllocationParams-struct"><span class="type">GstAllocationParams</span></a> of <em class="parameter"><code>allocator</code></em> 905. </p></td> 906<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td> 907</tr> 908</tbody> 909</table></div> 910</div> 911</div> 912<hr> 913<div class="refsect2"> 914<a name="gst-video-decoder-get-buffer-pool"></a><h3>gst_video_decoder_get_buffer_pool ()</h3> 915<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBufferPool.html#GstBufferPool-struct"><span class="returnvalue">GstBufferPool</span></a> * 916gst_video_decoder_get_buffer_pool (<em class="parameter"><code><a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a> *decoder</code></em>);</pre> 917<div class="refsect3"> 918<a name="gst-video-decoder-get-buffer-pool.parameters"></a><h4>Parameters</h4> 919<div class="informaltable"><table class="informaltable" width="100%" border="0"> 920<colgroup> 921<col width="150px" class="parameters_name"> 922<col class="parameters_description"> 923<col width="200px" class="parameters_annotations"> 924</colgroup> 925<tbody><tr> 926<td class="parameter_name"><p>decoder</p></td> 927<td class="parameter_description"><p>a <a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a></p></td> 928<td class="parameter_annotations"> </td> 929</tr></tbody> 930</table></div> 931</div> 932<div class="refsect3"> 933<a name="gst-video-decoder-get-buffer-pool.returns"></a><h4>Returns</h4> 934<p>the instance of the <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBufferPool.html#GstBufferPool-struct"><span class="type">GstBufferPool</span></a> used 935by the decoder; free it after use it. </p> 936<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> 937</div> 938</div> 939<hr> 940<div class="refsect2"> 941<a name="gst-video-decoder-drop-frame"></a><h3>gst_video_decoder_drop_frame ()</h3> 942<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a> 943gst_video_decoder_drop_frame (<em class="parameter"><code><a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a> *dec</code></em>, 944 <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideo-Codec-utility-function.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a> *frame</code></em>);</pre> 945<p>Similar to <a class="link" href="GstVideoDecoder.html#gst-video-decoder-finish-frame" title="gst_video_decoder_finish_frame ()"><code class="function">gst_video_decoder_finish_frame()</code></a>, but drops <em class="parameter"><code>frame</code></em> 946 in any 947case and posts a QoS message with the frame's details on the bus. 948In any case, the frame is considered finished and released.</p> 949<div class="refsect3"> 950<a name="gst-video-decoder-drop-frame.parameters"></a><h4>Parameters</h4> 951<div class="informaltable"><table class="informaltable" width="100%" border="0"> 952<colgroup> 953<col width="150px" class="parameters_name"> 954<col class="parameters_description"> 955<col width="200px" class="parameters_annotations"> 956</colgroup> 957<tbody> 958<tr> 959<td class="parameter_name"><p>dec</p></td> 960<td class="parameter_description"><p>a <a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a></p></td> 961<td class="parameter_annotations"> </td> 962</tr> 963<tr> 964<td class="parameter_name"><p>frame</p></td> 965<td class="parameter_description"><p>the <a class="link" href="gst-plugins-base-libs-GstVideo-Codec-utility-function.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a> to drop. </p></td> 966<td class="parameter_annotations"><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td> 967</tr> 968</tbody> 969</table></div> 970</div> 971<div class="refsect3"> 972<a name="gst-video-decoder-drop-frame.returns"></a><h4>Returns</h4> 973<p> a <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GstFlowReturn"><span class="type">GstFlowReturn</span></a>, usually GST_FLOW_OK.</p> 974</div> 975</div> 976<hr> 977<div class="refsect2"> 978<a name="gst-video-decoder-finish-frame"></a><h3>gst_video_decoder_finish_frame ()</h3> 979<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a> 980gst_video_decoder_finish_frame (<em class="parameter"><code><a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a> *decoder</code></em>, 981 <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideo-Codec-utility-function.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a> *frame</code></em>);</pre> 982<p><em class="parameter"><code>frame</code></em> 983 should have a valid decoded data buffer, whose metadata fields 984are then appropriately set according to frame data and pushed downstream. 985If no output data is provided, <em class="parameter"><code>frame</code></em> 986 is considered skipped. 987In any case, the frame is considered finished and released.</p> 988<p>After calling this function the output buffer of the frame is to be 989considered read-only. This function will also change the metadata 990of the buffer.</p> 991<div class="refsect3"> 992<a name="gst-video-decoder-finish-frame.parameters"></a><h4>Parameters</h4> 993<div class="informaltable"><table class="informaltable" width="100%" border="0"> 994<colgroup> 995<col width="150px" class="parameters_name"> 996<col class="parameters_description"> 997<col width="200px" class="parameters_annotations"> 998</colgroup> 999<tbody> 1000<tr> 1001<td class="parameter_name"><p>decoder</p></td> 1002<td class="parameter_description"><p>a <a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a></p></td> 1003<td class="parameter_annotations"> </td> 1004</tr> 1005<tr> 1006<td class="parameter_name"><p>frame</p></td> 1007<td class="parameter_description"><p>a decoded <a class="link" href="gst-plugins-base-libs-GstVideo-Codec-utility-function.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a>. </p></td> 1008<td class="parameter_annotations"><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td> 1009</tr> 1010</tbody> 1011</table></div> 1012</div> 1013<div class="refsect3"> 1014<a name="gst-video-decoder-finish-frame.returns"></a><h4>Returns</h4> 1015<p> a <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GstFlowReturn"><span class="type">GstFlowReturn</span></a> resulting from sending data downstream</p> 1016</div> 1017</div> 1018<hr> 1019<div class="refsect2"> 1020<a name="gst-video-decoder-release-frame"></a><h3>gst_video_decoder_release_frame ()</h3> 1021<pre class="programlisting"><span class="returnvalue">void</span> 1022gst_video_decoder_release_frame (<em class="parameter"><code><a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a> *dec</code></em>, 1023 <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideo-Codec-utility-function.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a> *frame</code></em>);</pre> 1024<p>Similar to <a class="link" href="GstVideoDecoder.html#gst-video-decoder-drop-frame" title="gst_video_decoder_drop_frame ()"><code class="function">gst_video_decoder_drop_frame()</code></a>, but simply releases <em class="parameter"><code>frame</code></em> 1025 1026without any processing other than removing it from list of pending frames, 1027after which it is considered finished and released.</p> 1028<div class="refsect3"> 1029<a name="gst-video-decoder-release-frame.parameters"></a><h4>Parameters</h4> 1030<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1031<colgroup> 1032<col width="150px" class="parameters_name"> 1033<col class="parameters_description"> 1034<col width="200px" class="parameters_annotations"> 1035</colgroup> 1036<tbody> 1037<tr> 1038<td class="parameter_name"><p>dec</p></td> 1039<td class="parameter_description"><p>a <a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a></p></td> 1040<td class="parameter_annotations"> </td> 1041</tr> 1042<tr> 1043<td class="parameter_name"><p>frame</p></td> 1044<td class="parameter_description"><p>the <a class="link" href="gst-plugins-base-libs-GstVideo-Codec-utility-function.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a> to release. </p></td> 1045<td class="parameter_annotations"><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td> 1046</tr> 1047</tbody> 1048</table></div> 1049</div> 1050<p class="since">Since: <a class="link" href="ix12.html#api-index-1.2.2">1.2.2</a></p> 1051</div> 1052<hr> 1053<div class="refsect2"> 1054<a name="gst-video-decoder-negotiate"></a><h3>gst_video_decoder_negotiate ()</h3> 1055<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 1056gst_video_decoder_negotiate (<em class="parameter"><code><a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a> *decoder</code></em>);</pre> 1057<p>Negotiate with downstream elements to currently configured <a class="link" href="gst-plugins-base-libs-GstVideo-Codec-utility-function.html#GstVideoCodecState" title="struct GstVideoCodecState"><span class="type">GstVideoCodecState</span></a>. 1058Unmark GST_PAD_FLAG_NEED_RECONFIGURE in any case. But mark it again if 1059negotiate fails.</p> 1060<div class="refsect3"> 1061<a name="gst-video-decoder-negotiate.parameters"></a><h4>Parameters</h4> 1062<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1063<colgroup> 1064<col width="150px" class="parameters_name"> 1065<col class="parameters_description"> 1066<col width="200px" class="parameters_annotations"> 1067</colgroup> 1068<tbody><tr> 1069<td class="parameter_name"><p>decoder</p></td> 1070<td class="parameter_description"><p>a <a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a></p></td> 1071<td class="parameter_annotations"> </td> 1072</tr></tbody> 1073</table></div> 1074</div> 1075<div class="refsect3"> 1076<a name="gst-video-decoder-negotiate.returns"></a><h4>Returns</h4> 1077<p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the negotiation succeeded, else <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p> 1078</div> 1079</div> 1080<hr> 1081<div class="refsect2"> 1082<a name="gst-video-decoder-get-frame"></a><h3>gst_video_decoder_get_frame ()</h3> 1083<pre class="programlisting"><a class="link" href="gst-plugins-base-libs-GstVideo-Codec-utility-function.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="returnvalue">GstVideoCodecFrame</span></a> * 1084gst_video_decoder_get_frame (<em class="parameter"><code><a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a> *decoder</code></em>, 1085 <em class="parameter"><code><span class="type">int</span> frame_number</code></em>);</pre> 1086<p>Get a pending unfinished <a class="link" href="gst-plugins-base-libs-GstVideo-Codec-utility-function.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a></p> 1087<div class="refsect3"> 1088<a name="gst-video-decoder-get-frame.parameters"></a><h4>Parameters</h4> 1089<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1090<colgroup> 1091<col width="150px" class="parameters_name"> 1092<col class="parameters_description"> 1093<col width="200px" class="parameters_annotations"> 1094</colgroup> 1095<tbody> 1096<tr> 1097<td class="parameter_name"><p>decoder</p></td> 1098<td class="parameter_description"><p>a <a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a></p></td> 1099<td class="parameter_annotations"> </td> 1100</tr> 1101<tr> 1102<td class="parameter_name"><p>frame_number</p></td> 1103<td class="parameter_description"><p>system_frame_number of a frame</p></td> 1104<td class="parameter_annotations"> </td> 1105</tr> 1106</tbody> 1107</table></div> 1108</div> 1109<div class="refsect3"> 1110<a name="gst-video-decoder-get-frame.returns"></a><h4>Returns</h4> 1111<p>pending unfinished <a class="link" href="gst-plugins-base-libs-GstVideo-Codec-utility-function.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a> identified by <em class="parameter"><code>frame_number</code></em> 1112. </p> 1113<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> 1114</div> 1115</div> 1116<hr> 1117<div class="refsect2"> 1118<a name="gst-video-decoder-get-frames"></a><h3>gst_video_decoder_get_frames ()</h3> 1119<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * 1120gst_video_decoder_get_frames (<em class="parameter"><code><a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a> *decoder</code></em>);</pre> 1121<p>Get all pending unfinished <a class="link" href="gst-plugins-base-libs-GstVideo-Codec-utility-function.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a></p> 1122<div class="refsect3"> 1123<a name="gst-video-decoder-get-frames.parameters"></a><h4>Parameters</h4> 1124<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1125<colgroup> 1126<col width="150px" class="parameters_name"> 1127<col class="parameters_description"> 1128<col width="200px" class="parameters_annotations"> 1129</colgroup> 1130<tbody><tr> 1131<td class="parameter_name"><p>decoder</p></td> 1132<td class="parameter_description"><p>a <a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a></p></td> 1133<td class="parameter_annotations"> </td> 1134</tr></tbody> 1135</table></div> 1136</div> 1137<div class="refsect3"> 1138<a name="gst-video-decoder-get-frames.returns"></a><h4>Returns</h4> 1139<p>pending unfinished <a class="link" href="gst-plugins-base-libs-GstVideo-Codec-utility-function.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a>. </p> 1140<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GstVideoCodecFrame]</span></p> 1141</div> 1142</div> 1143<hr> 1144<div class="refsect2"> 1145<a name="gst-video-decoder-get-max-decode-time"></a><h3>gst_video_decoder_get_max_decode_time ()</h3> 1146<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstClock.html#GstClockTimeDiff"><span class="returnvalue">GstClockTimeDiff</span></a> 1147gst_video_decoder_get_max_decode_time (<em class="parameter"><code><a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a> *decoder</code></em>, 1148 <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideo-Codec-utility-function.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a> *frame</code></em>);</pre> 1149<p>Determines maximum possible decoding time for <em class="parameter"><code>frame</code></em> 1150 that will 1151allow it to decode and arrive in time (as determined by QoS events). 1152In particular, a negative result means decoding in time is no longer possible 1153and should therefore occur as soon/skippy as possible.</p> 1154<div class="refsect3"> 1155<a name="gst-video-decoder-get-max-decode-time.parameters"></a><h4>Parameters</h4> 1156<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1157<colgroup> 1158<col width="150px" class="parameters_name"> 1159<col class="parameters_description"> 1160<col width="200px" class="parameters_annotations"> 1161</colgroup> 1162<tbody> 1163<tr> 1164<td class="parameter_name"><p>decoder</p></td> 1165<td class="parameter_description"><p>a <a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a></p></td> 1166<td class="parameter_annotations"> </td> 1167</tr> 1168<tr> 1169<td class="parameter_name"><p>frame</p></td> 1170<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstVideo-Codec-utility-function.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a></p></td> 1171<td class="parameter_annotations"> </td> 1172</tr> 1173</tbody> 1174</table></div> 1175</div> 1176<div class="refsect3"> 1177<a name="gst-video-decoder-get-max-decode-time.returns"></a><h4>Returns</h4> 1178<p> max decoding time.</p> 1179</div> 1180</div> 1181<hr> 1182<div class="refsect2"> 1183<a name="gst-video-decoder-get-max-errors"></a><h3>gst_video_decoder_get_max_errors ()</h3> 1184<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> 1185gst_video_decoder_get_max_errors (<em class="parameter"><code><a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a> *dec</code></em>);</pre> 1186<div class="refsect3"> 1187<a name="gst-video-decoder-get-max-errors.parameters"></a><h4>Parameters</h4> 1188<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1189<colgroup> 1190<col width="150px" class="parameters_name"> 1191<col class="parameters_description"> 1192<col width="200px" class="parameters_annotations"> 1193</colgroup> 1194<tbody><tr> 1195<td class="parameter_name"><p>dec</p></td> 1196<td class="parameter_description"><p>a <a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a></p></td> 1197<td class="parameter_annotations"> </td> 1198</tr></tbody> 1199</table></div> 1200</div> 1201<div class="refsect3"> 1202<a name="gst-video-decoder-get-max-errors.returns"></a><h4>Returns</h4> 1203<p> currently configured decoder tolerated error count.</p> 1204</div> 1205</div> 1206<hr> 1207<div class="refsect2"> 1208<a name="gst-video-decoder-get-oldest-frame"></a><h3>gst_video_decoder_get_oldest_frame ()</h3> 1209<pre class="programlisting"><a class="link" href="gst-plugins-base-libs-GstVideo-Codec-utility-function.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="returnvalue">GstVideoCodecFrame</span></a> * 1210gst_video_decoder_get_oldest_frame (<em class="parameter"><code><a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a> *decoder</code></em>);</pre> 1211<p>Get the oldest pending unfinished <a class="link" href="gst-plugins-base-libs-GstVideo-Codec-utility-function.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a></p> 1212<div class="refsect3"> 1213<a name="gst-video-decoder-get-oldest-frame.parameters"></a><h4>Parameters</h4> 1214<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1215<colgroup> 1216<col width="150px" class="parameters_name"> 1217<col class="parameters_description"> 1218<col width="200px" class="parameters_annotations"> 1219</colgroup> 1220<tbody><tr> 1221<td class="parameter_name"><p>decoder</p></td> 1222<td class="parameter_description"><p>a <a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a></p></td> 1223<td class="parameter_annotations"> </td> 1224</tr></tbody> 1225</table></div> 1226</div> 1227<div class="refsect3"> 1228<a name="gst-video-decoder-get-oldest-frame.returns"></a><h4>Returns</h4> 1229<p>oldest pending unfinished <a class="link" href="gst-plugins-base-libs-GstVideo-Codec-utility-function.html#GstVideoCodecFrame" title="struct GstVideoCodecFrame"><span class="type">GstVideoCodecFrame</span></a>. </p> 1230<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> 1231</div> 1232</div> 1233<hr> 1234<div class="refsect2"> 1235<a name="gst-video-decoder-get-packetized"></a><h3>gst_video_decoder_get_packetized ()</h3> 1236<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 1237gst_video_decoder_get_packetized (<em class="parameter"><code><a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a> *decoder</code></em>);</pre> 1238<p>Queries whether input data is considered packetized or not by the 1239base class.</p> 1240<div class="refsect3"> 1241<a name="gst-video-decoder-get-packetized.parameters"></a><h4>Parameters</h4> 1242<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1243<colgroup> 1244<col width="150px" class="parameters_name"> 1245<col class="parameters_description"> 1246<col width="200px" class="parameters_annotations"> 1247</colgroup> 1248<tbody><tr> 1249<td class="parameter_name"><p>decoder</p></td> 1250<td class="parameter_description"><p>a <a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a></p></td> 1251<td class="parameter_annotations"> </td> 1252</tr></tbody> 1253</table></div> 1254</div> 1255<div class="refsect3"> 1256<a name="gst-video-decoder-get-packetized.returns"></a><h4>Returns</h4> 1257<p> TRUE if input data is considered packetized.</p> 1258</div> 1259</div> 1260<hr> 1261<div class="refsect2"> 1262<a name="gst-video-decoder-get-pending-frame-size"></a><h3>gst_video_decoder_get_pending_frame_size ()</h3> 1263<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"><span class="returnvalue">gsize</span></a> 1264gst_video_decoder_get_pending_frame_size 1265 (<em class="parameter"><code><a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a> *decoder</code></em>);</pre> 1266<p>Returns the number of bytes previously added to the current frame 1267by calling <a class="link" href="GstVideoDecoder.html#gst-video-decoder-add-to-frame" title="gst_video_decoder_add_to_frame ()"><code class="function">gst_video_decoder_add_to_frame()</code></a>.</p> 1268<div class="refsect3"> 1269<a name="gst-video-decoder-get-pending-frame-size.parameters"></a><h4>Parameters</h4> 1270<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1271<colgroup> 1272<col width="150px" class="parameters_name"> 1273<col class="parameters_description"> 1274<col width="200px" class="parameters_annotations"> 1275</colgroup> 1276<tbody><tr> 1277<td class="parameter_name"><p>decoder</p></td> 1278<td class="parameter_description"><p>a <a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a></p></td> 1279<td class="parameter_annotations"> </td> 1280</tr></tbody> 1281</table></div> 1282</div> 1283<div class="refsect3"> 1284<a name="gst-video-decoder-get-pending-frame-size.returns"></a><h4>Returns</h4> 1285<p> The number of bytes pending for the current frame</p> 1286</div> 1287<p class="since">Since: <a class="link" href="ix11.html#api-index-1.4">1.4</a></p> 1288</div> 1289<hr> 1290<div class="refsect2"> 1291<a name="gst-video-decoder-get-qos-proportion"></a><h3>gst_video_decoder_get_qos_proportion ()</h3> 1292<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a> 1293gst_video_decoder_get_qos_proportion (<em class="parameter"><code><a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a> *decoder</code></em>);</pre> 1294<div class="refsect3"> 1295<a name="gst-video-decoder-get-qos-proportion.parameters"></a><h4>Parameters</h4> 1296<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1297<colgroup> 1298<col width="150px" class="parameters_name"> 1299<col class="parameters_description"> 1300<col width="200px" class="parameters_annotations"> 1301</colgroup> 1302<tbody><tr> 1303<td class="parameter_name"><p>decoder</p></td> 1304<td class="parameter_description"><p>a <a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a> 1305current QoS proportion, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td> 1306<td class="parameter_annotations"> </td> 1307</tr></tbody> 1308</table></div> 1309</div> 1310<div class="refsect3"> 1311<a name="gst-video-decoder-get-qos-proportion.returns"></a><h4>Returns</h4> 1312<p> The current QoS proportion.</p> 1313</div> 1314<p class="since">Since: <a class="link" href="ix15.html#api-index-1.0.3">1.0.3</a></p> 1315</div> 1316<hr> 1317<div class="refsect2"> 1318<a name="gst-video-decoder-have-frame"></a><h3>gst_video_decoder_have_frame ()</h3> 1319<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a> 1320gst_video_decoder_have_frame (<em class="parameter"><code><a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a> *decoder</code></em>);</pre> 1321<p>Gathers all data collected for currently parsed frame, gathers corresponding 1322metadata and passes it along for further processing, i.e. <em class="parameter"><code>handle_frame</code></em> 1323.</p> 1324<div class="refsect3"> 1325<a name="gst-video-decoder-have-frame.parameters"></a><h4>Parameters</h4> 1326<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1327<colgroup> 1328<col width="150px" class="parameters_name"> 1329<col class="parameters_description"> 1330<col width="200px" class="parameters_annotations"> 1331</colgroup> 1332<tbody><tr> 1333<td class="parameter_name"><p>decoder</p></td> 1334<td class="parameter_description"><p>a <a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a></p></td> 1335<td class="parameter_annotations"> </td> 1336</tr></tbody> 1337</table></div> 1338</div> 1339<div class="refsect3"> 1340<a name="gst-video-decoder-have-frame.returns"></a><h4>Returns</h4> 1341<p> a <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GstFlowReturn"><span class="type">GstFlowReturn</span></a></p> 1342</div> 1343</div> 1344<hr> 1345<div class="refsect2"> 1346<a name="gst-video-decoder-get-latency"></a><h3>gst_video_decoder_get_latency ()</h3> 1347<pre class="programlisting"><span class="returnvalue">void</span> 1348gst_video_decoder_get_latency (<em class="parameter"><code><a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a> *decoder</code></em>, 1349 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> *min_latency</code></em>, 1350 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> *max_latency</code></em>);</pre> 1351<p>Query the configured decoder latency. Results will be returned via 1352<em class="parameter"><code>min_latency</code></em> 1353 and <em class="parameter"><code>max_latency</code></em> 1354.</p> 1355<div class="refsect3"> 1356<a name="gst-video-decoder-get-latency.parameters"></a><h4>Parameters</h4> 1357<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1358<colgroup> 1359<col width="150px" class="parameters_name"> 1360<col class="parameters_description"> 1361<col width="200px" class="parameters_annotations"> 1362</colgroup> 1363<tbody> 1364<tr> 1365<td class="parameter_name"><p>decoder</p></td> 1366<td class="parameter_description"><p>a <a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a></p></td> 1367<td class="parameter_annotations"> </td> 1368</tr> 1369<tr> 1370<td class="parameter_name"><p>min_latency</p></td> 1371<td class="parameter_description"><p>address of variable in which to store the 1372configured minimum latency, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td> 1373<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> 1374</tr> 1375<tr> 1376<td class="parameter_name"><p>max_latency</p></td> 1377<td class="parameter_description"><p>address of variable in which to store the 1378configured mximum latency, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td> 1379<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> 1380</tr> 1381</tbody> 1382</table></div> 1383</div> 1384</div> 1385<hr> 1386<div class="refsect2"> 1387<a name="gst-video-decoder-set-latency"></a><h3>gst_video_decoder_set_latency ()</h3> 1388<pre class="programlisting"><span class="returnvalue">void</span> 1389gst_video_decoder_set_latency (<em class="parameter"><code><a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a> *decoder</code></em>, 1390 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> min_latency</code></em>, 1391 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> max_latency</code></em>);</pre> 1392<p>Lets <a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a> sub-classes tell the baseclass what the decoder 1393latency is. Will also post a LATENCY message on the bus so the pipeline 1394can reconfigure its global latency.</p> 1395<div class="refsect3"> 1396<a name="gst-video-decoder-set-latency.parameters"></a><h4>Parameters</h4> 1397<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1398<colgroup> 1399<col width="150px" class="parameters_name"> 1400<col class="parameters_description"> 1401<col width="200px" class="parameters_annotations"> 1402</colgroup> 1403<tbody> 1404<tr> 1405<td class="parameter_name"><p>decoder</p></td> 1406<td class="parameter_description"><p>a <a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a></p></td> 1407<td class="parameter_annotations"> </td> 1408</tr> 1409<tr> 1410<td class="parameter_name"><p>min_latency</p></td> 1411<td class="parameter_description"><p>minimum latency</p></td> 1412<td class="parameter_annotations"> </td> 1413</tr> 1414<tr> 1415<td class="parameter_name"><p>max_latency</p></td> 1416<td class="parameter_description"><p>maximum latency</p></td> 1417<td class="parameter_annotations"> </td> 1418</tr> 1419</tbody> 1420</table></div> 1421</div> 1422</div> 1423<hr> 1424<div class="refsect2"> 1425<a name="gst-video-decoder-get-estimate-rate"></a><h3>gst_video_decoder_get_estimate_rate ()</h3> 1426<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> 1427gst_video_decoder_get_estimate_rate (<em class="parameter"><code><a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a> *dec</code></em>);</pre> 1428<div class="refsect3"> 1429<a name="gst-video-decoder-get-estimate-rate.parameters"></a><h4>Parameters</h4> 1430<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1431<colgroup> 1432<col width="150px" class="parameters_name"> 1433<col class="parameters_description"> 1434<col width="200px" class="parameters_annotations"> 1435</colgroup> 1436<tbody><tr> 1437<td class="parameter_name"><p>dec</p></td> 1438<td class="parameter_description"><p>a <a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a></p></td> 1439<td class="parameter_annotations"> </td> 1440</tr></tbody> 1441</table></div> 1442</div> 1443<div class="refsect3"> 1444<a name="gst-video-decoder-get-estimate-rate.returns"></a><h4>Returns</h4> 1445<p> currently configured byte to time conversion setting</p> 1446</div> 1447</div> 1448<hr> 1449<div class="refsect2"> 1450<a name="gst-video-decoder-get-output-state"></a><h3>gst_video_decoder_get_output_state ()</h3> 1451<pre class="programlisting"><a class="link" href="gst-plugins-base-libs-GstVideo-Codec-utility-function.html#GstVideoCodecState" title="struct GstVideoCodecState"><span class="returnvalue">GstVideoCodecState</span></a> * 1452gst_video_decoder_get_output_state (<em class="parameter"><code><a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a> *decoder</code></em>);</pre> 1453<p>Get the <a class="link" href="gst-plugins-base-libs-GstVideo-Codec-utility-function.html#GstVideoCodecState" title="struct GstVideoCodecState"><span class="type">GstVideoCodecState</span></a> currently describing the output stream.</p> 1454<div class="refsect3"> 1455<a name="gst-video-decoder-get-output-state.parameters"></a><h4>Parameters</h4> 1456<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1457<colgroup> 1458<col width="150px" class="parameters_name"> 1459<col class="parameters_description"> 1460<col width="200px" class="parameters_annotations"> 1461</colgroup> 1462<tbody><tr> 1463<td class="parameter_name"><p>decoder</p></td> 1464<td class="parameter_description"><p>a <a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a></p></td> 1465<td class="parameter_annotations"> </td> 1466</tr></tbody> 1467</table></div> 1468</div> 1469<div class="refsect3"> 1470<a name="gst-video-decoder-get-output-state.returns"></a><h4>Returns</h4> 1471<p><a class="link" href="gst-plugins-base-libs-GstVideo-Codec-utility-function.html#GstVideoCodecState" title="struct GstVideoCodecState"><span class="type">GstVideoCodecState</span></a> describing format of video data. </p> 1472<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> 1473</div> 1474</div> 1475<hr> 1476<div class="refsect2"> 1477<a name="gst-video-decoder-set-estimate-rate"></a><h3>gst_video_decoder_set_estimate_rate ()</h3> 1478<pre class="programlisting"><span class="returnvalue">void</span> 1479gst_video_decoder_set_estimate_rate (<em class="parameter"><code><a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a> *dec</code></em>, 1480 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> enabled</code></em>);</pre> 1481<p>Allows baseclass to perform byte to time estimated conversion.</p> 1482<div class="refsect3"> 1483<a name="gst-video-decoder-set-estimate-rate.parameters"></a><h4>Parameters</h4> 1484<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1485<colgroup> 1486<col width="150px" class="parameters_name"> 1487<col class="parameters_description"> 1488<col width="200px" class="parameters_annotations"> 1489</colgroup> 1490<tbody> 1491<tr> 1492<td class="parameter_name"><p>dec</p></td> 1493<td class="parameter_description"><p>a <a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a></p></td> 1494<td class="parameter_annotations"> </td> 1495</tr> 1496<tr> 1497<td class="parameter_name"><p>enabled</p></td> 1498<td class="parameter_description"><p>whether to enable byte to time conversion</p></td> 1499<td class="parameter_annotations"> </td> 1500</tr> 1501</tbody> 1502</table></div> 1503</div> 1504</div> 1505<hr> 1506<div class="refsect2"> 1507<a name="gst-video-decoder-set-output-state"></a><h3>gst_video_decoder_set_output_state ()</h3> 1508<pre class="programlisting"><a class="link" href="gst-plugins-base-libs-GstVideo-Codec-utility-function.html#GstVideoCodecState" title="struct GstVideoCodecState"><span class="returnvalue">GstVideoCodecState</span></a> * 1509gst_video_decoder_set_output_state (<em class="parameter"><code><a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a> *decoder</code></em>, 1510 <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideo.html#GstVideoFormat" title="enum GstVideoFormat"><span class="type">GstVideoFormat</span></a> fmt</code></em>, 1511 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> width</code></em>, 1512 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> height</code></em>, 1513 <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideo-Codec-utility-function.html#GstVideoCodecState" title="struct GstVideoCodecState"><span class="type">GstVideoCodecState</span></a> *reference</code></em>);</pre> 1514<p>Creates a new <a class="link" href="gst-plugins-base-libs-GstVideo-Codec-utility-function.html#GstVideoCodecState" title="struct GstVideoCodecState"><span class="type">GstVideoCodecState</span></a> with the specified <em class="parameter"><code>fmt</code></em> 1515, <em class="parameter"><code>width</code></em> 1516 and <em class="parameter"><code>height</code></em> 1517 1518as the output state for the decoder. 1519Any previously set output state on <em class="parameter"><code>decoder</code></em> 1520 will be replaced by the newly 1521created one.</p> 1522<p>If the subclass wishes to copy over existing fields (like pixel aspec ratio, 1523or framerate) from an existing <a class="link" href="gst-plugins-base-libs-GstVideo-Codec-utility-function.html#GstVideoCodecState" title="struct GstVideoCodecState"><span class="type">GstVideoCodecState</span></a>, it can be provided as a 1524<em class="parameter"><code>reference</code></em> 1525.</p> 1526<p>If the subclass wishes to override some fields from the output state (like 1527pixel-aspect-ratio or framerate) it can do so on the returned <a class="link" href="gst-plugins-base-libs-GstVideo-Codec-utility-function.html#GstVideoCodecState" title="struct GstVideoCodecState"><span class="type">GstVideoCodecState</span></a>.</p> 1528<p>The new output state will only take effect (set on pads and buffers) starting 1529from the next call to <a class="link" href="GstVideoDecoder.html#gst-video-decoder-finish-frame" title="gst_video_decoder_finish_frame ()"><code class="function">gst_video_decoder_finish_frame()</code></a>.</p> 1530<div class="refsect3"> 1531<a name="gst-video-decoder-set-output-state.parameters"></a><h4>Parameters</h4> 1532<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1533<colgroup> 1534<col width="150px" class="parameters_name"> 1535<col class="parameters_description"> 1536<col width="200px" class="parameters_annotations"> 1537</colgroup> 1538<tbody> 1539<tr> 1540<td class="parameter_name"><p>decoder</p></td> 1541<td class="parameter_description"><p>a <a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a></p></td> 1542<td class="parameter_annotations"> </td> 1543</tr> 1544<tr> 1545<td class="parameter_name"><p>fmt</p></td> 1546<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstVideo.html#GstVideoFormat" title="enum GstVideoFormat"><span class="type">GstVideoFormat</span></a></p></td> 1547<td class="parameter_annotations"> </td> 1548</tr> 1549<tr> 1550<td class="parameter_name"><p>width</p></td> 1551<td class="parameter_description"><p>The width in pixels</p></td> 1552<td class="parameter_annotations"> </td> 1553</tr> 1554<tr> 1555<td class="parameter_name"><p>height</p></td> 1556<td class="parameter_description"><p>The height in pixels</p></td> 1557<td class="parameter_annotations"> </td> 1558</tr> 1559<tr> 1560<td class="parameter_name"><p>reference</p></td> 1561<td class="parameter_description"><p>An optional reference <a class="link" href="gst-plugins-base-libs-GstVideo-Codec-utility-function.html#GstVideoCodecState" title="struct GstVideoCodecState"><span class="type">GstVideoCodecState</span></a>. </p></td> 1562<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td> 1563</tr> 1564</tbody> 1565</table></div> 1566</div> 1567<div class="refsect3"> 1568<a name="gst-video-decoder-set-output-state.returns"></a><h4>Returns</h4> 1569<p>the newly configured output state. </p> 1570<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> 1571</div> 1572</div> 1573<hr> 1574<div class="refsect2"> 1575<a name="gst-video-decoder-set-interlaced-output-state"></a><h3>gst_video_decoder_set_interlaced_output_state ()</h3> 1576<pre class="programlisting"><a class="link" href="gst-plugins-base-libs-GstVideo-Codec-utility-function.html#GstVideoCodecState" title="struct GstVideoCodecState"><span class="returnvalue">GstVideoCodecState</span></a> * 1577gst_video_decoder_set_interlaced_output_state 1578 (<em class="parameter"><code><a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a> *decoder</code></em>, 1579 <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideo.html#GstVideoFormat" title="enum GstVideoFormat"><span class="type">GstVideoFormat</span></a> fmt</code></em>, 1580 <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideo.html#GstVideoInterlaceMode" title="enum GstVideoInterlaceMode"><span class="type">GstVideoInterlaceMode</span></a> mode</code></em>, 1581 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> width</code></em>, 1582 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> height</code></em>, 1583 <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstVideo-Codec-utility-function.html#GstVideoCodecState" title="struct GstVideoCodecState"><span class="type">GstVideoCodecState</span></a> *reference</code></em>);</pre> 1584<p>Same as <a class="link" href="GstVideoDecoder.html#gst-video-decoder-set-output-state" title="gst_video_decoder_set_output_state ()"><code class="function">gst_video_decoder_set_output_state()</code></a> but also allows you to also set 1585the interlacing mode.</p> 1586<div class="refsect3"> 1587<a name="gst-video-decoder-set-interlaced-output-state.parameters"></a><h4>Parameters</h4> 1588<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1589<colgroup> 1590<col width="150px" class="parameters_name"> 1591<col class="parameters_description"> 1592<col width="200px" class="parameters_annotations"> 1593</colgroup> 1594<tbody> 1595<tr> 1596<td class="parameter_name"><p>decoder</p></td> 1597<td class="parameter_description"><p>a <a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a></p></td> 1598<td class="parameter_annotations"> </td> 1599</tr> 1600<tr> 1601<td class="parameter_name"><p>fmt</p></td> 1602<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstVideo.html#GstVideoFormat" title="enum GstVideoFormat"><span class="type">GstVideoFormat</span></a></p></td> 1603<td class="parameter_annotations"> </td> 1604</tr> 1605<tr> 1606<td class="parameter_name"><p>width</p></td> 1607<td class="parameter_description"><p>The width in pixels</p></td> 1608<td class="parameter_annotations"> </td> 1609</tr> 1610<tr> 1611<td class="parameter_name"><p>height</p></td> 1612<td class="parameter_description"><p>The height in pixels</p></td> 1613<td class="parameter_annotations"> </td> 1614</tr> 1615<tr> 1616<td class="parameter_name"><p>mode</p></td> 1617<td class="parameter_description"><p>A <a class="link" href="gst-plugins-base-libs-GstVideo.html#GstVideoInterlaceMode" title="enum GstVideoInterlaceMode"><span class="type">GstVideoInterlaceMode</span></a></p></td> 1618<td class="parameter_annotations"> </td> 1619</tr> 1620<tr> 1621<td class="parameter_name"><p>reference</p></td> 1622<td class="parameter_description"><p>An optional reference <a class="link" href="gst-plugins-base-libs-GstVideo-Codec-utility-function.html#GstVideoCodecState" title="struct GstVideoCodecState"><span class="type">GstVideoCodecState</span></a>. </p></td> 1623<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td> 1624</tr> 1625</tbody> 1626</table></div> 1627</div> 1628<div class="refsect3"> 1629<a name="gst-video-decoder-set-interlaced-output-state.returns"></a><h4>Returns</h4> 1630<p>the newly configured output state. </p> 1631<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> 1632</div> 1633<p class="since">Since: 1.16.</p> 1634</div> 1635<hr> 1636<div class="refsect2"> 1637<a name="gst-video-decoder-set-max-errors"></a><h3>gst_video_decoder_set_max_errors ()</h3> 1638<pre class="programlisting"><span class="returnvalue">void</span> 1639gst_video_decoder_set_max_errors (<em class="parameter"><code><a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a> *dec</code></em>, 1640 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> num</code></em>);</pre> 1641<p>Sets numbers of tolerated decoder errors, where a tolerated one is then only 1642warned about, but more than tolerated will lead to fatal error. You can set 1643-1 for never returning fatal errors. Default is set to 1644GST_VIDEO_DECODER_MAX_ERRORS.</p> 1645<p>The '-1' option was added in 1.4</p> 1646<div class="refsect3"> 1647<a name="gst-video-decoder-set-max-errors.parameters"></a><h4>Parameters</h4> 1648<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1649<colgroup> 1650<col width="150px" class="parameters_name"> 1651<col class="parameters_description"> 1652<col width="200px" class="parameters_annotations"> 1653</colgroup> 1654<tbody> 1655<tr> 1656<td class="parameter_name"><p>dec</p></td> 1657<td class="parameter_description"><p>a <a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a></p></td> 1658<td class="parameter_annotations"> </td> 1659</tr> 1660<tr> 1661<td class="parameter_name"><p>num</p></td> 1662<td class="parameter_description"><p>max tolerated errors</p></td> 1663<td class="parameter_annotations"> </td> 1664</tr> 1665</tbody> 1666</table></div> 1667</div> 1668</div> 1669<hr> 1670<div class="refsect2"> 1671<a name="gst-video-decoder-set-packetized"></a><h3>gst_video_decoder_set_packetized ()</h3> 1672<pre class="programlisting"><span class="returnvalue">void</span> 1673gst_video_decoder_set_packetized (<em class="parameter"><code><a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a> *decoder</code></em>, 1674 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> packetized</code></em>);</pre> 1675<p>Allows baseclass to consider input data as packetized or not. If the 1676input is packetized, then the <em class="parameter"><code>parse</code></em> 1677 method will not be called.</p> 1678<div class="refsect3"> 1679<a name="gst-video-decoder-set-packetized.parameters"></a><h4>Parameters</h4> 1680<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1681<colgroup> 1682<col width="150px" class="parameters_name"> 1683<col class="parameters_description"> 1684<col width="200px" class="parameters_annotations"> 1685</colgroup> 1686<tbody> 1687<tr> 1688<td class="parameter_name"><p>decoder</p></td> 1689<td class="parameter_description"><p>a <a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a></p></td> 1690<td class="parameter_annotations"> </td> 1691</tr> 1692<tr> 1693<td class="parameter_name"><p>packetized</p></td> 1694<td class="parameter_description"><p>whether the input data should be considered as packetized.</p></td> 1695<td class="parameter_annotations"> </td> 1696</tr> 1697</tbody> 1698</table></div> 1699</div> 1700</div> 1701<hr> 1702<div class="refsect2"> 1703<a name="gst-video-decoder-get-needs-format"></a><h3>gst_video_decoder_get_needs_format ()</h3> 1704<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 1705gst_video_decoder_get_needs_format (<em class="parameter"><code><a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a> *dec</code></em>);</pre> 1706<p>Queries decoder required format handling.</p> 1707<div class="refsect3"> 1708<a name="gst-video-decoder-get-needs-format.parameters"></a><h4>Parameters</h4> 1709<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1710<colgroup> 1711<col width="150px" class="parameters_name"> 1712<col class="parameters_description"> 1713<col width="200px" class="parameters_annotations"> 1714</colgroup> 1715<tbody><tr> 1716<td class="parameter_name"><p>dec</p></td> 1717<td class="parameter_description"><p>a <a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a></p></td> 1718<td class="parameter_annotations"> </td> 1719</tr></tbody> 1720</table></div> 1721</div> 1722<div class="refsect3"> 1723<a name="gst-video-decoder-get-needs-format.returns"></a><h4>Returns</h4> 1724<p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if required format handling is enabled.</p> 1725</div> 1726<p class="since">Since: <a class="link" href="ix11.html#api-index-1.4">1.4</a></p> 1727</div> 1728<hr> 1729<div class="refsect2"> 1730<a name="gst-video-decoder-set-needs-format"></a><h3>gst_video_decoder_set_needs_format ()</h3> 1731<pre class="programlisting"><span class="returnvalue">void</span> 1732gst_video_decoder_set_needs_format (<em class="parameter"><code><a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a> *dec</code></em>, 1733 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> enabled</code></em>);</pre> 1734<p>Configures decoder format needs. If enabled, subclass needs to be 1735negotiated with format caps before it can process any data. It will then 1736never be handed any data before it has been configured. 1737Otherwise, it might be handed data without having been configured and 1738is then expected being able to do so either by default 1739or based on the input data.</p> 1740<div class="refsect3"> 1741<a name="gst-video-decoder-set-needs-format.parameters"></a><h4>Parameters</h4> 1742<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1743<colgroup> 1744<col width="150px" class="parameters_name"> 1745<col class="parameters_description"> 1746<col width="200px" class="parameters_annotations"> 1747</colgroup> 1748<tbody> 1749<tr> 1750<td class="parameter_name"><p>dec</p></td> 1751<td class="parameter_description"><p>a <a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a></p></td> 1752<td class="parameter_annotations"> </td> 1753</tr> 1754<tr> 1755<td class="parameter_name"><p>enabled</p></td> 1756<td class="parameter_description"><p>new state</p></td> 1757<td class="parameter_annotations"> </td> 1758</tr> 1759</tbody> 1760</table></div> 1761</div> 1762<p class="since">Since: <a class="link" href="ix11.html#api-index-1.4">1.4</a></p> 1763</div> 1764<hr> 1765<div class="refsect2"> 1766<a name="gst-video-decoder-merge-tags"></a><h3>gst_video_decoder_merge_tags ()</h3> 1767<pre class="programlisting"><span class="returnvalue">void</span> 1768gst_video_decoder_merge_tags (<em class="parameter"><code><a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a> *decoder</code></em>, 1769 <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstTagList.html#GstTagList-struct"><span class="type">GstTagList</span></a> *tags</code></em>, 1770 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstTagList.html#GstTagMergeMode"><span class="type">GstTagMergeMode</span></a> mode</code></em>);</pre> 1771<p>Sets the audio decoder tags and how they should be merged with any 1772upstream stream tags. This will override any tags previously-set 1773with <a class="link" href="GstAudioDecoder.html#gst-audio-decoder-merge-tags" title="gst_audio_decoder_merge_tags ()"><code class="function">gst_audio_decoder_merge_tags()</code></a>.</p> 1774<p>Note that this is provided for convenience, and the subclass is 1775not required to use this and can still do tag handling on its own.</p> 1776<p>MT safe.</p> 1777<div class="refsect3"> 1778<a name="gst-video-decoder-merge-tags.parameters"></a><h4>Parameters</h4> 1779<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1780<colgroup> 1781<col width="150px" class="parameters_name"> 1782<col class="parameters_description"> 1783<col width="200px" class="parameters_annotations"> 1784</colgroup> 1785<tbody> 1786<tr> 1787<td class="parameter_name"><p>decoder</p></td> 1788<td class="parameter_description"><p>a <a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a></p></td> 1789<td class="parameter_annotations"> </td> 1790</tr> 1791<tr> 1792<td class="parameter_name"><p>tags</p></td> 1793<td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstTagList.html#GstTagList-struct"><span class="type">GstTagList</span></a> to merge, or NULL to unset 1794previously-set tags. </p></td> 1795<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> 1796</tr> 1797<tr> 1798<td class="parameter_name"><p>mode</p></td> 1799<td class="parameter_description"><p>the <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstTagList.html#GstTagMergeMode"><span class="type">GstTagMergeMode</span></a> to use, usually <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstTagList.html#GST-TAG-MERGE-REPLACE:CAPS"><span class="type">GST_TAG_MERGE_REPLACE</span></a></p></td> 1800<td class="parameter_annotations"> </td> 1801</tr> 1802</tbody> 1803</table></div> 1804</div> 1805</div> 1806<hr> 1807<div class="refsect2"> 1808<a name="gst-video-decoder-proxy-getcaps"></a><h3>gst_video_decoder_proxy_getcaps ()</h3> 1809<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstCaps.html#GstCaps-struct"><span class="returnvalue">GstCaps</span></a> * 1810gst_video_decoder_proxy_getcaps (<em class="parameter"><code><a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a> *decoder</code></em>, 1811 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstCaps.html#GstCaps-struct"><span class="type">GstCaps</span></a> *caps</code></em>, 1812 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstCaps.html#GstCaps-struct"><span class="type">GstCaps</span></a> *filter</code></em>);</pre> 1813<p>Returns caps that express <em class="parameter"><code>caps</code></em> 1814 (or sink template caps if <em class="parameter"><code>caps</code></em> 1815 == NULL) 1816restricted to resolution/format/... combinations supported by downstream 1817elements.</p> 1818<div class="refsect3"> 1819<a name="gst-video-decoder-proxy-getcaps.parameters"></a><h4>Parameters</h4> 1820<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1821<colgroup> 1822<col width="150px" class="parameters_name"> 1823<col class="parameters_description"> 1824<col width="200px" class="parameters_annotations"> 1825</colgroup> 1826<tbody> 1827<tr> 1828<td class="parameter_name"><p>decoder</p></td> 1829<td class="parameter_description"><p>a <a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a></p></td> 1830<td class="parameter_annotations"> </td> 1831</tr> 1832<tr> 1833<td class="parameter_name"><p>caps</p></td> 1834<td class="parameter_description"><p>initial caps. </p></td> 1835<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> 1836</tr> 1837<tr> 1838<td class="parameter_name"><p>filter</p></td> 1839<td class="parameter_description"><p>filter caps. </p></td> 1840<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> 1841</tr> 1842</tbody> 1843</table></div> 1844</div> 1845<div class="refsect3"> 1846<a name="gst-video-decoder-proxy-getcaps.returns"></a><h4>Returns</h4> 1847<p>a <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstCaps.html#GstCaps-struct"><span class="type">GstCaps</span></a> owned by caller. </p> 1848<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> 1849</div> 1850<p class="since">Since: <a class="link" href="ix10.html#api-index-1.6">1.6</a></p> 1851</div> 1852<hr> 1853<div class="refsect2"> 1854<a name="gst-video-decoder-set-use-default-pad-acceptcaps"></a><h3>gst_video_decoder_set_use_default_pad_acceptcaps ()</h3> 1855<pre class="programlisting"><span class="returnvalue">void</span> 1856gst_video_decoder_set_use_default_pad_acceptcaps 1857 (<em class="parameter"><code><a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a> *decoder</code></em>, 1858 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> use</code></em>);</pre> 1859<p>Lets <a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a> sub-classes decide if they want the sink pad 1860to use the default pad query handler to reply to accept-caps queries.</p> 1861<p>By setting this to true it is possible to further customize the default 1862handler with <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GST-PAD-SET-ACCEPT-INTERSECT:CAPS"><code class="literal">GST_PAD_SET_ACCEPT_INTERSECT</code></a> and 1863<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GST-PAD-SET-ACCEPT-TEMPLATE:CAPS"><code class="literal">GST_PAD_SET_ACCEPT_TEMPLATE</code></a></p> 1864<div class="refsect3"> 1865<a name="gst-video-decoder-set-use-default-pad-acceptcaps.parameters"></a><h4>Parameters</h4> 1866<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1867<colgroup> 1868<col width="150px" class="parameters_name"> 1869<col class="parameters_description"> 1870<col width="200px" class="parameters_annotations"> 1871</colgroup> 1872<tbody> 1873<tr> 1874<td class="parameter_name"><p>decoder</p></td> 1875<td class="parameter_description"><p>a <a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a></p></td> 1876<td class="parameter_annotations"> </td> 1877</tr> 1878<tr> 1879<td class="parameter_name"><p>use</p></td> 1880<td class="parameter_description"><p>if the default pad accept-caps query handling should be used</p></td> 1881<td class="parameter_annotations"> </td> 1882</tr> 1883</tbody> 1884</table></div> 1885</div> 1886<p class="since">Since: <a class="link" href="ix10.html#api-index-1.6">1.6</a></p> 1887</div> 1888</div> 1889<div class="refsect1"> 1890<a name="GstVideoDecoder.other_details"></a><h2>Types and Values</h2> 1891<div class="refsect2"> 1892<a name="GST-VIDEO-DECODER-FLOW-NEED-DATA:CAPS"></a><h3>GST_VIDEO_DECODER_FLOW_NEED_DATA</h3> 1893<pre class="programlisting">#define GST_VIDEO_DECODER_FLOW_NEED_DATA GST_FLOW_CUSTOM_SUCCESS 1894</pre> 1895<p>Returned while parsing to indicate more data is needed.</p> 1896</div> 1897<hr> 1898<div class="refsect2"> 1899<a name="GST-VIDEO-DECODER-MAX-ERRORS:CAPS"></a><h3>GST_VIDEO_DECODER_MAX_ERRORS</h3> 1900<pre class="programlisting">#define GST_VIDEO_DECODER_MAX_ERRORS 10 1901</pre> 1902<p>Default maximum number of errors tolerated before signaling error.</p> 1903</div> 1904<hr> 1905<div class="refsect2"> 1906<a name="GST-VIDEO-DECODER-SINK-NAME:CAPS"></a><h3>GST_VIDEO_DECODER_SINK_NAME</h3> 1907<pre class="programlisting">#define GST_VIDEO_DECODER_SINK_NAME "sink" 1908</pre> 1909<p>The name of the templates for the sink pad.</p> 1910</div> 1911<hr> 1912<div class="refsect2"> 1913<a name="GST-VIDEO-DECODER-SRC-NAME:CAPS"></a><h3>GST_VIDEO_DECODER_SRC_NAME</h3> 1914<pre class="programlisting">#define GST_VIDEO_DECODER_SRC_NAME "src" 1915</pre> 1916<p>The name of the templates for the source pad.</p> 1917</div> 1918<hr> 1919<div class="refsect2"> 1920<a name="GstVideoDecoder-struct"></a><h3>struct GstVideoDecoder</h3> 1921<pre class="programlisting">struct GstVideoDecoder;</pre> 1922<p>The opaque <a class="link" href="GstVideoDecoder.html" title="GstVideoDecoder"><span class="type">GstVideoDecoder</span></a> data structure.</p> 1923</div> 1924<hr> 1925<div class="refsect2"> 1926<a name="GstVideoDecoderClass"></a><h3>struct GstVideoDecoderClass</h3> 1927<pre class="programlisting">struct GstVideoDecoderClass { 1928 gboolean (*open) (GstVideoDecoder *decoder); 1929 1930 gboolean (*close) (GstVideoDecoder *decoder); 1931 1932 gboolean (*start) (GstVideoDecoder *decoder); 1933 1934 gboolean (*stop) (GstVideoDecoder *decoder); 1935 1936 GstFlowReturn (*parse) (GstVideoDecoder *decoder, 1937 GstVideoCodecFrame *frame, 1938 GstAdapter *adapter, 1939 gboolean at_eos); 1940 1941 gboolean (*set_format) (GstVideoDecoder *decoder, 1942 GstVideoCodecState * state); 1943 1944 gboolean (*reset) (GstVideoDecoder *decoder, 1945 gboolean hard); 1946 1947 GstFlowReturn (*finish) (GstVideoDecoder *decoder); 1948 1949 GstFlowReturn (*handle_frame) (GstVideoDecoder *decoder, 1950 GstVideoCodecFrame *frame); 1951 1952 gboolean (*sink_event) (GstVideoDecoder *decoder, 1953 GstEvent *event); 1954 1955 gboolean (*src_event) (GstVideoDecoder *decoder, 1956 GstEvent *event); 1957 1958 gboolean (*negotiate) (GstVideoDecoder *decoder); 1959 1960 gboolean (*decide_allocation) (GstVideoDecoder *decoder, GstQuery *query); 1961 1962 gboolean (*propose_allocation) (GstVideoDecoder *decoder, GstQuery * query); 1963 1964 gboolean (*flush) (GstVideoDecoder *decoder); 1965 1966 gboolean (*sink_query) (GstVideoDecoder *decoder, 1967 GstQuery *query); 1968 1969 gboolean (*src_query) (GstVideoDecoder *decoder, 1970 GstQuery *query); 1971 1972 GstCaps* (*getcaps) (GstVideoDecoder *decoder, 1973 GstCaps *filter); 1974 1975 GstFlowReturn (*drain) (GstVideoDecoder *decoder); 1976 1977 gboolean (*transform_meta) (GstVideoDecoder *decoder, 1978 GstVideoCodecFrame *frame, 1979 GstMeta * meta); 1980}; 1981</pre> 1982<p>Subclasses can override any of the available virtual methods or not, as 1983needed. At minimum <em class="parameter"><code>handle_frame</code></em> 1984 needs to be overridden, and <em class="parameter"><code>set_format</code></em> 1985 1986and likely as well. If non-packetized input is supported or expected, 1987<em class="parameter"><code>parse</code></em> 1988 needs to be overridden as well.</p> 1989<div class="refsect3"> 1990<a name="GstVideoDecoderClass.members"></a><h4>Members</h4> 1991<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1992<colgroup> 1993<col width="300px" class="struct_members_name"> 1994<col class="struct_members_description"> 1995<col width="200px" class="struct_members_annotations"> 1996</colgroup> 1997<tbody> 1998<tr> 1999<td class="struct_member_name"><p><em class="structfield"><code><a name="GstVideoDecoderClass.open"></a>open</code></em> ()</p></td> 2000<td class="struct_member_description"><p>Optional. 2001Called when the element changes to GST_STATE_READY. 2002Allows opening external resources.</p></td> 2003<td class="struct_member_annotations"> </td> 2004</tr> 2005<tr> 2006<td class="struct_member_name"><p><em class="structfield"><code><a name="GstVideoDecoderClass.close"></a>close</code></em> ()</p></td> 2007<td class="struct_member_description"><p>Optional. 2008Called when the element changes to GST_STATE_NULL. 2009Allows closing external resources.</p></td> 2010<td class="struct_member_annotations"> </td> 2011</tr> 2012<tr> 2013<td class="struct_member_name"><p><em class="structfield"><code><a name="GstVideoDecoderClass.start"></a>start</code></em> ()</p></td> 2014<td class="struct_member_description"><p>Optional. 2015Called when the element starts processing. 2016Allows opening external resources.</p></td> 2017<td class="struct_member_annotations"> </td> 2018</tr> 2019<tr> 2020<td class="struct_member_name"><p><em class="structfield"><code><a name="GstVideoDecoderClass.stop"></a>stop</code></em> ()</p></td> 2021<td class="struct_member_description"><p>Optional. 2022Called when the element stops processing. 2023Allows closing external resources.</p></td> 2024<td class="struct_member_annotations"> </td> 2025</tr> 2026<tr> 2027<td class="struct_member_name"><p><em class="structfield"><code><a name="GstVideoDecoderClass.parse"></a>parse</code></em> ()</p></td> 2028<td class="struct_member_description"><p>Required for non-packetized input. 2029Allows chopping incoming data into manageable units (frames) 2030for subsequent decoding.</p></td> 2031<td class="struct_member_annotations"> </td> 2032</tr> 2033<tr> 2034<td class="struct_member_name"><p><em class="structfield"><code><a name="GstVideoDecoderClass.set-format"></a>set_format</code></em> ()</p></td> 2035<td class="struct_member_description"><p>Notifies subclass of incoming data format (caps).</p></td> 2036<td class="struct_member_annotations"> </td> 2037</tr> 2038<tr> 2039<td class="struct_member_name"><p><em class="structfield"><code><a name="GstVideoDecoderClass.reset"></a>reset</code></em> ()</p></td> 2040<td class="struct_member_description"><p>Optional. 2041Allows subclass (decoder) to perform post-seek semantics reset. 2042Deprecated.</p></td> 2043<td class="struct_member_annotations"> </td> 2044</tr> 2045<tr> 2046<td class="struct_member_name"><p><em class="structfield"><code><a name="GstVideoDecoderClass.finish"></a>finish</code></em> ()</p></td> 2047<td class="struct_member_description"><p>Optional. 2048Called to request subclass to dispatch any pending remaining 2049data at EOS. Sub-classes can refuse to decode new data after.</p></td> 2050<td class="struct_member_annotations"> </td> 2051</tr> 2052<tr> 2053<td class="struct_member_name"><p><em class="structfield"><code><a name="GstVideoDecoderClass.handle-frame"></a>handle_frame</code></em> ()</p></td> 2054<td class="struct_member_description"><p>Provides input data frame to subclass.</p></td> 2055<td class="struct_member_annotations"> </td> 2056</tr> 2057<tr> 2058<td class="struct_member_name"><p><em class="structfield"><code><a name="GstVideoDecoderClass.sink-event"></a>sink_event</code></em> ()</p></td> 2059<td class="struct_member_description"><p>Optional. 2060Event handler on the sink pad. This function should return 2061TRUE if the event was handled and should be discarded 2062(i.e. not unref'ed). 2063Subclasses should chain up to the parent implementation to 2064invoke the default handler.</p></td> 2065<td class="struct_member_annotations"> </td> 2066</tr> 2067<tr> 2068<td class="struct_member_name"><p><em class="structfield"><code><a name="GstVideoDecoderClass.src-event"></a>src_event</code></em> ()</p></td> 2069<td class="struct_member_description"><p>Optional. 2070Event handler on the source pad. This function should return 2071TRUE if the event was handled and should be discarded 2072(i.e. not unref'ed). 2073Subclasses should chain up to the parent implementation to 2074invoke the default handler.</p></td> 2075<td class="struct_member_annotations"> </td> 2076</tr> 2077<tr> 2078<td class="struct_member_name"><p><em class="structfield"><code><a name="GstVideoDecoderClass.negotiate"></a>negotiate</code></em> ()</p></td> 2079<td class="struct_member_description"><p>Optional. 2080Negotiate with downstream and configure buffer pools, etc. 2081Subclasses should chain up to the parent implementation to 2082invoke the default handler.</p></td> 2083<td class="struct_member_annotations"> </td> 2084</tr> 2085<tr> 2086<td class="struct_member_name"><p><em class="structfield"><code><a name="GstVideoDecoderClass.decide-allocation"></a>decide_allocation</code></em> ()</p></td> 2087<td class="struct_member_description"><p>Optional. 2088Setup the allocation parameters for allocating output 2089buffers. The passed in query contains the result of the 2090downstream allocation query. 2091Subclasses should chain up to the parent implementation to 2092invoke the default handler.</p></td> 2093<td class="struct_member_annotations"> </td> 2094</tr> 2095<tr> 2096<td class="struct_member_name"><p><em class="structfield"><code><a name="GstVideoDecoderClass.propose-allocation"></a>propose_allocation</code></em> ()</p></td> 2097<td class="struct_member_description"><p>Optional. 2098Propose buffer allocation parameters for upstream elements. 2099Subclasses should chain up to the parent implementation to 2100invoke the default handler.</p></td> 2101<td class="struct_member_annotations"> </td> 2102</tr> 2103<tr> 2104<td class="struct_member_name"><p><em class="structfield"><code><a name="GstVideoDecoderClass.flush"></a>flush</code></em> ()</p></td> 2105<td class="struct_member_description"><p>Optional. 2106Flush all remaining data from the decoder without 2107pushing it downstream. Since: 1.2</p></td> 2108<td class="struct_member_annotations"> </td> 2109</tr> 2110<tr> 2111<td class="struct_member_name"><p><em class="structfield"><code><a name="GstVideoDecoderClass.sink-query"></a>sink_query</code></em> ()</p></td> 2112<td class="struct_member_description"><p>Optional. 2113Query handler on the sink pad. This function should 2114return TRUE if the query could be performed. Subclasses 2115should chain up to the parent implementation to invoke the 2116default handler. Since: 1.4</p></td> 2117<td class="struct_member_annotations"> </td> 2118</tr> 2119<tr> 2120<td class="struct_member_name"><p><em class="structfield"><code><a name="GstVideoDecoderClass.src-query"></a>src_query</code></em> ()</p></td> 2121<td class="struct_member_description"><p>Optional. 2122Query handler on the source pad. This function should 2123return TRUE if the query could be performed. Subclasses 2124should chain up to the parent implementation to invoke the 2125default handler. Since: 1.4</p></td> 2126<td class="struct_member_annotations"> </td> 2127</tr> 2128<tr> 2129<td class="struct_member_name"><p><em class="structfield"><code><a name="GstVideoDecoderClass.getcaps"></a>getcaps</code></em> ()</p></td> 2130<td class="struct_member_description"><p>Optional. 2131Allows for a custom sink getcaps implementation. 2132If not implemented, default returns 2133gst_video_decoder_proxy_getcaps 2134applied to sink template caps.</p></td> 2135<td class="struct_member_annotations"> </td> 2136</tr> 2137<tr> 2138<td class="struct_member_name"><p><em class="structfield"><code><a name="GstVideoDecoderClass.drain"></a>drain</code></em> ()</p></td> 2139<td class="struct_member_description"><p>Optional. 2140Called to request subclass to decode any data it can at this 2141point, but that more data may arrive after. (e.g. at segment end). 2142Sub-classes should be prepared to handle new data afterward, 2143or seamless segment processing will break. Since: 1.6</p></td> 2144<td class="struct_member_annotations"> </td> 2145</tr> 2146<tr> 2147<td class="struct_member_name"><p><em class="structfield"><code><a name="GstVideoDecoderClass.transform-meta"></a>transform_meta</code></em> ()</p></td> 2148<td class="struct_member_description"><p>Optional. Transform the metadata on the input buffer to the 2149output buffer. By default this method is copies all meta without 2150tags and meta with only the "video" tag. subclasses can 2151implement this method and return <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the metadata is to be 2152copied. Since: 1.6</p></td> 2153<td class="struct_member_annotations"> </td> 2154</tr> 2155</tbody> 2156</table></div> 2157</div> 2158</div> 2159</div> 2160</div> 2161<div class="footer"> 2162<hr>Generated by GTK-Doc V1.28</div> 2163</body> 2164</html>