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>dtmfsrc: 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-directsoundsink.html" title="directsoundsink"> 10<link rel="next" href="gst-plugins-good-plugins-dv1394src.html" title="dv1394src"> 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-dtmfsrc.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> 19 <a href="#gst-plugins-good-plugins-dtmfsrc.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties"> <span class="dim">|</span> 20 <a href="#gst-plugins-good-plugins-dtmfsrc.properties" class="shortcut">Properties</a></span> 21</td> 22<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> 23<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> 24<td><a accesskey="p" href="gst-plugins-good-plugins-directsoundsink.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> 25<td><a accesskey="n" href="gst-plugins-good-plugins-dv1394src.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> 26</tr></table> 27<div class="refentry"> 28<a name="gst-plugins-good-plugins-dtmfsrc"></a><div class="titlepage"></div> 29<div class="refnamediv"><table width="100%"><tr> 30<td valign="top"> 31<h2><span class="refentrytitle"><a name="gst-plugins-good-plugins-dtmfsrc.top_of_page"></a>dtmfsrc</span></h2> 32<p>dtmfsrc</p> 33</td> 34<td class="gallery_image" valign="top" align="right"></td> 35</tr></table></div> 36<div class="refsect1"> 37<a name="gst-plugins-good-plugins-dtmfsrc.properties"></a><h2>Properties</h2> 38<div class="informaltable"><table class="informaltable" border="0"> 39<colgroup> 40<col width="150px" class="properties_type"> 41<col width="300px" class="properties_name"> 42<col width="200px" class="properties_flags"> 43</colgroup> 44<tbody><tr> 45<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td> 46<td class="property_name"><a class="link" href="gst-plugins-good-plugins-dtmfsrc.html#GstDTMFSrc--interval" title="The “interval” property">interval</a></td> 47<td class="property_flags">Read / Write</td> 48</tr></tbody> 49</table></div> 50</div> 51<a name="GstDTMFSrc"></a><div class="refsect1"> 52<a name="gst-plugins-good-plugins-dtmfsrc.other"></a><h2>Types and Values</h2> 53<div class="informaltable"><table class="informaltable" width="100%" border="0"> 54<colgroup> 55<col width="150px" class="name"> 56<col class="description"> 57</colgroup> 58<tbody><tr> 59<td class="datatype_keyword">struct</td> 60<td class="function_name"><a class="link" href="gst-plugins-good-plugins-dtmfsrc.html#GstDTMFSrc-struct" title="struct GstDTMFSrc">GstDTMFSrc</a></td> 61</tr></tbody> 62</table></div> 63</div> 64<div class="refsect1"> 65<a name="gst-plugins-good-plugins-dtmfsrc.object-hierarchy"></a><h2>Object Hierarchy</h2> 66<pre class="screen"> <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a> 67 <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a> 68 <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstObject.html#GstObject-struct">GstObject</a> 69 <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstElement.html#GstElement-struct">GstElement</a> 70 <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-libs-1.0/GstBaseSrc.html#GstBaseSrc-struct">GstBaseSrc</a> 71 <span class="lineart">╰──</span> GstDTMFSrc 72</pre> 73</div> 74<div class="refsect1"> 75<a name="gst-plugins-good-plugins-dtmfsrc.description"></a><h2>Description</h2> 76<p>The DTMFSrc element generates DTMF (ITU-T Q.23 Specification) tone packets on request 77from application. The application communicates the beginning and end of a 78DTMF event using custom upstream gstreamer events. To report a DTMF event, an 79application must send an event of type GST_EVENT_CUSTOM_UPSTREAM, having a 80structure of name "dtmf-event" with fields set according to the following 81table:</p> 82<div class="informaltable"><table class="informaltable" border="1"> 83<colgroup> 84<col class="Name"> 85<col class="Type"> 86<col class="Possible values"> 87<col class="Purpose"> 88</colgroup> 89<thead><tr> 90<th>Name</th> 91<th>GType</th> 92<th>Possible values</th> 93<th>Purpose</th> 94</tr></thead> 95<tbody> 96<tr> 97<td>type</td> 98<td>G_TYPE_INT</td> 99<td>0-1</td> 100<td>The application uses this field to specify which of the two methods 101specified in RFC 2833 to use. The value should be 0 for tones and 1 for 102named events. Tones are specified by their frequencies and events are specied 103by their number. This element can only take events as input. Do not confuse 104with "method" which specified the output. 105</td> 106</tr> 107<tr> 108<td>number</td> 109<td>G_TYPE_INT</td> 110<td>0-15</td> 111<td>The event number.</td> 112</tr> 113<tr> 114<td>volume</td> 115<td>G_TYPE_INT</td> 116<td>0-36</td> 117<td>This field describes the power level of the tone, expressed in dBm0 118after dropping the sign. Power levels range from 0 to -63 dBm0. The range of 119valid DTMF is from 0 to -36 dBm0. Can be omitted if start is set to FALSE. 120</td> 121</tr> 122<tr> 123<td>start</td> 124<td>G_TYPE_BOOLEAN</td> 125<td>True or False</td> 126<td>Whether the event is starting or ending.</td> 127</tr> 128<tr> 129<td>method</td> 130<td>G_TYPE_INT</td> 131<td>2</td> 132<td>The method used for sending event, this element will react if this 133field is absent or 2. 134</td> 135</tr> 136</tbody> 137</table></div> 138<p>For example, the following code informs the pipeline (and in turn, the 139DTMFSrc element inside the pipeline) about the start of a DTMF named 140event '1' of volume -25 dBm0:</p> 141<pre class="programlisting"> 142structure = gst_structure_new ("dtmf-event", 143 "type", G_TYPE_INT, 1, 144 "number", G_TYPE_INT, 1, 145 "volume", G_TYPE_INT, 25, 146 "start", G_TYPE_BOOLEAN, TRUE, NULL); 147 148event = gst_event_new_custom (GST_EVENT_CUSTOM_UPSTREAM, structure); 149gst_element_send_event (pipeline, event); 150</pre> 151<p>When a DTMF tone actually starts or stop, a "dtmf-event-processed" 152element <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstMessage.html#GstMessage-struct"><span class="type">GstMessage</span></a> with the same fields as the "dtmf-event" 153<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstEvent.html#GstEvent-struct"><span class="type">GstEvent</span></a> that was used to request the event. Also, if any event 154has not been processed when the element goes from the PAUSED to the 155READY state, then a "dtmf-event-dropped" message is posted on the 156<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBus.html#GstBus-struct"><span class="type">GstBus</span></a> in the order that they were received.</p> 157<div class="refsynopsisdiv"> 158<h2>Synopsis</h2> 159<div class="refsect2"> 160<a name="id-1.2.47.7.7.1"></a><h3>Element Information</h3> 161<div class="variablelist"><table border="0" class="variablelist"> 162<colgroup> 163<col align="left" valign="top"> 164<col> 165</colgroup> 166<tbody> 167<tr> 168<td><p><span class="term">plugin</span></p></td> 169<td> 170 <a class="link" href="gst-plugins-good-plugins-plugin-dtmf.html#plugin-dtmf">dtmf</a> 171 </td> 172</tr> 173<tr> 174<td><p><span class="term">author</span></p></td> 175<td>Youness Alaoui <youness.alaoui@collabora.co.uk></td> 176</tr> 177<tr> 178<td><p><span class="term">class</span></p></td> 179<td>Source/Audio</td> 180</tr> 181</tbody> 182</table></div> 183</div> 184<hr> 185<div class="refsect2"> 186<a name="id-1.2.47.7.7.2"></a><h3>Element Pads</h3> 187<div class="variablelist"><table border="0" class="variablelist"> 188<colgroup> 189<col align="left" valign="top"> 190<col> 191</colgroup> 192<tbody> 193<tr> 194<td><p><span class="term">name</span></p></td> 195<td>src</td> 196</tr> 197<tr> 198<td><p><span class="term">direction</span></p></td> 199<td>source</td> 200</tr> 201<tr> 202<td><p><span class="term">presence</span></p></td> 203<td>always</td> 204</tr> 205<tr> 206<td><p><span class="term">details</span></p></td> 207<td>audio/x-raw, format=(string)S16LE, rate=(int)[ 1, 2147483647 ], channels=(int)1, layout=(string)interleaved</td> 208</tr> 209</tbody> 210</table></div> 211</div> 212</div> 213</div> 214<div class="refsect1"> 215<a name="gst-plugins-good-plugins-dtmfsrc.functions_details"></a><h2>Functions</h2> 216<p></p> 217</div> 218<div class="refsect1"> 219<a name="gst-plugins-good-plugins-dtmfsrc.other_details"></a><h2>Types and Values</h2> 220<div class="refsect2"> 221<a name="GstDTMFSrc-struct"></a><h3>struct GstDTMFSrc</h3> 222<pre class="programlisting">struct GstDTMFSrc;</pre> 223<p>The opaque <a class="link" href="gst-plugins-good-plugins-dtmfsrc.html#GstDTMFSrc"><span class="type">GstDTMFSrc</span></a> data structure.</p> 224<div class="refsect3"> 225<a name="GstDTMFSrc.members"></a><h4>Members</h4> 226<div class="informaltable"><table class="informaltable" width="100%" border="0"> 227<colgroup> 228<col width="300px" class="struct_members_name"> 229<col class="struct_members_description"> 230<col width="200px" class="struct_members_annotations"> 231</colgroup> 232<tbody></tbody> 233</table></div> 234</div> 235</div> 236</div> 237<div class="refsect1"> 238<a name="gst-plugins-good-plugins-dtmfsrc.property-details"></a><h2>Property Details</h2> 239<div class="refsect2"> 240<a name="GstDTMFSrc--interval"></a><h3>The <code class="literal">“interval”</code> property</h3> 241<pre class="programlisting"> “interval” <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre> 242<p>Interval in ms between two tone packets.</p> 243<p>Flags: Read / Write</p> 244<p>Allowed values: [10,50]</p> 245<p>Default value: 50</p> 246</div> 247</div> 248<div class="refsect1"> 249<a name="gst-plugins-good-plugins-dtmfsrc.see-also"></a><h2>See Also</h2> 250<p>rtpdtmsrc, rtpdtmfmuxx</p> 251</div> 252</div> 253<div class="footer"> 254<hr>Generated by GTK-Doc V1.28</div> 255</body> 256</html>