ccrtp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ccrtp-devel] lost packets


From: Federico Montesino Pouzols
Subject: Re: [Ccrtp-devel] lost packets
Date: Thu, 31 Jan 2002 12:12:44 +0100
User-agent: Mutt/1.2.5i

On Wed, Jan 30, 2002 at 01:30:18PM -0800, Chris Read wrote:

        Hello,

> I have modified the demo programs rtpsend and
> rtpreceive to begin working with the ccRTP library.
> I have changed them to send a file (poor application
> for UDP, I know, but it lets me work with the code and
> vary the parameters--and check results).  I find,
> however that packet loss is very consistent.
> Typically the first 15-40 packets come through fine,
> but then about 1 in 4 packets gets lost.  

        ¿Is there any recognizable pattern in the packet loss you
mention?

        This problem may happen because you are giving increasing
desynchronized timestamps to putPacket. Taking a look at your code...

      while(*n != 0) {
          inFile.read((char *)&rawblock[2], BLOCKSIZE);
          *n = inFile.gcount();
          putPacket((*i * 90000), RTP_PAYLOAD_JPEG, (unsigned 
char*)&rawblock[0], *n+8);
          //putPacket((*i * (BLOCKSIZE + 8) * 100),
RTP_PAYLOAD_JPEG, (unsigned char *)&rawblock[0], *n+8);
          cerr << "Packet " << *i << ": " << *n << " bytes" <<
endl;
          ccxx_sleep(1000);
          (*i)++;
      }

        The timestamp is increased 1 second for every loop, but every
loop takes more than one second. The inFile.read operation can take
particularly long, so the packets are timestamped with a past
time. You can see an example on how to compute times more accurately
with the TimerPort class of Common C++ in the demo app
demo/audiotx.cpp.

        To check if this is the problem, try giving lower timestamps (
so they will not be in the past but in the future). For instance, give
(*i * 80000).  You can also try setting higher values for sending
expiration with setExpired(). This would match the test you describe
below.

> I have
> changed various parameters such as the size of
> packets, the frequency of packets, the time stamp of
> packets, etc.  One test I ran led me to believe they
> are getting lost in the transmission side.  
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  

        Could you explain that test more detailed. (setExpired()
allows to modify the expiration time at the sending side)

> Do you
> have any suggestions as to where to begin looking?
> 
> (I have attached my filesend.cpp and filereceive.cpp)
> 
> Thanks,
> 
> Chris

        Read you soon!







reply via email to

[Prev in Thread] Current Thread [Next in Thread]