replace gst_element_class_set_details_simple with gst_element_class_set_metadata
[platform/upstream/gstreamer.git] / gst / dtmf / gstdtmfcommon.h
1
2 #ifndef __GST_RTP_DTMF_COMMON_H__
3 #define __GST_RTP_DTMF_COMMON_H__
4
5 #define MIN_INTER_DIGIT_INTERVAL 100     /* ms */
6 #define MIN_PULSE_DURATION       250     /* ms */
7
8 #define MIN_VOLUME               0
9 #define MAX_VOLUME               36
10
11 #define MIN_EVENT                0
12 #define MAX_EVENT                15
13 #define MIN_EVENT_STRING         "0"
14 #define MAX_EVENT_STRING         "15"
15
16 #ifndef M_PI
17 #define M_PI           3.14159265358979323846  /* pi */
18 #endif
19
20 typedef struct
21 {
22   unsigned event:8;             /* Current DTMF event */
23 #if G_BYTE_ORDER == G_LITTLE_ENDIAN
24   unsigned volume:6;            /* power level of the tone, in dBm0 */
25   unsigned r:1;                 /* Reserved-bit */
26   unsigned e:1;                 /* End-bit */
27 #elif G_BYTE_ORDER == G_BIG_ENDIAN
28   unsigned e:1;                 /* End-bit */
29   unsigned r:1;                 /* Reserved-bit */
30   unsigned volume:6;            /* power level of the tone, in dBm0 */
31 #else
32 #error "G_BYTE_ORDER should be big or little endian."
33 #endif
34   unsigned duration:16;         /* Duration of digit, in timestamp units */
35 } GstRTPDTMFPayload;
36
37 #endif /* __GST_RTP_DTMF_COMMON_H__ */