Calling get_frame constantly without waiting

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

 



Thanks for the answer.

Emil.


On Wed, Nov 25, 2009 at 3:15 AM, Benny Prijono <bennylp at teluu.com> wrote:

> On Sun, Nov 15, 2009 at 8:56 PM, Emil Berg <emilbergg at gmail.com> wrote:
> > Hello,
> >
> > I'm using only the pjmedia library and I'm not sure how to retrieve data
> > correctly.
> > A listener thread is calling get_frame() and if it doesn't receive any
> frame
> > (or receives an empty buffer),
> > then I sleep for 1 millisecond and call it again.
> >
> > Is it good to sleep so little time?
> > I'm afraid that when calling the get_frame() with such little pauses, the
> > jitter buffer gets empty after each call, thus becomes useless.
> > Am I right?
> >
>
> Calling get_frame() repeatedly on a stream is probably a bad idea, as
> the stream gets its "clock" from the get_frame() calls. A better idea
> is to use the master clock (please see pjmedia docs), which will
> create a thread and do get_frame() on a regular interval for you.
>
> Cheers
>  Benny
>
>
>
> > Thanks,
> > Emil.
> >
>
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20091129/dacabff7/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