Fix up documentation blobs SGML
[platform/upstream/gst-plugins-good.git] / gst / dtmf / gstdtmfsrc.h
1 /* GStreamer DTMF source
2  *
3  * gstdtmfsrc.h:
4  *
5  * Copyright (C) <2007> Collabora.
6  *   Contact: Youness Alaoui <youness.alaoui@collabora.co.uk>
7  * Copyright (C) <2007> Nokia Corporation.
8  *   Contact: Zeeshan Ali <zeeshan.ali@nokia.com>
9  * Copyright (C) <2005> Wim Taymans <wim@fluendo.com>
10  *
11  * This library is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Library General Public
13  * License as published by the Free Software Foundation; either
14  * version 2 of the License, or (at your option) any later version.
15  *
16  * This library is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19  * Library General Public License for more details.
20  *
21  * You should have received a copy of the GNU Library General Public
22  * License along with this library; if not, write to the
23  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24  * Boston, MA 02111-1307, USA.
25  */
26
27 #ifndef __GST_DTMF_SRC_H__
28 #define __GST_DTMF_SRC_H__
29
30 #include <gst/gst.h>
31 #include <gst/gstbuffer.h>
32 #include <gst/base/gstbasesrc.h>
33
34 G_BEGIN_DECLS
35 #define GST_TYPE_DTMF_SRC               (gst_dtmf_src_get_type())
36 #define GST_DTMF_SRC(obj)               (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DTMF_SRC,GstDTMFSrc))
37 #define GST_DTMF_SRC_CLASS(klass)       (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DTMF_SRC,GstDTMFSrcClass))
38 #define GST_DTMF_SRC_GET_CLASS(obj)     (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_DTMF_SRC, GstDTMFSrcClass))
39 #define GST_IS_DTMF_SRC(obj)            (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DTMF_SRC))
40 #define GST_IS_DTMF_SRC_CLASS(klass)    (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DTMF_SRC))
41 #define GST_DTMF_SRC_CAST(obj)          ((GstDTMFSrc *)(obj))
42 typedef struct _GstDTMFSrc GstDTMFSrc;
43 typedef struct _GstDTMFSrcClass GstDTMFSrcClass;
44
45 /**
46  * GstDTMFSrc:
47  * @element: the parent element.
48  *
49  * The opaque #GstDTMFSrc data structure.
50  */
51
52 enum _GstDTMFEventType
53 {
54   DTMF_EVENT_TYPE_START,
55   DTMF_EVENT_TYPE_STOP,
56   DTMF_EVENT_TYPE_PAUSE_TASK
57 };
58
59 typedef enum _GstDTMFEventType GstDTMFEventType;
60
61 struct _GstDTMFSrcEvent
62 {
63   GstDTMFEventType event_type;
64   double sample;
65   guint16 event_number;
66   guint16 volume;
67   guint32 packet_count;
68 };
69
70 typedef struct _GstDTMFSrcEvent GstDTMFSrcEvent;
71
72 struct _GstDTMFSrc
73 {
74   /*< private >*/
75   GstBaseSrc parent;
76   GAsyncQueue *event_queue;
77   GstDTMFSrcEvent *last_event;
78
79   guint16 interval;
80   GstClockTime timestamp;
81
82   gboolean paused;
83   GstClockID clockid;
84
85   gint sample_rate;
86 };
87
88
89 struct _GstDTMFSrcClass
90 {
91   GstBaseSrcClass parent_class;
92 };
93
94 GType gst_dtmf_src_get_type (void);
95
96 gboolean gst_dtmf_src_plugin_init (GstPlugin * plugin);
97
98 G_END_DECLS
99 #endif /* __GST_DTMF_SRC_H__ */