summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorYouness Alaoui <youness.alaoui@collabora.co.uk>2008-03-20 01:13:01 +0000
committerEdward Hervey <bilboed@bilboed.com>2009-02-21 17:48:04 +0100
commit8cbaa9f78e59595b6e0e7f49c53beb5f3d64b672 (patch)
tree2233a15ae875ea045e409e495e7df121198b8945 /gst
parent3f8af94593de1390336960fa9e70ceaa0ff7b633 (diff)
downloadgst-plugins-bad-8cbaa9f78e59595b6e0e7f49c53beb5f3d64b672.tar.gz
gst-plugins-bad-8cbaa9f78e59595b6e0e7f49c53beb5f3d64b672.tar.bz2
gst-plugins-bad-8cbaa9f78e59595b6e0e7f49c53beb5f3d64b672.zip
[MOVED FROM GST-P-FARSIGHT] Adding support for rtpdtmfdepay
20080320011301-4f0f6-d36a5d24be20336e36c4796d75476c9b5ee1a7e1.gz
Diffstat (limited to 'gst')
-rw-r--r--gst/dtmf/Makefile.am5
-rw-r--r--gst/dtmf/gstdtmf.c4
-rw-r--r--gst/dtmf/gstrtpdtmfsrc.h17
3 files changed, 10 insertions, 16 deletions
diff --git a/gst/dtmf/Makefile.am b/gst/dtmf/Makefile.am
index 210dcade..abc47184 100644
--- a/gst/dtmf/Makefile.am
+++ b/gst/dtmf/Makefile.am
@@ -2,10 +2,13 @@ plugin_LTLIBRARIES = libgstdtmf.la
libgstdtmf_la_SOURCES = gstdtmfsrc.c \
gstrtpdtmfsrc.c \
+ gstrtpdtmfdepay.c \
gstdtmf.c
noinst_HEADERS = gstdtmfsrc.h \
- gstrtpdtmfsrc.h
+ gstrtpdtmfsrc.h \
+ gstrtpdtmfdepay.h \
+ gstrtpdtmfcommon.h
libgstdtmf_la_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(ERROR_CFLAGS) -DEXTERN_BUF -DRTP_SUPPORT
libgstdtmf_la_LIBADD = $(GST_LIBS_LIBS)
diff --git a/gst/dtmf/gstdtmf.c b/gst/dtmf/gstdtmf.c
index 30868857..86bbafa5 100644
--- a/gst/dtmf/gstdtmf.c
+++ b/gst/dtmf/gstdtmf.c
@@ -5,6 +5,7 @@
#include "gstdtmfsrc.h"
#include "gstrtpdtmfsrc.h"
+#include "gstrtpdtmfdepay.h"
static gboolean
@@ -17,6 +18,9 @@ plugin_init (GstPlugin * plugin)
return FALSE;
+ if (!gst_rtp_dtmf_depay_plugin_init (plugin))
+ return FALSE;
+
return TRUE;
}
diff --git a/gst/dtmf/gstrtpdtmfsrc.h b/gst/dtmf/gstrtpdtmfsrc.h
index 4114f23c..ade3a67a 100644
--- a/gst/dtmf/gstrtpdtmfsrc.h
+++ b/gst/dtmf/gstrtpdtmfsrc.h
@@ -29,6 +29,8 @@
#include <gst/base/gstbasesrc.h>
#include <gst/rtp/gstrtpbuffer.h>
+#include "gstrtpdtmfcommon.h"
+
G_BEGIN_DECLS
#define GST_TYPE_RTP_DTMF_SRC (gst_rtp_dtmf_src_get_type())
@@ -39,21 +41,6 @@ G_BEGIN_DECLS
#define GST_IS_RTP_DTMF_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_DTMF_SRC))
#define GST_RTP_DTMF_SRC_CAST(obj) ((GstRTPDTMFSrc *)(obj))
-typedef struct {
- unsigned event:8; /* Current DTMF event */
-#if G_BYTE_ORDER == G_LITTLE_ENDIAN
- unsigned volume:6; /* power level of the tone, in dBm0 */
- unsigned r:1; /* Reserved-bit */
- unsigned e:1; /* End-bit */
-#elif G_BYTE_ORDER == G_BIG_ENDIAN
- unsigned e:1; /* End-bit */
- unsigned r:1; /* Reserved-bit */
- unsigned volume:6; /* power level of the tone, in dBm0 */
-#else
-#error "G_BYTE_ORDER should be big or little endian."
-#endif
- unsigned duration:16; /* Duration of digit, in timestamp units */
-} GstRTPDTMFPayload;
typedef struct _GstRTPDTMFSrc GstRTPDTMFSrc;
typedef struct _GstRTPDTMFSrcClass GstRTPDTMFSrcClass;