[Top][All Lists]

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

[Linphone-users]Question really needs help!

From: 军 陈
Subject: [Linphone-users]Question really needs help!
Date: Tue, 17 Sep 2002 10:38:41 +0800 (CST)

Dear simon & all:
     I want to do some modification to the oRTP in order to make it be able to support delay and delay jitter  calculation between two UAs.But what puzzled me most is that I cannot grasp the RTP
packets transferred on the network.When I use ethereal in linux,the packets I grasp is only 19 bytes(except for the IP header and UDP header part) while I can hear the voice from one machine in the other machine,but the data size is impossible for a voice data.Why?
and after examining the source code ,I was puzzled by the process result in the function io_aodio_loop in io.c.Here I listed the source code below.
   static void * io_audio_loop(void *p)
     95 {
     96     RtpSession* rtph= (RtpSession*)p;
     97     int err;
     98     char rtpdata[RTP_SIZE];
     99     char *aubuf;
    100     guint32 ts=0,tsinc;
    101     int havemore=0;
    103     tsinc=codinfo->fr_size/2;
    104     while(iocond)
    105     {
    106         aubuf=get_read_audio_buffer();
    107         codec_encode(audiocodec,aubuf,rtpdata);
    108         printf("Note--sampling now in io_audio_loop = %d\n",sampling_now);
    109         err=rtp_session_send_with_ts(rtph,rtpdata,codinfo->dt_size,ts,sampling_now);
    110         printf("the value of err is %d\n",err);
    111         aubuf=get_write_audio_buffer();
    112         err=rtp_session_recv_with_ts(rtph,rtpdata,codinfo->dt_size,ts,&havemore);
    113         ts+=tsinc;
    114         if (err>0) codec_decode(audiocodec,rtpdata,aubuf);
    115         else
    116         {
    117             /*insert a blank*/
    118             memset(aubuf,0,codinfo->fr_size);
    119         }
    120     }
    121     err=close_dsp();
    122     codec_destroy(audiocodec);
    123     return(NULL);
    124 }
 In the code listed above,I can see the two statements:

printf("Note--sampling now in io_audio_loop = %d\n,sampling_now
printf("the value of err is %d\n",err);
are both executed,but why the I cannot see the print result in the function rtp_session_send_with_ts()???

I am eagerly hoping for the answers from you who have done some work related to it!

Thank you very much!

Do You Yahoo!?
reply via email to

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