forked from edsiper/h264dec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rtcp.h
55 lines (44 loc) · 1.15 KB
/
rtcp.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#include <stdint.h>
#include <sys/time.h>
#ifndef RTCP_H
#define RTCP_H
/* Payload types */
#define RTCP_SR 200 /* sender report */
#define RTCP_RR 201 /* receiver report */
#define RTCP_SDES 202 /* source description */
#define RTCP_BYE 203 /* good bye */
#define RTCP_APP 204 /* application defined */
/* Identification */
#define RTCP_SSRC 0x0c143e07
struct rtcp_pkg {
/* packet header */
uint8_t version;
uint8_t padding;
uint8_t extension;
uint8_t ccrc;
uint8_t type;
uint16_t length;
/* server report */
uint32_t ssrc;
uint32_t ts_msw;
uint32_t ts_lsw;
uint32_t ts_rtp;
uint32_t sd_pk_c;
uint32_t sd_oc_c;
/* source definition */
uint32_t identifier;
uint8_t sdes_type;
uint8_t sdes_length;
uint16_t sdes_text;
uint8_t sdes_type2;
/* internal / informational */
};
int debug_rtcp;
uint32_t rtcp_dlsr();
struct rtcp_pkg *rtcp_decode(unsigned char *payload,
unsigned long len, int *count);
int rtcp_receiver_report(int fd);
int rtcp_receiver_report_zero(int fd);
int rtcp_receiver_desc(int fd);
int rtcp_worker(int fd);
#endif