summaryrefslogtreecommitdiffstats
path: root/gst/rtpdtmf/gstrtpdtmfsrc.c
diff options
context:
space:
mode:
authorOlivier Crete <olivier.crete@collabora.co.uk>2007-05-04 19:52:51 +0000
committerEdward Hervey <bilboed@bilboed.com>2009-02-21 17:47:58 +0100
commiteb74905991f8ec104e4f76f47a8b5805310a9485 (patch)
tree8c161c4dbf9bac7b57b6f1ae3e94d4c27ab2234a /gst/rtpdtmf/gstrtpdtmfsrc.c
parent18344ae7b2ee27471910dd98d1d32d9e69173885 (diff)
downloadgst-plugins-bad-eb74905991f8ec104e4f76f47a8b5805310a9485.tar.gz
gst-plugins-bad-eb74905991f8ec104e4f76f47a8b5805310a9485.tar.bz2
gst-plugins-bad-eb74905991f8ec104e4f76f47a8b5805310a9485.zip
[MOVED FROM GST-P-FARSIGHT] Only send dtmf if the method is unspecified or is 1
20070504195251-3e2dc-b95b4b8e8dad87962cf39ec2ee67b6f1b619e9bd.gz
Diffstat (limited to 'gst/rtpdtmf/gstrtpdtmfsrc.c')
-rw-r--r--gst/rtpdtmf/gstrtpdtmfsrc.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/gst/rtpdtmf/gstrtpdtmfsrc.c b/gst/rtpdtmf/gstrtpdtmfsrc.c
index 26ac5f93..d716b219 100644
--- a/gst/rtpdtmf/gstrtpdtmfsrc.c
+++ b/gst/rtpdtmf/gstrtpdtmfsrc.c
@@ -84,7 +84,15 @@
* <entry>start</entry>
* <entry>G_TYPE_BOOLEAN</entry>
* <entry>True or False</entry>
- * <entry>Wether the event is starting or ending.</entry>
+ * <entry>Whether the event is starting or ending.</entry>
+ * </row>
+ * <row>
+ * <entry>method</entry>
+ * <entry>G_TYPE_INT</entry>
+ * <entry>1</entry>
+ * <entry>The method used for sending event, this element will react if this field
+ * is absent or 1.
+ * </entry>
* </row>
* </tbody>
* </tgroup>
@@ -321,12 +329,19 @@ gst_rtp_dtmf_src_handle_dtmf_event (GstRTPDTMFSrc *dtmfsrc,
{
gint event_type;
gboolean start;
+ gint method;
if (!gst_structure_get_int (event_structure, "type", &event_type) ||
!gst_structure_get_boolean (event_structure, "start", &start) ||
event_type != GST_RTP_DTMF_TYPE_EVENT)
goto failure;
+ if (gst_structure_get_int (event_structure, "method", &method)) {
+ if (method != 1) {
+ goto failure;
+ }
+ }
+
if (start) {
gint event_number;
gint event_volume;