aboutsummaryrefslogtreecommitdiff
path: root/docs/gst/html/GstTask.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/gst/html/GstTask.html')
-rw-r--r--docs/gst/html/GstTask.html73
1 files changed, 20 insertions, 53 deletions
diff --git a/docs/gst/html/GstTask.html b/docs/gst/html/GstTask.html
index f6de788..bbb36b5 100644
--- a/docs/gst/html/GstTask.html
+++ b/docs/gst/html/GstTask.html
@@ -3,8 +3,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GstTask</title>
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
-<link rel="home" href="index.html" title="GStreamer 0.11 Core Reference Manual">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.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">
@@ -17,7 +17,7 @@
<td><a accesskey="p" href="GstTagSetter.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="libgstreamer.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
-<th width="100%" align="center">GStreamer 0.11 Core Reference Manual</th>
+<th width="100%" align="center">GStreamer 1.0 Core Reference Manual</th>
<td><a accesskey="n" href="GstTaskPool.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
@@ -51,12 +51,10 @@ enum <a class="link" href="GstTask.html#GstTaskState" title="enum
#define <a class="link" href="GstTask.html#GST-TASK-SIGNAL:CAPS" title="GST_TASK_SIGNAL()">GST_TASK_SIGNAL</a> (task)
#define <a class="link" href="GstTask.html#GST-TASK-STATE:CAPS" title="GST_TASK_STATE()">GST_TASK_STATE</a> (task)
#define <a class="link" href="GstTask.html#GST-TASK-WAIT:CAPS" title="GST_TASK_WAIT()">GST_TASK_WAIT</a> (task)
-<a class="link" href="GstTask.html" title="GstTask"><span class="returnvalue">GstTask</span></a> * <a class="link" href="GstTask.html#gst-task-create" title="gst_task_create ()">gst_task_create</a> (<em class="parameter"><code><a class="link" href="GstTask.html#GstTaskFunction" title="GstTaskFunction ()"><span class="type">GstTaskFunction</span></a> func</code></em>,
+<a class="link" href="GstTask.html" title="GstTask"><span class="returnvalue">GstTask</span></a> * <a class="link" href="GstTask.html#gst-task-new" title="gst_task_new ()">gst_task_new</a> (<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="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);
<span class="returnvalue">void</span> <a class="link" href="GstTask.html#gst-task-set-lock" title="gst_task_set_lock ()">gst_task_set_lock</a> (<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="http://library.gnome.org/devel/glib/unstable/glib-Threads.html#GStaticRecMutex"><span class="type">GStaticRecMutex</span></a> *mutex</code></em>);
-<span class="returnvalue">void</span> <a class="link" href="GstTask.html#gst-task-set-priority" title="gst_task_set_priority ()">gst_task_set_priority</a> (<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="http://library.gnome.org/devel/glib/unstable/glib-Threads.html#GThreadPriority"><span class="type">GThreadPriority</span></a> priority</code></em>);
+ <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Threads.html#GRecMutex"><span class="type">GRecMutex</span></a> *mutex</code></em>);
<span class="returnvalue">void</span> <a class="link" href="GstTask.html#gst-task-set-pool" title="gst_task_set_pool ()">gst_task_set_pool</a> (<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>);
<a class="link" href="GstTaskPool.html" title="GstTaskPool"><span class="returnvalue">GstTaskPool</span></a> * <a class="link" href="GstTask.html#gst-task-get-pool" title="gst_task_get_pool ()">gst_task_get_pool</a> (<em class="parameter"><code><a class="link" href="GstTask.html" title="GstTask"><span class="type">GstTask</span></a> *task</code></em>);
@@ -103,7 +101,7 @@ might sometimes be needed to create a <a class="link" href="GstTask.html" title=
a <a class="link" href="GstPad.html" title="GstPad"><span class="type">GstPad</span></a>.
</p>
<p>
-Before the <a class="link" href="GstTask.html" title="GstTask"><span class="type">GstTask</span></a> can be run, it needs a <a href="http://library.gnome.org/devel/glib/unstable/glib-Threads.html#GStaticRecMutex"><span class="type">GStaticRecMutex</span></a> that can be set with
+Before the <a class="link" href="GstTask.html" title="GstTask"><span class="type">GstTask</span></a> can be run, it needs a <a href="http://library.gnome.org/devel/glib/unstable/glib-Deprecated-Thread-APIs.html#GStaticRecMutex"><span class="type">GStaticRecMutex</span></a> that can be set with
<a class="link" href="GstTask.html#gst-task-set-lock" title="gst_task_set_lock ()"><code class="function">gst_task_set_lock()</code></a>.
</p>
<p>
@@ -112,7 +110,7 @@ and <a class="link" href="GstTask.html#gst-task-stop" title="gst_task_stop ()"><
</p>
<p>
A <a class="link" href="GstTask.html" title="GstTask"><span class="type">GstTask</span></a> will repeatedly call the <a class="link" href="GstTask.html#GstTaskFunction" title="GstTaskFunction ()"><span class="type">GstTaskFunction</span></a> with the user data
-that was provided when creating the task with <a class="link" href="GstTask.html#gst-task-create" title="gst_task_create ()"><code class="function">gst_task_create()</code></a>. While calling
+that was provided when creating the task with <a class="link" href="GstTask.html#gst-task-new" title="gst_task_new ()"><code class="function">gst_task_new()</code></a>. While calling
the function it will acquire the provided lock. The provided lock is released
when the task pauses or stops.
</p>
@@ -123,7 +121,7 @@ stopped and the thread is stopped.
</p>
<p>
After creating a <a class="link" href="GstTask.html" title="GstTask"><span class="type">GstTask</span></a>, use <a class="link" href="GstObject.html#gst-object-unref" title="gst_object_unref ()"><code class="function">gst_object_unref()</code></a> to free its resources. This can
-only be done it the task is not running anymore.
+only be done when the task is not running anymore.
</p>
<p>
Task functions can send a <a class="link" href="gstreamer-GstMessage.html#GstMessage" title="struct GstMessage"><span class="type">GstMessage</span></a> to send out-of-band data to the
@@ -131,13 +129,13 @@ application. The application can receive messages from the <a class="link" href=
mainloop.
</p>
<p>
-For debugging perposes, the task will configure its object name as the thread
+For debugging purposes, the task will configure its object name as the thread
name on Linux. Please note that the object name should be configured before the
task is started; changing the object name after the task has been started, has
no effect on the thread name.
</p>
<p>
-Last reviewed on 2010-03-15 (0.10.29)
+Last reviewed on 2012-03-29 (0.11.3)
</p>
</div>
<div class="refsect1">
@@ -146,9 +144,9 @@ Last reviewed on 2010-03-15 (0.10.29)
<a name="GstTask-struct"></a><h3>struct GstTask</h3>
<pre class="programlisting">struct GstTask {
GstTaskState state;
- GCond *cond;
+ GCond cond;
- GStaticRecMutex *lock;
+ GRecMutex *lock;
GstTaskFunction func;
gpointer data;
@@ -167,11 +165,11 @@ The <a class="link" href="GstTask.html" title="GstTask"><span class="type">GstTa
<td>the state of the task</td>
</tr>
<tr>
-<td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Threads.html#GCond"><span class="type">GCond</span></a> *<em class="structfield"><code><a name="GstTask-struct.cond"></a>cond</code></em>;</span></p></td>
+<td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Threads.html#GCond"><span class="type">GCond</span></a> <em class="structfield"><code><a name="GstTask-struct.cond"></a>cond</code></em>;</span></p></td>
<td>used to pause/resume the task</td>
</tr>
<tr>
-<td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Threads.html#GStaticRecMutex"><span class="type">GStaticRecMutex</span></a> *<em class="structfield"><code><a name="GstTask-struct.lock"></a>lock</code></em>;</span></p></td>
+<td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Threads.html#GRecMutex"><span class="type">GRecMutex</span></a> *<em class="structfield"><code><a name="GstTask-struct.lock"></a>lock</code></em>;</span></p></td>
<td>The lock taken when iterating the task function</td>
</tr>
<tr>
@@ -257,7 +255,7 @@ Send a broadcast signal to all waiting task conds
<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) (GST_TASK_CAST(task)-&gt;cond)
+<pre class="programlisting">#define GST_TASK_GET_COND(task) (&amp;GST_TASK_CAST(task)-&gt;cond)
</pre>
<p>
Get access to the cond of the task.
@@ -336,8 +334,8 @@ Wait for the task cond to be signalled
</div>
<hr>
<div class="refsect2">
-<a name="gst-task-create"></a><h3>gst_task_create ()</h3>
-<pre class="programlisting"><a class="link" href="GstTask.html" title="GstTask"><span class="returnvalue">GstTask</span></a> * gst_task_create (<em class="parameter"><code><a class="link" href="GstTask.html#GstTaskFunction" title="GstTaskFunction ()"><span class="type">GstTaskFunction</span></a> func</code></em>,
+<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="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
<p>
Create a new Task that will repeatedly call the provided <em class="parameter"><code>func</code></em>
@@ -353,7 +351,7 @@ This function will not yet create and start a thread. Use <a class="link" href="
<a class="link" href="GstTask.html#gst-task-pause" title="gst_task_pause ()"><code class="function">gst_task_pause()</code></a> to create and start the GThread.
</p>
<p>
-Before the task can be used, a <a href="http://library.gnome.org/devel/glib/unstable/glib-Threads.html#GStaticRecMutex"><span class="type">GStaticRecMutex</span></a> must be configured using the
+Before the task can be used, a <a href="http://library.gnome.org/devel/glib/unstable/glib-Deprecated-Thread-APIs.html#GStaticRecMutex"><span class="type">GStaticRecMutex</span></a> must be configured using the
<a class="link" href="GstTask.html#gst-task-set-lock" title="gst_task_set_lock ()"><code class="function">gst_task_set_lock()</code></a> function. This lock will always be acquired while
<em class="parameter"><code>func</code></em> is called.
</p>
@@ -382,7 +380,7 @@ MT safe. <span class="annotation">[<acronym title="Free data after the code is d
<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="http://library.gnome.org/devel/glib/unstable/glib-Threads.html#GStaticRecMutex"><span class="type">GStaticRecMutex</span></a> *mutex</code></em>);</pre>
+ <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Threads.html#GRecMutex"><span class="type">GRecMutex</span></a> *mutex</code></em>);</pre>
<p>
Set the mutex used by the task. The mutex will be acquired before
calling the <a class="link" href="GstTask.html#GstTaskFunction" title="GstTaskFunction ()"><span class="type">GstTaskFunction</span></a>.
@@ -403,44 +401,13 @@ MT safe.
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mutex</code></em> :</span></p></td>
-<td>The <a href="http://library.gnome.org/devel/glib/unstable/glib-Threads.html#GMutex"><span class="type">GMutex</span></a> to use</td>
+<td>The <a href="http://library.gnome.org/devel/glib/unstable/glib-Threads.html#GRecMutex"><span class="type">GRecMutex</span></a> to use</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
-<a name="gst-task-set-priority"></a><h3>gst_task_set_priority ()</h3>
-<pre class="programlisting"><span class="returnvalue">void</span> gst_task_set_priority (<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="http://library.gnome.org/devel/glib/unstable/glib-Threads.html#GThreadPriority"><span class="type">GThreadPriority</span></a> priority</code></em>);</pre>
-<p>
-Changes the priority of <em class="parameter"><code>task</code></em> to <em class="parameter"><code>priority</code></em>.
-</p>
-<p>
-Note: try not to depend on task priorities.
-</p>
-<p>
-MT safe.
-</p>
-<div class="variablelist"><table border="0">
-<col align="left" valign="top">
-<tbody>
-<tr>
-<td><p><span class="term"><em class="parameter"><code>task</code></em> :</span></p></td>
-<td>a <a class="link" href="GstTask.html" title="GstTask"><span class="type">GstTask</span></a>
-</td>
-</tr>
-<tr>
-<td><p><span class="term"><em class="parameter"><code>priority</code></em> :</span></p></td>
-<td>a new priority for <em class="parameter"><code>task</code></em>
-</td>
-</tr>
-</tbody>
-</table></div>
-<p class="since">Since 0.10.24</p>
-</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>