mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-31 02:33:44 +00:00
Improvements to last commit, this should make things work better on all platforms
This commit is contained in:
parent
05144df25a
commit
d655031534
@ -68,39 +68,30 @@
|
|||||||
* fully pack the bit fields.
|
* fully pack the bit fields.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(push)
|
|
||||||
#pragma warning(disable : 4214)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
unsigned char cc:4; /* CSRC count */
|
unsigned cc:4; /* CSRC count */
|
||||||
unsigned char x:1; /* header extension flag */
|
unsigned x:1; /* header extension flag */
|
||||||
unsigned char p:1; /* padding flag */
|
unsigned p:1; /* padding flag */
|
||||||
unsigned char version:2; /* protocol version */
|
unsigned version:2; /* protocol version */
|
||||||
unsigned char pt:7; /* payload type */
|
unsigned pt:7; /* payload type */
|
||||||
unsigned char m:1; /* marker bit */
|
unsigned m:1; /* marker bit */
|
||||||
uint16_t seq; /* sequence number */
|
unsigned seq:16; /* sequence number */
|
||||||
uint32_t ts; /* timestamp */
|
unsigned ts:32; /* timestamp */
|
||||||
uint32_t ssrc; /* synchronization source */
|
unsigned ssrc:32; /* synchronization source */
|
||||||
} srtp_hdr_t;
|
} srtp_hdr_t;
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(pop)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#else /* BIG_ENDIAN */
|
#else /* BIG_ENDIAN */
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
unsigned char version:2; /* protocol version */
|
unsigned version:2; /* protocol version */
|
||||||
unsigned char p:1; /* padding flag */
|
unsigned p:1; /* padding flag */
|
||||||
unsigned char x:1; /* header extension flag */
|
unsigned x:1; /* header extension flag */
|
||||||
unsigned char cc:4; /* CSRC count */
|
unsigned cc:4; /* CSRC count */
|
||||||
unsigned char m:1; /* marker bit */
|
unsigned m:1; /* marker bit */
|
||||||
unsigned pt:7; /* payload type */
|
unsigned pt:7; /* payload type */
|
||||||
uint16_t seq; /* sequence number */
|
unsigned seq:16; /* sequence number */
|
||||||
uint32_t ts; /* timestamp */
|
unsigned ts:32; /* timestamp */
|
||||||
uint32_t ssrc; /* synchronization source */
|
unsigned ssrc:32; /* synchronization source */
|
||||||
} srtp_hdr_t;
|
} srtp_hdr_t;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@ -120,24 +111,15 @@ typedef struct {
|
|||||||
|
|
||||||
#ifndef WORDS_BIGENDIAN
|
#ifndef WORDS_BIGENDIAN
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(push)
|
|
||||||
#pragma warning(disable : 4214)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
unsigned char rc:5; /* reception report count */
|
unsigned rc:5; /* reception report count */
|
||||||
unsigned char p:1; /* padding flag */
|
unsigned p:1; /* padding flag */
|
||||||
unsigned char version:2; /* protocol version */
|
unsigned version:2; /* protocol version */
|
||||||
unsigned char pt:8; /* payload type */
|
unsigned pt:8; /* payload type */
|
||||||
uint16_t len; /* length */
|
unsigned len:16; /* length */
|
||||||
uint32_t ssrc; /* synchronization source */
|
unsigned ssrc:32; /* synchronization source */
|
||||||
} srtcp_hdr_t;
|
} srtcp_hdr_t;
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning(pop)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
unsigned int index:31; /* srtcp packet index in network order! */
|
unsigned int index:31; /* srtcp packet index in network order! */
|
||||||
unsigned int e:1; /* encrypted? 1=yes */
|
unsigned int e:1; /* encrypted? 1=yes */
|
||||||
@ -149,12 +131,12 @@ typedef struct {
|
|||||||
#else /* BIG_ENDIAN */
|
#else /* BIG_ENDIAN */
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
unsigned char version:2; /* protocol version */
|
unsigned version:2; /* protocol version */
|
||||||
unsigned char p:1; /* padding flag */
|
unsigned p:1; /* padding flag */
|
||||||
unsigned char rc:5; /* reception report count */
|
unsigned rc:5; /* reception report count */
|
||||||
unsigned char pt:8; /* payload type */
|
unsigned pt:8; /* payload type */
|
||||||
uint16_t len; /* length */
|
uint16_t len; /* length */
|
||||||
uint32_t ssrc; /* synchronization source */
|
uint32_t ssrc; /* synchronization source */
|
||||||
} srtcp_hdr_t;
|
} srtcp_hdr_t;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user