summaryrefslogtreecommitdiffstats
path: root/libmpdemux/rtp.h
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-12-23 22:09:02 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-12-23 22:09:02 +0000
commit7bbe389f7e3aadfbe5d4f81b773753d12c4dd048 (patch)
treea020c510ae957a556b2c9aeb74a96a4167025fa4 /libmpdemux/rtp.h
parent48a278fe901737a4076df7629df2ed5cd38b28a1 (diff)
downloadmpv-7bbe389f7e3aadfbe5d4f81b773753d12c4dd048.tar.bz2
mpv-7bbe389f7e3aadfbe5d4f81b773753d12c4dd048.tar.xz
RTP support patch by Brian Kuschak <bkuschak@yahoo.com>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3687 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/rtp.h')
-rw-r--r--libmpdemux/rtp.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/libmpdemux/rtp.h b/libmpdemux/rtp.h
new file mode 100644
index 0000000000..3a37ced3dc
--- /dev/null
+++ b/libmpdemux/rtp.h
@@ -0,0 +1,31 @@
+#ifndef _RTP_H
+#define _RTP_H
+
+#include <sys/socket.h>
+
+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 */
+};
+
+
+void initrtp(struct rtpheader *foo); /* fill in the MPEG-2 TS deefaults */
+int sendrtp(int fd, struct sockaddr_in *sSockAddr, struct rtpheader *foo, char *data, int len);
+int getrtp2(int fd, struct rtpheader *rh, char** data, int* lengthData);
+int sendrtp2(int fd, struct sockaddr_in *sSockAddr, struct rtpheader *foo, char *data, int len);
+int getrtp(int fd, struct rtpheader *rh, char** data, int* lengthData);
+int makesocket(char *szAddr,unsigned short port,int TTL,struct sockaddr_in *sSockAddr);
+int makeclientsocket(char *szAddr,unsigned short port,int TTL,struct sockaddr_in *sSockAddr);
+
+#endif