Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > by-pkgid > 6d445a7e34cab500c4a729b1f6c7a5fd > files > 112

lib64gstreamer-plugins-base0.10-devel-0.10.17-3mdv2008.1.x86_64.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>gstaudiosink</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
<link rel="start" href="index.html" title="GStreamer Base Plugins 0.10 Library Reference Manual">
<link rel="up" href="gstreamer-audio.html" title="Audio Library">
<link rel="prev" href="gst-plugins-base-libs-gstbaseaudiosrc.html" title="gstbaseaudiosrc">
<link rel="next" href="gst-plugins-base-libs-gstaudiosrc.html" title="gstaudiosrc">
<meta name="generator" content="GTK-Doc V1.8 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="part" href="gstreamer-plugins-base.html" title="Part&#160;I.&#160;GStreamer Base Plugins Libraries">
<link rel="chapter" href="gstreamer-audio.html" title="Audio Library">
<link rel="chapter" href="gstreamer-cdda.html" title="CDDA Library">
<link rel="chapter" href="gstreamer-ffft.html" title="FFT Library">
<link rel="chapter" href="gstreamer-floatcast.html" title="FloatCast Library">
<link rel="chapter" href="gstreamer-interfaces.html" title="Interfaces Library">
<link rel="chapter" href="gstreamer-netbuffer.html" title="Network Buffer Library">
<link rel="chapter" href="gstreamer-riff.html" title="Riff Media Library">
<link rel="chapter" href="gstreamer-rtp.html" title="RTP Library">
<link rel="chapter" href="gstreamer-rtsp.html" title="RTSP Library">
<link rel="chapter" href="gstreamer-sdp.html" title="SDP Library">
<link rel="chapter" href="gstreamer-tag.html" title="Tag Support Library">
<link rel="chapter" href="gstreamer-base-utils.html" title="Base Utils Library">
<link rel="chapter" href="gstreamer-video.html" title="Video Library">
<link rel="part" href="gstreamer-libs-hierarchy.html" title="Part&#160;II.&#160;Object Hierarchy">
<link rel="index" href="api-index.html" title="Index">
</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="2">
<tr valign="middle">
<td><a accesskey="p" href="gst-plugins-base-libs-gstbaseaudiosrc.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="gstreamer-audio.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 Base Plugins 0.10 Library Reference Manual</th>
<td><a accesskey="n" href="gst-plugins-base-libs-gstaudiosrc.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2568076" class="shortcut">Top</a>
                  &#160;|&#160;
                  <a href="#id2568165" class="shortcut">Description</a>
                  &#160;|&#160;
                  <a href="#id2568111" class="shortcut">Object Hierarchy</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="gst-plugins-base-libs-gstaudiosink"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id2568076"></a><span class="refentrytitle">gstaudiosink</span>
</h2>
<p>gstaudiosink &#8212; Simple base class for audio sinks</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<a name="GstAudioSink"></a><pre class="synopsis">

#include &lt;gst/audio/gstaudiosink.h&gt;


                    <a href="gst-plugins-base-libs-gstaudiosink.html#GstAudioSink-struct">GstAudioSink</a>;
                    <a href="gst-plugins-base-libs-gstaudiosink.html#GstAudioSinkClass">GstAudioSinkClass</a>;

</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2568111"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">

  GObject
   +----GstObject
         +----GstElement
               +----GstBaseSink
                     +----<a href="gst-plugins-base-libs-gstbaseaudiosink.html#GstBaseAudioSink">GstBaseAudioSink</a>
                           +----GstAudioSink
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2568165"></a><h2>Description</h2>
<p>
This is the most simple base class for audio sinks that only requires
subclasses to implement a set of simple functions:
</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><span class="term"><code class="function">open()</code></span></td>
<td><p>Open the device.</p></td>
</tr>
<tr>
<td><span class="term"><code class="function">prepare()</code></span></td>
<td><p>Configure the device with the specified format.</p></td>
</tr>
<tr>
<td><span class="term"><code class="function">write()</code></span></td>
<td><p>Write samples to the device.</p></td>
</tr>
<tr>
<td><span class="term"><code class="function">reset()</code></span></td>
<td><p>Unblock writes and flush the device.</p></td>
</tr>
<tr>
<td><span class="term"><code class="function">delay()</code></span></td>
<td><p>Get the number of samples written but not yet played 
    by the device.</p></td>
</tr>
<tr>
<td><span class="term"><code class="function">unprepare()</code></span></td>
<td><p>Undo operations done by prepare.</p></td>
</tr>
<tr>
<td><span class="term"><code class="function">close()</code></span></td>
<td><p>Close the device.</p></td>
</tr>
</tbody>
</table></div>
<p>
</p>
<p>
All scheduling of samples and timestamps is done in this base class
together with <a href="gst-plugins-base-libs-gstbaseaudiosink.html#GstBaseAudioSink"><span class="type">GstBaseAudioSink</span></a> using a default implementation of a
<a href="gst-plugins-base-libs-gstringbuffer.html#GstRingBuffer"><span class="type">GstRingBuffer</span></a> that uses threads.
</p>
<p>
Last reviewed on 2006-09-27 (0.10.12)</p>
<p>

</p>
</div>
<div class="refsect1" lang="en">
<a name="id2568359"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id2568369"></a><h3>
<a name="GstAudioSink-struct"></a>GstAudioSink</h3>
<a class="indexterm" name="id2568382"></a><pre class="programlisting">typedef struct _GstAudioSink GstAudioSink;</pre>
<p>
Opaque <a href="gst-plugins-base-libs-gstaudiosink.html#GstAudioSink"><span class="type">GstAudioSink</span></a>.</p>
<p>

</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2568409"></a><h3>
<a name="GstAudioSinkClass"></a>GstAudioSinkClass</h3>
<a class="indexterm" name="id2568422"></a><pre class="programlisting">typedef struct {
  GstBaseAudioSinkClass parent_class;

  /* vtable */

  /* open the device with given specs */
  gboolean (*open)      (GstAudioSink *sink);
  /* prepare resources and state to operate with the given specs */
  gboolean (*prepare)   (GstAudioSink *sink, GstRingBufferSpec *spec);
  /* undo anything that was done in prepare() */
  gboolean (*unprepare) (GstAudioSink *sink);
  /* close the device */
  gboolean (*close)     (GstAudioSink *sink);
  /* write samples to the device */
  guint    (*write)     (GstAudioSink *sink, gpointer data, guint length);
  /* get number of samples queued in the device */
  guint    (*delay)     (GstAudioSink *sink);
  /* reset the audio device, unblock from a write */
  void     (*reset)     (GstAudioSink *sink);
} GstAudioSinkClass;
</pre>
<p>
<a href="gst-plugins-base-libs-gstaudiosink.html#GstAudioSink"><span class="type">GstAudioSink</span></a> class. Override the vmethods to implement functionality.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><span class="term"><a href="gst-plugins-base-libs-gstbaseaudiosink.html#GstBaseAudioSinkClass">GstBaseAudioSinkClass</a>&#160;<em class="structfield"><code>parent_class</code></em>;</span></td>
<td> the parent class structure.
</td>
</tr>
<tr>
<td><span class="term"><em class="structfield"><code>open</code></em>&#160;()</span></td>
<td> Open the device. No configuration needs to be done at this point.
       This function is also used to check if the device is available.
</td>
</tr>
<tr>
<td><span class="term"><em class="structfield"><code>prepare</code></em>&#160;()</span></td>
<td> Prepare the device to operate with the specified parameters.
</td>
</tr>
<tr>
<td><span class="term"><em class="structfield"><code>unprepare</code></em>&#160;()</span></td>
<td> Undo operations done in prepare.
</td>
</tr>
<tr>
<td><span class="term"><em class="structfield"><code>close</code></em>&#160;()</span></td>
<td> Close the device.
</td>
</tr>
<tr>
<td><span class="term"><em class="structfield"><code>write</code></em>&#160;()</span></td>
<td> Write data to the device.
</td>
</tr>
<tr>
<td><span class="term"><em class="structfield"><code>delay</code></em>&#160;()</span></td>
<td> Return how many samples are still in the device. This is used to
        drive the synchronisation.
</td>
</tr>
<tr>
<td><span class="term"><em class="structfield"><code>reset</code></em>&#160;()</span></td>
<td> Returns as quickly as possible from a write and flush any pending
        samples from the device.
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id2568605"></a><h2>See Also</h2>
<a href="gst-plugins-base-libs-gstbaseaudiosink.html#GstBaseAudioSink"><span class="type">GstBaseAudioSink</span></a>, <a href="gst-plugins-base-libs-gstringbuffer.html#GstRingBuffer"><span class="type">GstRingBuffer</span></a>, <a href="gst-plugins-base-libs-gstaudiosink.html#GstAudioSink"><span class="type">GstAudioSink</span></a>.
</div>
</div>
</body>
</html>