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>waveformsink: GStreamer Good Plugins 1.0 Plugins Reference Manual</title> 6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 7<link rel="home" href="index.html" title="GStreamer Good Plugins 1.0 Plugins Reference Manual"> 8<link rel="up" href="ch01.html" title="gst-plugins-good Elements"> 9<link rel="prev" href="gst-plugins-good-plugins-warptv.html" title="warptv"> 10<link rel="next" href="gst-plugins-good-plugins-wavenc.html" title="wavenc"> 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="#gst-plugins-good-plugins-waveformsink.description" class="shortcut">Description</a></span> 19</td> 20<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> 21<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> 22<td><a accesskey="p" href="gst-plugins-good-plugins-warptv.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> 23<td><a accesskey="n" href="gst-plugins-good-plugins-wavenc.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> 24</tr></table> 25<div class="refentry"> 26<a name="gst-plugins-good-plugins-waveformsink"></a><div class="titlepage"></div> 27<div class="refnamediv"><table width="100%"><tr> 28<td valign="top"> 29<h2><span class="refentrytitle"><a name="gst-plugins-good-plugins-waveformsink.top_of_page"></a>waveformsink</span></h2> 30<p>waveformsink</p> 31</td> 32<td class="gallery_image" valign="top" align="right"></td> 33</tr></table></div> 34<div class="refsect1"> 35<a name="gst-plugins-good-plugins-waveformsink.other"></a><h2>Types and Values</h2> 36<div class="informaltable"><table class="informaltable" width="100%" border="0"> 37<colgroup> 38<col width="150px" class="name"> 39<col class="description"> 40</colgroup> 41<tbody><tr> 42<td class="datatype_keyword">struct</td> 43<td class="function_name"><a class="link" href="gst-plugins-good-plugins-waveformsink.html#GstWaveFormSink" title="struct GstWaveFormSink">GstWaveFormSink</a></td> 44</tr></tbody> 45</table></div> 46</div> 47<div class="refsect1"> 48<a name="gst-plugins-good-plugins-waveformsink.description"></a><h2>Description</h2> 49<p>This element lets you output sound using the Windows WaveForm API.</p> 50<p>Note that you should almost always use generic audio conversion elements 51like audioconvert and audioresample in front of an audiosink to make sure 52your pipeline works under all circumstances (those conversion elements will 53act in passthrough-mode if no conversion is necessary).</p> 54<div class="refsect2"> 55<a name="id-1.2.276.4.4"></a><h3>Example pipelines</h3> 56<div class="informalexample"> 57 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> 58 <tbody> 59 <tr> 60 <td class="listing_lines" align="right"><pre>1</pre></td> 61 <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> <span class="gtkdoc opt">-</span>v audiotestsrc <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> volume volume<span class="gtkdoc opt">=</span><span class="number">0.1</span> <span class="gtkdoc opt">!</span> waveformsink</pre></td> 62 </tr> 63 </tbody> 64 </table> 65</div> 66 will output a sine wave (continuous beep sound) to your sound card (with 67a very low volume as precaution). 68<div class="informalexample"> 69 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> 70 <tbody> 71 <tr> 72 <td class="listing_lines" align="right"><pre>1</pre></td> 73 <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> <span class="gtkdoc opt">-</span>v filesrc location<span class="gtkdoc opt">=</span>music<span class="gtkdoc opt">.</span>ogg <span class="gtkdoc opt">!</span> decodebin <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> audioresample <span class="gtkdoc opt">!</span> waveformsink</pre></td> 74 </tr> 75 </tbody> 76 </table> 77</div> 78 will play an Ogg/Vorbis audio file and output it. 79</div> 80<div class="refsynopsisdiv"> 81<h2>Synopsis</h2> 82<div class="refsect2"> 83<a name="id-1.2.276.4.5.1"></a><h3>Element Information</h3> 84<div class="variablelist"><table border="0" class="variablelist"> 85<colgroup> 86<col align="left" valign="top"> 87<col> 88</colgroup> 89<tbody> 90<tr> 91<td><p><span class="term">plugin</span></p></td> 92<td> 93 <a class="link" href="gst-plugins-good-plugins-plugin-waveform.html#plugin-waveform">waveform</a> 94 </td> 95</tr> 96<tr> 97<td><p><span class="term">author</span></p></td> 98<td>Sebastien Moutte <sebastien@moutte.net></td> 99</tr> 100<tr> 101<td><p><span class="term">class</span></p></td> 102<td>Sink/Audio</td> 103</tr> 104</tbody> 105</table></div> 106</div> 107<hr> 108<div class="refsect2"> 109<a name="id-1.2.276.4.5.2"></a><h3>Element Pads</h3> 110</div> 111</div> 112</div> 113<div class="refsect1"> 114<a name="gst-plugins-good-plugins-waveformsink.functions_details"></a><h2>Functions</h2> 115<p></p> 116</div> 117<div class="refsect1"> 118<a name="gst-plugins-good-plugins-waveformsink.other_details"></a><h2>Types and Values</h2> 119<div class="refsect2"> 120<a name="GstWaveFormSink"></a><h3>struct GstWaveFormSink</h3> 121<pre class="programlisting">struct GstWaveFormSink { 122 /* parent object */ 123 GstAudioSink sink; 124 125 /* supported caps */ 126 GstCaps *cached_caps; 127 128 /* handle to the waveform-audio output device */ 129 HWAVEOUT hwaveout; 130 131 /* table of buffer headers */ 132 WAVEHDR *wave_buffers; 133 134 /* critical section protecting access to the number of free buffers */ 135 CRITICAL_SECTION critic_wave; 136 137 /* number of free buffers available */ 138 guint free_buffers_count; 139 140 /* current free buffer where you have to write incoming data */ 141 guint write_buffer; 142 143 /* size of buffers streamed to the device */ 144 guint buffer_size; 145 146 /* number of buffers streamed to the device */ 147 guint buffer_count; 148 149 /* total of bytes in queue before they are written to the device */ 150 guint bytes_in_queue; 151 152 /* bytes per sample from setcaps used to evaluate the number samples returned by delay */ 153 guint bytes_per_sample; 154 155 /* wave form error string */ 156 gchar error_string[ERROR_LENGTH]; 157}; 158</pre> 159</div> 160</div> 161</div> 162<div class="footer"> 163<hr>Generated by GTK-Doc V1.28</div> 164</body> 165</html>