1 /* 2 * GStreamer - DTMF Detection 3 * 4 * Copyright 2009 Nokia Corporation 5 * Copyright 2009 Collabora Ltd, 6 * @author: Olivier Crete <olivier.crete@collabora.co.uk> 7 * 8 * This library is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU Library General Public 10 * License as published by the Free Software Foundation; either 11 * version 2 of the License, or (at your option) any later version. 12 * 13 * This library is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 * Library General Public License for more details. 17 * 18 * You should have received a copy of the GNU Library General Public 19 * License along with this library; if not, write to the 20 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 21 * Boston, MA 02110-1301, USA. 22 * 23 */ 24 25 #ifndef __GST_DTMF_DETECT_H__ 26 #define __GST_DTMF_DETECT_H__ 27 28 #include <gst/gst.h> 29 #include <gst/base/gstbasetransform.h> 30 31 #include <spandsp.h> 32 33 G_BEGIN_DECLS 34 35 /* #define's don't like whitespacey bits */ 36 #define GST_TYPE_DTMF_DETECT \ 37 (gst_dtmf_detect_get_type()) 38 #define GST_DTMF_DETECT(obj) \ 39 (G_TYPE_CHECK_INSTANCE_CAST((obj), \ 40 GST_TYPE_DTMF_DETECT,GstDtmfDetect)) 41 #define GST_DTMF_DETECT_CLASS(klass) \ 42 (G_TYPE_CHECK_CLASS_CAST((klass), \ 43 GST_TYPE_DTMF_DETECT,GstDtmfDetectClass)) 44 #define GST_IS_DTMF_DETECT(obj) \ 45 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DTMF_DETECT)) 46 #define GST_IS_DTMF_DETECT_CLASS(obj) \ 47 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DTMF_DETECT)) 48 49 typedef struct _GstDtmfDetect GstDtmfDetect; 50 typedef struct _GstDtmfDetectClass GstDtmfDetectClass; 51 typedef struct _GstDtmfDetectPrivate GstDtmfDetectPrivate; 52 53 struct _GstDtmfDetect 54 { 55 GstBaseTransform parent; 56 57 dtmf_rx_state_t *dtmf_state; 58 }; 59 60 struct _GstDtmfDetectClass 61 { 62 GstBaseTransformClass parent_class; 63 }; 64 65 GType gst_dtmf_detect_get_type (void); 66 67 gboolean gst_dtmf_detect_plugin_init (GstPlugin *plugin); 68 69 G_END_DECLS 70 71 #endif /* __GST_DTMF_DETECT_H__ */ 72