Mercurial > mplayer.hg
comparison stream/rtp.h @ 19271:64d82a45a05d
introduce new 'stream' directory for all stream layer related components and split them from libmpdemux
author | ben |
---|---|
date | Mon, 31 Jul 2006 17:39:17 +0000 |
parents | libmpdemux/rtp.h@317e0fd394c5 |
children | 0792ad01e9bf |
comparison
equal
deleted
inserted
replaced
19270:7d39b911f0bd | 19271:64d82a45a05d |
---|---|
1 /* Imported from the dvbstream project | |
2 * | |
3 * Modified for use with MPlayer, for details see the changelog at | |
4 * http://svn.mplayerhq.hu/mplayer/trunk/ | |
5 * $Id$ | |
6 */ | |
7 | |
8 #ifndef _RTP_H | |
9 #define _RTP_H | |
10 | |
11 #include "config.h" | |
12 #ifndef HAVE_WINSOCK2 | |
13 #include <sys/socket.h> | |
14 #else | |
15 #include <winsock2.h> | |
16 #endif | |
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 | |
35 static int getrtp2(int fd, struct rtpheader *rh, char** data, int* lengthData); | |
36 int read_rtp_from_server(int fd, char *buffer, int length); | |
37 | |
38 #endif |