diff options
author | Youness Alaoui <youness.alaoui@collabora.co.uk> | 2007-08-20 20:38:26 +0000 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2009-02-21 17:47:59 +0100 |
commit | 7b9a2fd4ff375b231eb99031e78466b2f9152b4d (patch) | |
tree | 42a860d99688555b6299f896402c79b4ef9f33fb /gst/dtmf/gstdtmfsrc.h | |
parent | 2a45c1b9d4e899b311b78fd4679cd8286676354c (diff) | |
download | gst-plugins-bad-7b9a2fd4ff375b231eb99031e78466b2f9152b4d.tar.gz gst-plugins-bad-7b9a2fd4ff375b231eb99031e78466b2f9152b4d.tar.bz2 gst-plugins-bad-7b9a2fd4ff375b231eb99031e78466b2f9152b4d.zip |
[MOVED FROM GST-P-FARSIGHT] Added a queue based system for the dtmfsrc. Now it waits for start/stop messages on the queue, and makes sure that the minimum duty cycle (120ms) is respected between each tone, including inter-digit silence.
20070820203826-4f0f6-750a22b612a5e495e767666934465c34fe32074b.gz
Diffstat (limited to 'gst/dtmf/gstdtmfsrc.h')
-rw-r--r-- | gst/dtmf/gstdtmfsrc.h | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/gst/dtmf/gstdtmfsrc.h b/gst/dtmf/gstdtmfsrc.h index 234120e9..544b66e5 100644 --- a/gst/dtmf/gstdtmfsrc.h +++ b/gst/dtmf/gstdtmfsrc.h @@ -49,18 +49,36 @@ typedef struct _GstDTMFSrcClass GstDTMFSrcClass; * * The opaque #GstDTMFSrc data structure. */ + +enum _GstDTMFEventType { + DTMF_EVENT_TYPE_START, + DTMF_EVENT_TYPE_STOP +}; + +typedef enum _GstDTMFEventType GstDTMFEventType; + +struct _GstDTMFSrcEvent { + GstClockTime timestamp; + GstDTMFEventType event_type; + double sample; + guint16 event_number; + guint16 volume; + guint32 packet_count; +}; + +typedef struct _GstDTMFSrcEvent GstDTMFSrcEvent; + struct _GstDTMFSrc { GstElement element; GstPad *srcpad; - GstClockTime timestamp; GstSegment segment; - double sample; + GAsyncQueue* event_queue; + GstDTMFSrcEvent* last_event; - guint16 event; - guint16 volume; guint16 interval; }; + struct _GstDTMFSrcClass { GstElementClass parent_class; }; |