Mercurial > mplayer.hg
annotate libmpdemux/rtp.h @ 18849:2f4cf2d615cb
fix compilation under mingw (thanks to tempn AT twmi DOT rr DOT com for report and pacman for fix)
author | ben |
---|---|
date | Thu, 29 Jun 2006 17:07:57 +0000 |
parents | 317e0fd394c5 |
children |
rev | line source |
---|---|
15178
8dd7a656eaf8
Mark modified imported files as such to comply more closely with GPL ¡ø2a.
diego
parents:
12799
diff
changeset
|
1 /* Imported from the dvbstream project |
8dd7a656eaf8
Mark modified imported files as such to comply more closely with GPL ¡ø2a.
diego
parents:
12799
diff
changeset
|
2 * |
18783 | 3 * Modified for use with MPlayer, for details see the changelog at |
4 * http://svn.mplayerhq.hu/mplayer/trunk/ | |
15178
8dd7a656eaf8
Mark modified imported files as such to comply more closely with GPL ¡ø2a.
diego
parents:
12799
diff
changeset
|
5 * $Id$ |
8dd7a656eaf8
Mark modified imported files as such to comply more closely with GPL ¡ø2a.
diego
parents:
12799
diff
changeset
|
6 */ |
8dd7a656eaf8
Mark modified imported files as such to comply more closely with GPL ¡ø2a.
diego
parents:
12799
diff
changeset
|
7 |
3686 | 8 #ifndef _RTP_H |
9 #define _RTP_H | |
10 | |
10281 | 11 #include "config.h" |
12 #ifndef HAVE_WINSOCK2 | |
3686 | 13 #include <sys/socket.h> |
10281 | 14 #else |
15 #include <winsock2.h> | |
16 #endif | |
3686 | 17 |
18 struct rtpbits { | |
19 unsigned int v:2; /* version: 2 */ | |
20 unsigned int p:1; /* is there padding appended: 0 */ | |
21 unsigned int x:1; /* number of extension headers: 0 */ | |
22 unsigned int cc:4; /* number of CSRC identifiers: 0 */ | |
23 unsigned int m:1; /* marker: 0 */ | |
24 unsigned int pt:7; /* payload type: 33 for MPEG2 TS - RFC 1890 */ | |
25 unsigned int sequence:16; /* sequence number: random */ | |
26 }; | |
27 | |
28 struct rtpheader { /* in network byte order */ | |
29 struct rtpbits b; | |
30 int timestamp; /* start: random */ | |
31 int ssrc; /* random */ | |
32 }; | |
33 | |
34 | |
18803 | 35 static int getrtp2(int fd, struct rtpheader *rh, char** data, int* lengthData); |
18829
317e0fd394c5
added new native rtsp demuxer code for mpeg-ts over rtp (now both real and non-real servers should be handled)
ben
parents:
18803
diff
changeset
|
36 int read_rtp_from_server(int fd, char *buffer, int length); |
3686 | 37 |
38 #endif |