1 /* GStreamer DTMF plugin
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Library General Public
5 * License as published by the Free Software Foundation; either
6 * version 2 of the License, or (at your option) any later version.
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Library General Public License for more details.
13 * You should have received a copy of the GNU Library General Public
14 * License along with this library; if not, write to the
15 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
16 * Boston, MA 02110-1301, USA.
19 #ifndef __GST_RTP_DTMF_COMMON_H__
20 #define __GST_RTP_DTMF_COMMON_H__
22 #include <gst/math-compat.h>
24 #define MIN_INTER_DIGIT_INTERVAL 100 /* ms */
25 #define MIN_PULSE_DURATION 250 /* ms */
32 #define MIN_EVENT_STRING "0"
33 #define MAX_EVENT_STRING "15"
37 unsigned event:8; /* Current DTMF event */
38 #if G_BYTE_ORDER == G_LITTLE_ENDIAN
39 unsigned volume:6; /* power level of the tone, in dBm0 */
40 unsigned r:1; /* Reserved-bit */
41 unsigned e:1; /* End-bit */
42 #elif G_BYTE_ORDER == G_BIG_ENDIAN
43 unsigned e:1; /* End-bit */
44 unsigned r:1; /* Reserved-bit */
45 unsigned volume:6; /* power level of the tone, in dBm0 */
47 #error "G_BYTE_ORDER should be big or little endian."
49 unsigned duration:16; /* Duration of digit, in timestamp units */
52 #endif /* __GST_RTP_DTMF_COMMON_H__ */