[MOVED FROM GST-P-FARSIGHT] Do wierd casting of the volume to make MSVC happy
[platform/upstream/gstreamer.git] / gst / dtmf / gstrtpdtmfcommon.h
1
2 #ifndef __GST_RTP_DTMF_COMMON_H__
3 #define __GST_RTP_DTMF_COMMON_H__
4
5
6 typedef struct {
7   unsigned  event:8;         /* Current DTMF event */
8 #if G_BYTE_ORDER == G_LITTLE_ENDIAN
9   unsigned  volume:6;        /* power level of the tone, in dBm0 */
10   unsigned  r:1;             /* Reserved-bit */
11   unsigned  e:1;             /* End-bit */
12 #elif G_BYTE_ORDER == G_BIG_ENDIAN
13   unsigned  e:1;             /* End-bit */
14   unsigned  r:1;             /* Reserved-bit */
15   unsigned  volume:6;        /* power level of the tone, in dBm0 */
16 #else
17 #error "G_BYTE_ORDER should be big or little endian."
18 #endif
19   unsigned  duration:16;     /* Duration of digit, in timestamp units */
20 } GstRTPDTMFPayload;
21
22 #endif /* __GST_RTP_DTMF_COMMON_H__ */