diff options
author | Youness Alaoui <youness.alaoui@collabora.co.uk> | 2007-08-22 17:55:33 +0000 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2009-02-21 17:48:00 +0100 |
commit | 459f5c944e659e9b989c85cc9f8a86bf447fbe01 (patch) | |
tree | ca3a72de85b7b4fe8ca05c6f5b3dbd3135298ec2 /gst/dtmf/gstrtpdtmfsrc.h | |
parent | ca2f737659c9b62c67891becbc78d6cb7d7969f7 (diff) | |
download | gst-plugins-bad-459f5c944e659e9b989c85cc9f8a86bf447fbe01.tar.gz gst-plugins-bad-459f5c944e659e9b989c85cc9f8a86bf447fbe01.tar.bz2 gst-plugins-bad-459f5c944e659e9b989c85cc9f8a86bf447fbe01.zip |
[MOVED FROM GST-P-FARSIGHT] Ported the event queue work from dtmfsrc to rtpdtmfsrc
Added a queue based system for the rtpdtmfsrc. 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.
20070822175533-4f0f6-f27414c406f1f7b00c9a9084a988cf3a7930fe5c.gz
Diffstat (limited to 'gst/dtmf/gstrtpdtmfsrc.h')
-rw-r--r-- | gst/dtmf/gstrtpdtmfsrc.h | 37 |
1 files changed, 26 insertions, 11 deletions
diff --git a/gst/dtmf/gstrtpdtmfsrc.h b/gst/dtmf/gstrtpdtmfsrc.h index 8a763cce..2bbfb9db 100644 --- a/gst/dtmf/gstrtpdtmfsrc.h +++ b/gst/dtmf/gstrtpdtmfsrc.h @@ -57,6 +57,23 @@ typedef struct { typedef struct _GstRTPDTMFSrc GstRTPDTMFSrc; typedef struct _GstRTPDTMFSrcClass GstRTPDTMFSrcClass; + + +static enum _GstRTPDTMFEventType { + RTP_DTMF_EVENT_TYPE_START, + RTP_DTMF_EVENT_TYPE_STOP +}; + +typedef enum _GstRTPDTMFEventType GstRTPDTMFEventType; + +struct _GstRTPDTMFSrcEvent { + GstRTPDTMFEventType event_type; + GstRTPDTMFPayload* payload; + guint32 sent_packets; +}; + +typedef struct _GstRTPDTMFSrcEvent GstRTPDTMFSrcEvent; + /** * GstRTPDTMFSrc: * @element: the parent element. @@ -64,30 +81,28 @@ typedef struct _GstRTPDTMFSrcClass GstRTPDTMFSrcClass; * The opaque #GstRTPDTMFSrc data structure. */ struct _GstRTPDTMFSrc { - GstElement element; + GstElement element; - GstPad *srcpad; - GstRTPDTMFPayload *payload; + GstPad* srcpad; + GstSegment segment; + GAsyncQueue* event_queue; + GstRTPDTMFSrcEvent* last_event; + GstClockTime timestamp; + gboolean first_packet; + gboolean last_packet; guint32 ts_base; guint16 seqnum_base; - gint16 seqnum_offset; guint16 seqnum; gint32 ts_offset; guint32 rtp_timestamp; - guint32 clock_rate; guint pt; guint ssrc; guint current_ssrc; - gboolean first_packet; - gboolean last_packet; - - GstClockTime timestamp; - GstSegment segment; - guint16 interval; guint16 packet_redundancy; + guint32 clock_rate; }; struct _GstRTPDTMFSrcClass { |