annotate libmpdemux/rtp.h @ 19188:18faf2912391

Missed HAVE_TV_V4L --> HAVE_TV_V4L1 rename.
author diego
date Thu, 27 Jul 2006 09:33:24 +0000
parents 317e0fd394c5
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
0783dd397f74 CVS --> Subversion in copyright notices
diego
parents: 15178
diff changeset
3 * Modified for use with MPlayer, for details see the changelog at
0783dd397f74 CVS --> Subversion in copyright notices
diego
parents: 15178
diff changeset
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
bed6226ffb46 RTP support patch by Brian Kuschak <bkuschak@yahoo.com>
arpi
parents:
diff changeset
8 #ifndef _RTP_H
bed6226ffb46 RTP support patch by Brian Kuschak <bkuschak@yahoo.com>
arpi
parents:
diff changeset
9 #define _RTP_H
bed6226ffb46 RTP support patch by Brian Kuschak <bkuschak@yahoo.com>
arpi
parents:
diff changeset
10
10281
54bcbf28698a Networking support under MinGW.
diego
parents: 3686
diff changeset
11 #include "config.h"
54bcbf28698a Networking support under MinGW.
diego
parents: 3686
diff changeset
12 #ifndef HAVE_WINSOCK2
3686
bed6226ffb46 RTP support patch by Brian Kuschak <bkuschak@yahoo.com>
arpi
parents:
diff changeset
13 #include <sys/socket.h>
10281
54bcbf28698a Networking support under MinGW.
diego
parents: 3686
diff changeset
14 #else
54bcbf28698a Networking support under MinGW.
diego
parents: 3686
diff changeset
15 #include <winsock2.h>
54bcbf28698a Networking support under MinGW.
diego
parents: 3686
diff changeset
16 #endif
3686
bed6226ffb46 RTP support patch by Brian Kuschak <bkuschak@yahoo.com>
arpi
parents:
diff changeset
17
bed6226ffb46 RTP support patch by Brian Kuschak <bkuschak@yahoo.com>
arpi
parents:
diff changeset
18 struct rtpbits {
bed6226ffb46 RTP support patch by Brian Kuschak <bkuschak@yahoo.com>
arpi
parents:
diff changeset
19 unsigned int v:2; /* version: 2 */
bed6226ffb46 RTP support patch by Brian Kuschak <bkuschak@yahoo.com>
arpi
parents:
diff changeset
20 unsigned int p:1; /* is there padding appended: 0 */
bed6226ffb46 RTP support patch by Brian Kuschak <bkuschak@yahoo.com>
arpi
parents:
diff changeset
21 unsigned int x:1; /* number of extension headers: 0 */
bed6226ffb46 RTP support patch by Brian Kuschak <bkuschak@yahoo.com>
arpi
parents:
diff changeset
22 unsigned int cc:4; /* number of CSRC identifiers: 0 */
bed6226ffb46 RTP support patch by Brian Kuschak <bkuschak@yahoo.com>
arpi
parents:
diff changeset
23 unsigned int m:1; /* marker: 0 */
bed6226ffb46 RTP support patch by Brian Kuschak <bkuschak@yahoo.com>
arpi
parents:
diff changeset
24 unsigned int pt:7; /* payload type: 33 for MPEG2 TS - RFC 1890 */
bed6226ffb46 RTP support patch by Brian Kuschak <bkuschak@yahoo.com>
arpi
parents:
diff changeset
25 unsigned int sequence:16; /* sequence number: random */
bed6226ffb46 RTP support patch by Brian Kuschak <bkuschak@yahoo.com>
arpi
parents:
diff changeset
26 };
bed6226ffb46 RTP support patch by Brian Kuschak <bkuschak@yahoo.com>
arpi
parents:
diff changeset
27
bed6226ffb46 RTP support patch by Brian Kuschak <bkuschak@yahoo.com>
arpi
parents:
diff changeset
28 struct rtpheader { /* in network byte order */
bed6226ffb46 RTP support patch by Brian Kuschak <bkuschak@yahoo.com>
arpi
parents:
diff changeset
29 struct rtpbits b;
bed6226ffb46 RTP support patch by Brian Kuschak <bkuschak@yahoo.com>
arpi
parents:
diff changeset
30 int timestamp; /* start: random */
bed6226ffb46 RTP support patch by Brian Kuschak <bkuschak@yahoo.com>
arpi
parents:
diff changeset
31 int ssrc; /* random */
bed6226ffb46 RTP support patch by Brian Kuschak <bkuschak@yahoo.com>
arpi
parents:
diff changeset
32 };
bed6226ffb46 RTP support patch by Brian Kuschak <bkuschak@yahoo.com>
arpi
parents:
diff changeset
33
bed6226ffb46 RTP support patch by Brian Kuschak <bkuschak@yahoo.com>
arpi
parents:
diff changeset
34
18803
c56ae984dbc1 static-ized a couple of functions
nicodvb
parents: 18783
diff changeset
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
bed6226ffb46 RTP support patch by Brian Kuschak <bkuschak@yahoo.com>
arpi
parents:
diff changeset
37
bed6226ffb46 RTP support patch by Brian Kuschak <bkuschak@yahoo.com>
arpi
parents:
diff changeset
38 #endif