[farsight2/master] Allow all dtmf methods through, check for even improbable errors
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:21:42 PST 2008
---
gst/fsrtpconference/fs-rtp-special-source.c | 16 +++++++---------
1 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/gst/fsrtpconference/fs-rtp-special-source.c b/gst/fsrtpconference/fs-rtp-special-source.c
index 606e1ef..804a3a6 100644
--- a/gst/fsrtpconference/fs-rtp-special-source.c
+++ b/gst/fsrtpconference/fs-rtp-special-source.c
@@ -608,10 +608,6 @@ fs_rtp_special_sources_start_telephony_event (GList *current_extra_sources,
GstStructure *structure = NULL;
gchar *method_str;
- if (method != FS_DTMF_METHOD_RTP_RFC4733 &&
- method != FS_DTMF_METHOD_AUTO)
- return FALSE;
-
structure = gst_structure_new ("dtmf-event",
"number", G_TYPE_INT, event,
"volume", G_TYPE_INT, volume,
@@ -619,6 +615,12 @@ fs_rtp_special_sources_start_telephony_event (GList *current_extra_sources,
"type", G_TYPE_INT, 1,
NULL);
+ if (!structure)
+ {
+ GST_ERROR ("Could not make dtmf-event structure");
+ return FALSE;
+ }
+
switch (method)
{
case FS_DTMF_METHOD_AUTO:
@@ -650,10 +652,6 @@ fs_rtp_special_sources_stop_telephony_event (GList *current_extra_sources,
GstStructure *structure = NULL;
gchar *method_str;
- if (method != FS_DTMF_METHOD_RTP_RFC4733 &&
- method != FS_DTMF_METHOD_AUTO)
- return FALSE;
-
structure = gst_structure_new ("dtmf-event",
"start", G_TYPE_BOOLEAN, FALSE,
"type", G_TYPE_INT, 1,
@@ -673,7 +671,7 @@ fs_rtp_special_sources_stop_telephony_event (GList *current_extra_sources,
gst_structure_set (structure, "method", G_TYPE_INT, 2, NULL);
break;
default:
- method_str="other";
+ method_str="unknown (defaulting to auto)";
}
GST_DEBUG ("stopping telephony event using method=%s", method_str);
--
1.5.6.5
More information about the farsight-commits
mailing list