-
Notifications
You must be signed in to change notification settings - Fork 0
/
audio_rtp.h
32 lines (29 loc) · 979 Bytes
/
audio_rtp.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#define NONE "\033[m"
#define RED "\033[1;31m"
#define GREEN "\033[1;32m"
#define BLUE "\033[1;34m"
typedef struct
{
/** byte 0 */
unsigned char csrc_len:4; /** expect 0 */
unsigned char extension:1; /** expect 1, see RTP_OP below */
unsigned char padding:1; /** expect 0 */
unsigned char version:2; /** expect 2 */
/** byte 1 */
unsigned char payload:7; /** stream type */
unsigned char marker:1; /** when send the first framer,set it */
/** bytes 2, 3 */
unsigned short seq_no;
/** bytes 4-7 */
unsigned long timestamp;
/** bytes 8-11 */
unsigned long ssrc; /** stream number is used here. */
} RTP_FIXED_HEADER;
typedef struct audio_param_t
{
char *audio_hw;
char *dest_ip ;
int dest_port;
int local_port;
} audio_param_t;
void *audio_rtp(void *AudioParam) ;