blob: 06e44b7f9247f4ab952f3d4d86944d08624ba64c [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>GstTask: GStreamer 1.0 Core Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="GStreamer 1.0 Core Reference Manual">
<link rel="up" href="libgstreamer.html" title="GStreamer Core Library">
<link rel="prev" href="GstTagSetter.html" title="GstTagSetter">
<link rel="next" href="GstTaskPool.html" title="GstTaskPool">
<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="#GstTask.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
<a href="#GstTask.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="libgstreamer.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="GstTagSetter.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GstTaskPool.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GstTask"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GstTask.top_of_page"></a>GstTask</span></h2>
<p>GstTask</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GstTask.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="GstTask.html#GstTaskFunction" title="GstTaskFunction ()">*GstTaskFunction</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="GstTask.html#GST-TASK-BROADCAST:CAPS" title="GST_TASK_BROADCAST()">GST_TASK_BROADCAST</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="GstTask.html#GST-TASK-GET-COND:CAPS" title="GST_TASK_GET_COND()">GST_TASK_GET_COND</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="GstTask.html#GST-TASK-GET-LOCK:CAPS" title="GST_TASK_GET_LOCK()">GST_TASK_GET_LOCK</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="GstTask.html#GST-TASK-SIGNAL:CAPS" title="GST_TASK_SIGNAL()">GST_TASK_SIGNAL</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="GstTask.html#GST-TASK-STATE:CAPS" title="GST_TASK_STATE()">GST_TASK_STATE</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="GstTask.html#GST-TASK-WAIT:CAPS" title="GST_TASK_WAIT()">GST_TASK_WAIT</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstTask.html" title="GstTask"><span class="returnvalue">GstTask</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstTask.html#gst-task-new" title="gst_task_new ()">gst_task_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GstTask.html#gst-task-set-lock" title="gst_task_set_lock ()">gst_task_set_lock</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GstTask.html#gst-task-set-pool" title="gst_task_set_pool ()">gst_task_set_pool</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstTaskPool.html" title="GstTaskPool"><span class="returnvalue">GstTaskPool</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstTask.html#gst-task-get-pool" title="gst_task_get_pool ()">gst_task_get_pool</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="GstTask.html#GstTaskThreadFunc" title="GstTaskThreadFunc ()">*GstTaskThreadFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GstTask.html#gst-task-set-enter-callback" title="gst_task_set_enter_callback ()">gst_task_set_enter_callback</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GstTask.html#gst-task-set-leave-callback" title="gst_task_set_leave_callback ()">gst_task_set_leave_callback</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstTask.html#GstTaskState" title="enum GstTaskState"><span class="returnvalue">GstTaskState</span></a>
</td>
<td class="function_name">
<a class="link" href="GstTask.html#gst-task-get-state" title="gst_task_get_state ()">gst_task_get_state</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GstTask.html#gst-task-set-state" title="gst_task_set_state ()">gst_task_set_state</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GstTask.html#gst-task-pause" title="gst_task_pause ()">gst_task_pause</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GstTask.html#gst-task-start" title="gst_task_start ()">gst_task_start</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GstTask.html#gst-task-stop" title="gst_task_stop ()">gst_task_stop</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GstTask.html#gst-task-join" title="gst_task_join ()">gst_task_join</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GstTask.html#gst-task-cleanup-all" title="gst_task_cleanup_all ()">gst_task_cleanup_all</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GstTask.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="GstTask.html#GstTask-struct" title="struct GstTask">GstTask</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="GstTask.html#GstTaskState" title="enum GstTaskState">GstTaskState</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GstTask.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 class="link" href="GstObject.html" title="GstObject">GstObject</a>
<span class="lineart">╰──</span> GstTask
</pre>
</div>
<div class="refsect1">
<a name="GstTask.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gst/gst.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="GstTask.description"></a><h2>Description</h2>
</div>
<div class="refsect1">
<a name="GstTask.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="GstTaskFunction"></a><h3>GstTaskFunction ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
<span class="c_punctuation">(</span>*GstTaskFunction<span class="c_punctuation">)</span> (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="GST-TASK-BROADCAST:CAPS"></a><h3>GST_TASK_BROADCAST()</h3>
<pre class="programlisting">#define GST_TASK_BROADCAST(task) g_cond_broadcast(GST_TASK_GET_COND (task))
</pre>
</div>
<hr>
<div class="refsect2">
<a name="GST-TASK-GET-COND:CAPS"></a><h3>GST_TASK_GET_COND()</h3>
<pre class="programlisting">#define GST_TASK_GET_COND(task) (&amp;GST_TASK_CAST(task)-&gt;cond)
</pre>
</div>
<hr>
<div class="refsect2">
<a name="GST-TASK-GET-LOCK:CAPS"></a><h3>GST_TASK_GET_LOCK()</h3>
<pre class="programlisting">#define GST_TASK_GET_LOCK(task) (GST_TASK_CAST(task)-&gt;lock)
</pre>
</div>
<hr>
<div class="refsect2">
<a name="GST-TASK-SIGNAL:CAPS"></a><h3>GST_TASK_SIGNAL()</h3>
<pre class="programlisting">#define GST_TASK_SIGNAL(task) g_cond_signal(GST_TASK_GET_COND (task))
</pre>
</div>
<hr>
<div class="refsect2">
<a name="GST-TASK-STATE:CAPS"></a><h3>GST_TASK_STATE()</h3>
<pre class="programlisting">#define GST_TASK_STATE(task) (GST_TASK_CAST(task)-&gt;state)
</pre>
</div>
<hr>
<div class="refsect2">
<a name="GST-TASK-WAIT:CAPS"></a><h3>GST_TASK_WAIT()</h3>
<pre class="programlisting">#define GST_TASK_WAIT(task) g_cond_wait(GST_TASK_GET_COND (task), GST_OBJECT_GET_LOCK (task))
</pre>
</div>
<hr>
<div class="refsect2">
<a name="gst-task-new"></a><h3>gst_task_new ()</h3>
<pre class="programlisting"><a class="link" href="GstTask.html" title="GstTask"><span class="returnvalue">GstTask</span></a> *
gst_task_new (<em class="parameter"><code><a class="link" href="GstTask.html#GstTaskFunction" title="GstTaskFunction ()"><span class="type">GstTaskFunction</span></a> func</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> notify</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="gst-task-set-lock"></a><h3>gst_task_set_lock ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_task_set_lock (<em class="parameter"><code><a class="link" href="GstTask.html" title="GstTask"><span class="type">GstTask</span></a> *task</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Threads.html#GRecMutex"><span class="type">GRecMutex</span></a> *mutex</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="gst-task-set-pool"></a><h3>gst_task_set_pool ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_task_set_pool (<em class="parameter"><code><a class="link" href="GstTask.html" title="GstTask"><span class="type">GstTask</span></a> *task</code></em>,
<em class="parameter"><code><a class="link" href="GstTaskPool.html" title="GstTaskPool"><span class="type">GstTaskPool</span></a> *pool</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="gst-task-get-pool"></a><h3>gst_task_get_pool ()</h3>
<pre class="programlisting"><a class="link" href="GstTaskPool.html" title="GstTaskPool"><span class="returnvalue">GstTaskPool</span></a> *
gst_task_get_pool (<em class="parameter"><code><a class="link" href="GstTask.html" title="GstTask"><span class="type">GstTask</span></a> *task</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="GstTaskThreadFunc"></a><h3>GstTaskThreadFunc ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
<span class="c_punctuation">(</span>*GstTaskThreadFunc<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="GstTask.html" title="GstTask"><span class="type">GstTask</span></a> *task</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Threads.html#GThread"><span class="type">GThread</span></a> *thread</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="gst-task-set-enter-callback"></a><h3>gst_task_set_enter_callback ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_task_set_enter_callback (<em class="parameter"><code><a class="link" href="GstTask.html" title="GstTask"><span class="type">GstTask</span></a> *task</code></em>,
<em class="parameter"><code><a class="link" href="GstTask.html#GstTaskThreadFunc" title="GstTaskThreadFunc ()"><span class="type">GstTaskThreadFunc</span></a> enter_func</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> notify</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="gst-task-set-leave-callback"></a><h3>gst_task_set_leave_callback ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_task_set_leave_callback (<em class="parameter"><code><a class="link" href="GstTask.html" title="GstTask"><span class="type">GstTask</span></a> *task</code></em>,
<em class="parameter"><code><a class="link" href="GstTask.html#GstTaskThreadFunc" title="GstTaskThreadFunc ()"><span class="type">GstTaskThreadFunc</span></a> leave_func</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> notify</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="gst-task-get-state"></a><h3>gst_task_get_state ()</h3>
<pre class="programlisting"><a class="link" href="GstTask.html#GstTaskState" title="enum GstTaskState"><span class="returnvalue">GstTaskState</span></a>
gst_task_get_state (<em class="parameter"><code><a class="link" href="GstTask.html" title="GstTask"><span class="type">GstTask</span></a> *task</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="gst-task-set-state"></a><h3>gst_task_set_state ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_task_set_state (<em class="parameter"><code><a class="link" href="GstTask.html" title="GstTask"><span class="type">GstTask</span></a> *task</code></em>,
<em class="parameter"><code><a class="link" href="GstTask.html#GstTaskState" title="enum GstTaskState"><span class="type">GstTaskState</span></a> state</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="gst-task-pause"></a><h3>gst_task_pause ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_task_pause (<em class="parameter"><code><a class="link" href="GstTask.html" title="GstTask"><span class="type">GstTask</span></a> *task</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="gst-task-start"></a><h3>gst_task_start ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_task_start (<em class="parameter"><code><a class="link" href="GstTask.html" title="GstTask"><span class="type">GstTask</span></a> *task</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="gst-task-stop"></a><h3>gst_task_stop ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_task_stop (<em class="parameter"><code><a class="link" href="GstTask.html" title="GstTask"><span class="type">GstTask</span></a> *task</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="gst-task-join"></a><h3>gst_task_join ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_task_join (<em class="parameter"><code><a class="link" href="GstTask.html" title="GstTask"><span class="type">GstTask</span></a> *task</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="gst-task-cleanup-all"></a><h3>gst_task_cleanup_all ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_task_cleanup_all (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
</div>
</div>
<div class="refsect1">
<a name="GstTask.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GstTask-struct"></a><h3>struct GstTask</h3>
<pre class="programlisting">struct GstTask {
GstTaskState state;
GCond cond;
GRecMutex *lock;
GstTaskFunction func;
gpointer user_data;
GDestroyNotify notify;
gboolean running;
};
</pre>
</div>
<hr>
<div class="refsect2">
<a name="GstTaskState"></a><h3>enum GstTaskState</h3>
<div class="refsect3">
<a name="GstTaskState.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="GST-TASK-STARTED:CAPS"></a>GST_TASK_STARTED</p></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GST-TASK-STOPPED:CAPS"></a>GST_TASK_STOPPED</p></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GST-TASK-PAUSED:CAPS"></a>GST_TASK_PAUSED</p></td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25</div>
</body>
</html>