How to do a periodic check?

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

 



Thanks Benny, but I have not understood what you said. I am trying always the easier solution you purpose. 
About this function:
pj_status_t pjsip_endpt_schedule_timer ( endpt,
                                                        entry,
                                                        delay);
Then in the explanation it is said that "When the timeout for the timer has elapsed, the callback specified in the entry argument will be called." 
I wonder if something like: 
        pj_status_t pjsip_endpt_schedule_timer (pjsua_get_pjmedia_endpt(),
                                                        pjsua_call_dump(current_call, ...rest of parameters...);,
                                                        5); //supposing the delay is in seconds
would work... 
Will this call execute pjsua_call_dump every 5 sec? 
 
Thanks Benny for all your effort!
 
> Date: Mon, 31 Mar 2008 10:27:18 +0100> From: bennylp@xxxxxxxxx> To: pjsip at lists.pjsip.org> Subject: Re: How to do a periodic check?> > On Mon, Mar 31, 2008 at 10:01 AM, Markus Vechiorno <finalpfc at hotmail.com> wrote:> > Hi,> >> > I want to make a check of some parameters every x seconds (periodically).> > Is there a way to call to a function periodically?> > I can use the functions implemented in "dq" in pjsua because what I need is> > to check the packet loss rate.> >> > I saw smth about pjmedia clock, but I need to know how to control it.> >> > For example, if I want to call pjsua_call_dump ecery 2 seconds what could> > be the way?> > You can use pjsip_endpt_schedule_timer() to schedule a timer. The> pjmedia clock probably is too heavy for this since it creates a worker> thread with real-time priority to wait for the timer (although you can> disable the priority boost). But you can use that, just set> samples_per_frame to N*clock_rate if you want the callback to be> called once every N seconds.> > Cheers> Benny> > _______________________________________________> Visit our blog: http://blog.pjsip.org> > pjsip mailing list> pjsip at lists.pjsip.org> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
_________________________________________________________________
Tecnolog?a, moda, motor, viajes,?suscr?bete a nuestros boletines para estar siempre a la ?ltima
Guapos y guapas, clips musicales y estrenos de cine. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080331/9610081d/attachment.html 


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux