63 lines
1.3 KiB
C
63 lines
1.3 KiB
C
#ifndef __SOCK__
|
|
#define __SOCK__
|
|
#include <winsock2.h>
|
|
#include <Windows.h>
|
|
#include "stdio.h"
|
|
#ifdef linux
|
|
typedef int Sock;
|
|
#endif
|
|
|
|
#ifdef WIN32
|
|
typedef SOCKET Sock;
|
|
#endif
|
|
Sock Connect(char *ip,int port);
|
|
int Send(Sock s,char*dat, int len);
|
|
int Recv(Sock s,char *rec,int len);
|
|
/*
|
|
ANNOUNCE rtsp://118.24.238.198:554/Sword RTSP/1.0
|
|
CSeq: 1
|
|
User-Agent: EasyPusher v1.2.16.1105
|
|
Content-Type: application/sdp
|
|
Content-Length: 384
|
|
|
|
v=0
|
|
o=- 0 0 IN IP4 127.0.0.1
|
|
s=EasyDarwin
|
|
i=EasyDarwin
|
|
c=IN IP4 127.0.0.1
|
|
t=0 0
|
|
a=x-qt-text-nam:EasyDarwin
|
|
a=x-qt-text-inf:EasyDarwin
|
|
a=x-qt-text-cmt:source application::EasyDarwin
|
|
a=x-qt-text-aut:
|
|
a=x-qt-text-cpy:
|
|
m=video 0 RTP/AVP 96
|
|
a=rtpmap:96 H264/90000
|
|
a=fmtp:96 packetization-mode=1;sprop-parameter-sets=,2QAKKy0A8ARPywgAAADACAAAAMD0eMGVA==
|
|
a=control:streamid=0
|
|
|
|
ANNOUNCE rtsp://118.24.238.198:554/Sword RTSP/1.0
|
|
CSeq: 1
|
|
User-Agent: EasyPusher v1.2.16.1105
|
|
Content-Type: application/sdp
|
|
Content-Length: 384
|
|
|
|
v=0
|
|
o=- 0 0 IN IP4 127.0.0.1
|
|
s=EasyDarwin
|
|
i=EasyDarwin
|
|
c=IN IP4 127.0.0.1
|
|
t=0 0
|
|
a=x-qt-text-nam:EasyDarwin
|
|
a=x-qt-text-inf:EasyDarwin
|
|
a=x-qt-text-cmt:source application::EasyDarwin
|
|
a=x-qt-text-aut:
|
|
a=x-qt-text-cpy:
|
|
m=video 0 RTP/AVP 96
|
|
a=rtpmap:96 H264/90000
|
|
a=fmtp:96 packetization-mode=1;sprop-parameter-sets=,2QAKKy0A8ARPywgAAADACAAAAMD0eMGVA==
|
|
a=control:streamid=0
|
|
|
|
*/
|
|
|
|
#endif |