[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Linphone-developers] rtp_session_recv_with_ts and buffer length
From: |
Simon Morlat |
Subject: |
Re: [Linphone-developers] rtp_session_recv_with_ts and buffer length |
Date: |
Mon, 20 Feb 2006 12:58:41 +0100 |
User-agent: |
KMail/1.9.1 |
Hi,
Are you incrementing the timestamp by 160 each time ?
If you want to get the exact buffer for the packet, you can use the
rtp_session_recvm_with_ts(). It returns you the rtp packet:
while(1){
mblk_t *mp=rtp_session_recvm_with_ts(session, ts);
if (mp!=NULL){
//the rtp header is between mp->b_rptr and mp->b_wptr
//the rtp payload is between mp->b_cont->b_rptr and
mp->b_cont->b_wptr
mblk_t *payload=mp->b_cont;
int len=payload->b_wptr-payload->b_rptr;
output_to_sound_device(payload->b_rptr,len);
}
ts+=160;
}
Simon
Le Jeudi 16 Février 2006 23:25, Nicholas J Humfrey a écrit :
> Hi,
>
> I have been calling rtp_session_recv_with_ts (with scheduling and
> blocking mode turned on) with a buffer bigger than I am actually
> expecting data for. eg (passing a 1024 byte buffer, when expecting
> 160 PCMU bytes back).
>
> I was expecting to only get enough data for the timestamp I was
> asking for, but instead it seems to be giving me more data than I was
> expecting and then later getting confused that it doesn't have enough
> data for me and dropping out.
>
> Is this a bug or a feature? I was hoping to only have to think about
> timestamps and like oRTP work out how much data there is available
> for that timestamp....
>
>
> Thanks,
>
> nick.
>
>
>
> _______________________________________________
> Linphone-developers mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/linphone-developers