rtp.h
资源名称:NETVIDEO.rar [点击查看]
上传用户:sun1608
上传日期:2007-02-02
资源大小:6116k
文件大小:1k
源码类别:
流媒体/Mpeg4/MP4
开发平台:
Visual C++
- #include <sys/socket.h>
- #include <netinet/in.h>
- struct rtpbits {
- int sequence:16; /* sequence number: random */
- int pt:7; /* payload type: 14 for MPEG audio */
- int m:1; /* marker: 0 */
- int cc:4; /* number of CSRC identifiers: 0 */
- int x:1; /* number of extension headers: 0 */
- int p:1; /* is there padding appended: 0 */
- int v:2; /* version: 2 */
- };
- struct rtpheader { /* in network byte order */
- struct rtpbits b;
- int timestamp; /* start: random */
- int ssrc; /* random */
- int iAudioHeader; /* =0?! */
- };
- void initrtp(struct rtpheader *foo);
- int sendrtp(int fd, struct sockaddr_in *sSockAddr, struct rtpheader *foo, void *data, int len);
- int makesocket(char *szAddr,unsigned short port,int TTL,struct sockaddr_in *sSockAddr);
- void rtp_output(char *mp3buffer,int mp3size);