a few more rtp cleanups.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@866 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2006-03-17 17:01:41 +00:00
parent 0075dce340
commit 10ee3e4347
5 changed files with 11 additions and 46 deletions

View File

@ -1026,11 +1026,7 @@ int RTPSession::SetLocalNote(const void *s,size_t len)
return status;
}
#if ! (defined(WIN32) || defined(_WIN32_WCE))
int RTPSession::GetRTPSocket(void)
#else
SOCKET RTPSession::GetRTPSocket(void)
#endif // WIN32
jrtp_socket_t RTPSession::GetRTPSocket(void)
{
return rtptrans->GetRTPSocket();
}

View File

@ -143,11 +143,7 @@ public:
int SetLocalPhone(const void *s,size_t len);
int SetLocalTool(const void *s,size_t len);
int SetLocalNote(const void *s,size_t len);
#if ! (defined(WIN32) || defined(_WIN32_WCE))
int GetRTPSocket(void);
#else
SOCKET GetRTPSocket(void);
#endif // WIN32
jrtp_socket_t GetRTPSocket(void);
#ifdef RTPDEBUG
void DumpSources();
@ -173,11 +169,7 @@ protected:
const RTPAddress *senderaddress) { }
virtual void OnUnknownPacketFormat(RTCPPacket *rtcppack,const RTPTime &receivetime,
const RTPAddress *senderaddress) { }
#if (defined(WIN32) || defined(_WIN32_WCE))
virtual void OnInvalidRawPacketType(RTPRawPacket *rawpacket, SOCKET socket) { }
#else
virtual void OnInvalidRawPacketType(RTPRawPacket *rawpacket, int socket) { }
#endif
virtual void OnInvalidRawPacketType(RTPRawPacket *rawpacket, jrtp_socket_t socket) { }
virtual void OnNoteTimeout(RTPSourceData *srcdat) { }
virtual void OnBYEPacket(RTPSourceData *srcdat) { }

View File

@ -1300,12 +1300,11 @@ int RTPUDPv4Transmitter::PollSocket(bool rtp)
int recvlen;
char packetbuffer[RTPUDPV4TRANS_MAXPACKSIZE];
#if (defined(WIN32) || defined(_WIN32_WCE))
SOCKET sock;
unsigned long len;
#else
size_t len;
int sock;
#endif // WIN32
jrtp_socket_t sock;
struct sockaddr_in srcaddr;
if (rtp)

View File

@ -1314,12 +1314,11 @@ int RTPUDPv6Transmitter::PollSocket(bool rtp)
RTPSOCKLENTYPE fromlen;
int recvlen;
char packetbuffer[RTPUDPV6TRANS_MAXPACKSIZE];
jrtp_socket_t sock;
#if (defined(WIN32) || defined(_WIN32_WCE))
SOCKET sock;
unsigned long len;
#else
size_t len;
int sock;
#endif // WIN32
struct sockaddr_in6 srcaddr;

View File

@ -78,29 +78,16 @@ private:
class RTPUDPv6TransmissionInfo : public RTPTransmissionInfo
{
public:
#if ! (defined(WIN32) || defined(_WIN32_WCE))
RTPUDPv6TransmissionInfo(std::list<in6_addr> iplist,int rtpsock,int rtcpsock) : RTPTransmissionInfo(RTPTransmitter::IPv6UDPProto)
#else
RTPUDPv6TransmissionInfo(std::list<in6_addr> iplist,SOCKET rtpsock,SOCKET rtcpsock) : RTPTransmissionInfo(RTPTransmitter::IPv6UDPProto)
#endif // WIN32
RTPUDPv6TransmissionInfo(std::list<in6_addr> iplist,jrtp_socket_t rtpsock,jrtp_socket_t rtcpsock) : RTPTransmissionInfo(RTPTransmitter::IPv6UDPProto)
{ localIPlist = iplist; rtpsocket = rtpsock; rtcpsocket = rtcpsock; }
~RTPUDPv6TransmissionInfo() { }
std::list<in6_addr> GetLocalIPList() const { return localIPlist; }
#if ! (defined(WIN32) || defined(_WIN32_WCE))
int GetRTPSocket() const { return rtpsocket; }
int GetRTCPSocket() const { return rtcpsocket; }
#else
SOCKET GetRTPSocket() const { return rtpsocket; }
SOCKET GetRTCPSocket() const { return rtcpsocket; }
#endif // WIN32
jrtp_socket_t GetRTPSocket() const { return rtpsocket; }
jrtp_socket_t GetRTCPSocket() const { return rtcpsocket; }
private:
std::list<in6_addr> localIPlist;
#if ! (defined(WIN32) || defined(_WIN32_WCE))
int rtpsocket,rtcpsocket;
#else
SOCKET rtpsocket,rtcpsocket;
#endif // WIN32
jrtp_socket_t rtpsocket,rtcpsocket;
};
#ifdef RTP_SUPPORT_INLINETEMPLATEPARAM
@ -182,11 +169,7 @@ private:
bool init;
bool created;
bool waitingfordata;
#if (defined(WIN32) || defined(_WIN32_WCE))
SOCKET rtpsock,rtcpsock;
#else // not using winsock
int rtpsock,rtcpsock;
#endif // WIN32
jrtp_socket_t rtpsock,rtcpsock;
in6_addr bindIP;
std::list<in6_addr> localIPs;
u_int16_t portbase;
@ -217,11 +200,7 @@ private:
RTPKeyHashTable<const in6_addr,PortInfo*,RTPUDPv6Trans_GetHashIndex_in6_addr,RTPUDPV6TRANS_HASHSIZE> acceptignoreinfo;
// notification descriptors for AbortWait (0 is for reading, 1 for writing)
#if (defined(WIN32) || defined(_WIN32_WCE))
SOCKET abortdesc[2];
#else
int abortdesc[2];
#endif // WIN32
jrtp_socket_t abortdesc[2];
int CreateAbortDescriptors();
void DestroyAbortDescriptors();
void AbortWaitInternal();