blob: 71465d7c133968a9376143ccc2b953fc1b220fe1 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GstPushSrc: GStreamer 1.0 Library Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="GStreamer 1.0 Library Reference Manual">
<link rel="up" href="gstreamer-base.html" title="GStreamer Base and Utillity Classes">
<link rel="prev" href="GstBaseTransform.html" title="GstBaseTransform">
<link rel="next" href="GstAdapter.html" title="GstAdapter">
<meta name="generator" content="GTK-Doc V1.25 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
<a href="#GstPushSrc.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
<a href="#GstPushSrc.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="gstreamer-base.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="GstBaseTransform.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GstAdapter.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GstPushSrc"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GstPushSrc.top_of_page"></a>GstPushSrc</span></h2>
<p>GstPushSrc — Base class for push based source elements</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GstPushSrc.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="GstPushSrc.html#GstPushSrc-struct" title="struct GstPushSrc">GstPushSrc</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="GstPushSrc.html#GstPushSrcClass" title="struct GstPushSrcClass">GstPushSrcClass</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GstPushSrc.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen"> <a href="/usr/share/gtk-doc/html/gobjectgobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
<span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gobjectgobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
<span class="lineart">╰──</span> <a href="../html/GstObject.html#GstObject-struct">GstObject</a>
<span class="lineart">╰──</span> <a href="../html/GstElement.html#GstElement-struct">GstElement</a>
<span class="lineart">╰──</span> <a class="link" href="GstBaseSrc.html" title="GstBaseSrc">GstBaseSrc</a>
<span class="lineart">╰──</span> GstPushSrc
</pre>
</div>
<div class="refsect1">
<a name="GstPushSrc.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gst/base/gstpushsrc.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="GstPushSrc.description"></a><h2>Description</h2>
<p>This class is mostly useful for elements that cannot do
random access, or at least very slowly. The source usually
prefers to push out a fixed size buffer.</p>
<p>Subclasses usually operate in a format that is different from the
default GST_FORMAT_BYTES format of <a class="link" href="GstBaseSrc.html" title="GstBaseSrc"><span class="type">GstBaseSrc</span></a>.</p>
<p>Classes extending this base class will usually be scheduled
in a push based mode. If the peer accepts to operate without
offsets and within the limits of the allowed block size, this
class can operate in getrange based mode automatically. To make
this possible, the subclass should implement and override the
SCHEDULING query.</p>
<p>The subclass should extend the methods from the baseclass in
addition to the ::create method.</p>
<p>Seeking, flushing, scheduling and sync is all handled by this
base class.</p>
</div>
<div class="refsect1">
<a name="GstPushSrc.functions_details"></a><h2>Functions</h2>
<p></p>
</div>
<div class="refsect1">
<a name="GstPushSrc.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GstPushSrc-struct"></a><h3>struct GstPushSrc</h3>
<pre class="programlisting">struct GstPushSrc;</pre>
<p>The opaque <a class="link" href="GstPushSrc.html" title="GstPushSrc"><span class="type">GstPushSrc</span></a> data structure.</p>
</div>
<hr>
<div class="refsect2">
<a name="GstPushSrcClass"></a><h3>struct GstPushSrcClass</h3>
<pre class="programlisting">struct GstPushSrcClass {
GstBaseSrcClass parent_class;
/* ask the subclass to create a buffer, the default implementation
* uses alloc and fill */
GstFlowReturn (*create) (GstPushSrc *src, GstBuffer **buf);
/* allocate memory for a buffer */
GstFlowReturn (*alloc) (GstPushSrc *src, GstBuffer **buf);
/* ask the subclass to fill a buffer */
GstFlowReturn (*fill) (GstPushSrc *src, GstBuffer *buf);
};
</pre>
<p>Subclasses can override any of the available virtual methods or not, as
needed. At the minimum, the <em class="parameter"><code>fill</code></em>
method should be overridden to produce
buffers.</p>
<div class="refsect3">
<a name="GstPushSrcClass.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GstPushSrcClass.create"></a>create</code></em> ()</p></td>
<td class="struct_member_description"><p>Ask the subclass to create a buffer. The subclass decides which
size this buffer should be. Other then that, refer to
<a class="link" href="GstBaseSrc.html" title="GstBaseSrc"><span class="type">GstBaseSrc</span></a>.create() for more details. If this method is
not implemented, <em class="parameter"><code>alloc</code></em>
followed by <em class="parameter"><code>fill</code></em>
will be called.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GstPushSrcClass.alloc"></a>alloc</code></em> ()</p></td>
<td class="struct_member_description"><p>Ask the subclass to allocate a buffer. The subclass decides which
size this buffer should be. The default implementation will create
a new buffer from the negotiated allocator.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GstPushSrcClass.fill"></a>fill</code></em> ()</p></td>
<td class="struct_member_description"><p>Ask the subclass to fill the buffer with data.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="refsect1">
<a name="GstPushSrc.see-also"></a><h2>See Also</h2>
<p><a class="link" href="GstBaseSrc.html" title="GstBaseSrc"><span class="type">GstBaseSrc</span></a></p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25</div>
</body>
</html>