ccrtp-devel
[Top][All Lists]
Advanced

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

[Ccrtp-devel] Newbie question regarding demo/audiorx.cpp


From: Arjan
Subject: [Ccrtp-devel] Newbie question regarding demo/audiorx.cpp
Date: Wed, 01 Jun 2005 13:34:01 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910

-----------------begin snipped-----------------------------
unsigned char buffer[PACKET_SIZE];

TimerPort::setTimer(PERIOD);

setCancel(THREAD_CANCEL_IMMEDIATE);

for( int i=0 ; true ; i++ ){
        int count;                      
        do{
                const RTPData &d = socket->getCookedPacket();
                count = d.getSize();
        }while (count <= 0);

        if(i==0)
                ccxx_sleep(20);
                        
        write(audiooutput,buffer,count);
----------------end snipped----------------------------------

Q0.) PACKET_SIZE seems to be calcaulated as: PACKET_SIZE=SAMPLING_RATE*PERIOD/1000
with SAMPLIN_RATE=8000 and PERIOD=20

so in this case the buffer will be 160 uchars.
Does RTPData.getSize () NEVER exceed this value?

Q1.) the buffer is written to the audio-ouput but the buffer is never filled with the 
recieved "audiobytes". Is this correct?

Q2.) Are there more "sources" besides the rfc to consult for better 
understanding of the rtp-lib?
I already found the reference and programmers manual.

Thanks
Arjan





reply via email to

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