[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ccrtp-devel] RE: ccrtp version 0.9 win2k performance
From: |
Yang, Xu |
Subject: |
[Ccrtp-devel] RE: ccrtp version 0.9 win2k performance |
Date: |
Mon, 18 Mar 2002 11:36:19 -0500 |
David, Fed,
The problem seems from the socket.cpp in cc++ for win2k, when there are rtp
packet in queue, the
bool Socket::isPending(Pending pending, timeout_t timeout)
can not use the polling mode under Win2K, and
switch(pending)
{
case pendingInput:
status = select(so + 1, &grp, NULL, NULL, tvp);
break;
...
}
returns 0 although there are pkts in queue.
Xu
-----Original Message-----
From: Yang, Xu
Sent: Monday, March 18, 2002 9:58 AM
To: 'David Sugar'; Federico Montesino Pouzols
Cc: Yang, Xu; 'address@hidden'
Subject: ccrtp version 0.9 win2k performance
Dear David, Fed,
I am not sure if this is caused by my poor system (pII400 512M mem) or by my
badly tuning. When I send 1000 pkts (512 byte each), I only received ~700 of
them. And the CPU usage is 100% all the time. The rtpsend and rtplisten
example is used during the test. the sender has the following segment in the
code:
for ( int i = 0; i < count ; i++ ) {
putPacket(i*1600,RTP_PAYLOAD_PCMU,
data,strlen((char *)data) + 1);
cout << "write" << i << " packets" << endl;
ccxx_sleep(200);
}
Is this the same on linux?
While I try to build a rtp router by combine the rtpsend and rtplisten code,
I lost even more.
Here is the router class, any suggestion? comments?
Thanks
Xu Yang
class Router {
public:
Router(InetHostAddress& in_ia, tpport_t in_port, InetHostAddress&
out_ia, tpport_t out_port)
{
RTPSocket *inRTPSocket = new RTPSocket(in_ia, in_port);
inRTPSocket->connect(in_ia,5004);
RTPSocket *outRTPSocket = new
RTPSocket(InetHostAddress("0.0.0.0"));
outRTPSocket->setTimeout((uint32)0);
outRTPSocket->setExpired((uint32)1000000);
if ( outRTPSocket->connect(out_ia,out_port) < 0 ) {
cerr << "Could not connect" << endl;
exit;
}
int i=0;
for (;;) {
//cerr << getFirstTimestamp();
if (
inRTPSocket->getPacket(inRTPSocket->getFirstTimestamp(),buffer,SIZE) )
{
cout << "I got one, buffer= " << buffer <<
endl;
outRTPSocket->putPacket(i*1600,RTP_PAYLOAD_PCMU,
buffer,strlen((char *)buffer) + 1);
cout << "write" << i++ << " packets" <<
endl;
}
ccxx_sleep(200);
}
delete inRTPSocket;
delete outRTPSocket;
}
private:
enum { SIZE = 8192 };
unsigned char buffer[SIZE];
};
- [Ccrtp-devel] RE: ccrtp version 0.9 win2k performance,
Yang, Xu <=