3686
|
1 #ifndef _RTP_H
|
|
2 #define _RTP_H
|
|
3
|
10281
|
4 #include "config.h"
|
|
5 #ifndef HAVE_WINSOCK2
|
3686
|
6 #include <sys/socket.h>
|
10281
|
7 #else
|
|
8 #include <winsock2.h>
|
|
9 #endif
|
3686
|
10
|
|
11 struct rtpbits {
|
|
12 unsigned int v:2; /* version: 2 */
|
|
13 unsigned int p:1; /* is there padding appended: 0 */
|
|
14 unsigned int x:1; /* number of extension headers: 0 */
|
|
15 unsigned int cc:4; /* number of CSRC identifiers: 0 */
|
|
16 unsigned int m:1; /* marker: 0 */
|
|
17 unsigned int pt:7; /* payload type: 33 for MPEG2 TS - RFC 1890 */
|
|
18 unsigned int sequence:16; /* sequence number: random */
|
|
19 };
|
|
20
|
|
21 struct rtpheader { /* in network byte order */
|
|
22 struct rtpbits b;
|
|
23 int timestamp; /* start: random */
|
|
24 int ssrc; /* random */
|
|
25 };
|
|
26
|
|
27
|
|
28 int getrtp2(int fd, struct rtpheader *rh, char** data, int* lengthData);
|
|
29
|
|
30 #endif
|