How can we set the time interval between two times to call port get_frame and put_frame?

L
Liusheng
Wed, Sep 3, 2008 5:28 AM

I want to the timer setting in PJSIP. we know when call set up, will call back the port get_frame and put_frame to get the voice data?

but how to set the time interval between two times to call put frame or get frame?

Thanks


一点即聊,MSN推出新功能“点我!”
http://im.live.cn/click/

I want to the timer setting in PJSIP. we know when call set up, will call back the port get_frame and put_frame to get the voice data? but how to set the time interval between two times to call put frame or get frame? Thanks _________________________________________________________________ 一点即聊,MSN推出新功能“点我!” http://im.live.cn/click/
NI
Nanang Izzuddin
Wed, Sep 3, 2008 2:13 PM

Hi,

Basically pjmedia clock is controlled by sound device clock (or master
clock if you use null sound device). Sound device/master clock
interval is implisitly set by combination of its attributes, i.e:
samples per frame, channel count and clock rate.

For example:
samples per frame = 160
channel count = 1
clock rate = 16000
the interval will be: (160 / 1 / 16000) * 1000 = 10 ms
Please note that some sound devices may have clock drift, so the
interval is not exactly 10 ms, and even sometimes there is burst e.g:
clocked 5 times sequentially in a very short period then the next
clock comes after about 5*10 ms.

Regards,
nanang

On 03/09/2008, Liusheng liu_sx2006@hotmail.com wrote:

I want to the timer setting in PJSIP. we know when call set up, will call
back the port get_frame and put_frame to get the voice data?

but how to set the time interval between two times to call put frame or get
frame?

Thanks


MSN上小游戏,工作休闲两不误! 马上就开始玩!


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

Hi, Basically pjmedia clock is controlled by sound device clock (or master clock if you use null sound device). Sound device/master clock interval is implisitly set by combination of its attributes, i.e: samples per frame, channel count and clock rate. For example: samples per frame = 160 channel count = 1 clock rate = 16000 the interval will be: (160 / 1 / 16000) * 1000 = 10 ms Please note that some sound devices may have clock drift, so the interval is not exactly 10 ms, and even sometimes there is burst e.g: clocked 5 times sequentially in a very short period then the next clock comes after about 5*10 ms. Regards, nanang On 03/09/2008, Liusheng <liu_sx2006@hotmail.com> wrote: > I want to the timer setting in PJSIP. we know when call set up, will call > back the port get_frame and put_frame to get the voice data? > > but how to set the time interval between two times to call put frame or get > frame? > > Thanks > > ________________________________ > MSN上小游戏,工作休闲两不误! 马上就开始玩! > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > >