2005-04-16 12:51:09 +00:00
|
|
|
/* Imported from the dvbstream project
|
|
|
|
*
|
2006-06-22 13:34:00 +00:00
|
|
|
* Modified for use with MPlayer, for details see the changelog at
|
|
|
|
* http://svn.mplayerhq.hu/mplayer/trunk/
|
2005-04-16 12:51:09 +00:00
|
|
|
* $Id$
|
|
|
|
*/
|
|
|
|
|
2001-12-23 22:09:02 +00:00
|
|
|
#ifndef _RTP_H
|
|
|
|
#define _RTP_H
|
|
|
|
|
2003-06-11 16:48:09 +00:00
|
|
|
#include "config.h"
|
|
|
|
#ifndef HAVE_WINSOCK2
|
2001-12-23 22:09:02 +00:00
|
|
|
#include <sys/socket.h>
|
2003-06-11 16:48:09 +00:00
|
|
|
#else
|
|
|
|
#include <winsock2.h>
|
|
|
|
#endif
|
2001-12-23 22:09:02 +00:00
|
|
|
|
|
|
|
struct rtpbits {
|
|
|
|
unsigned int v:2; /* version: 2 */
|
|
|
|
unsigned int p:1; /* is there padding appended: 0 */
|
|
|
|
unsigned int x:1; /* number of extension headers: 0 */
|
|
|
|
unsigned int cc:4; /* number of CSRC identifiers: 0 */
|
|
|
|
unsigned int m:1; /* marker: 0 */
|
|
|
|
unsigned int pt:7; /* payload type: 33 for MPEG2 TS - RFC 1890 */
|
|
|
|
unsigned int sequence:16; /* sequence number: random */
|
|
|
|
};
|
|
|
|
|
|
|
|
struct rtpheader { /* in network byte order */
|
|
|
|
struct rtpbits b;
|
|
|
|
int timestamp; /* start: random */
|
|
|
|
int ssrc; /* random */
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2006-06-24 09:27:07 +00:00
|
|
|
static int getrtp2(int fd, struct rtpheader *rh, char** data, int* lengthData);
|
2006-06-26 21:27:57 +00:00
|
|
|
int read_rtp_from_server(int fd, char *buffer, int length);
|
2001-12-23 22:09:02 +00:00
|
|
|
|
|
|
|
#endif
|