Buffer problem

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

 



Some news about the issue :

Enhancer was probably not the good solution. It reduce used cpu so,
sometimes things are going better.
I've increased the log level and here are new observations :

Sometimes everything goes fine (it is the case when I disable switch board
and remove everything that use CPU). But in most case, it becomes choppy.
With log level set to 5 there is a noticeable difference between the case
where everything is ok and the case were cpu grow up and sound become choppy
:
the difference is that when things are going wrong I get logs like that :

08-18 14:05:13.444: VERBOSE/libpjsip(3151):  14:05:13.445   strm0x40f884
Jitter buffer starts returning normal frames (after 1 empty/lost)
08-18 14:05:13.444: VERBOSE/libpjsip(3151):  14:05:13.452   strm0x40f884
Frame lost!
08-18 14:05:13.503: VERBOSE/libpjsip(3151):  14:05:13.507   strm0x40f884
Jitter buffer starts returning normal frames (after 1 empty/lost)
08-18 14:05:13.513: VERBOSE/libpjsip(3151):  14:05:13.522   strm0x40f884
Frame lost!
08-18 14:05:13.553: VERBOSE/libpjsip(3151):  14:05:13.560   strm0x40f884
Jitter buffer starts returning normal frames (after 1 empty/lost)
08-18 14:05:13.563: VERBOSE/libpjsip(3151):  14:05:13.572   strm0x40f884
Frame lost!

Looping again and again.... (Here plc is disabled else plc also try to do
things and CPU usage is higher and sound more choppy)
And then about each 2/3sec I get something like that :
08-18 14:05:13.843: VERBOSE/libpjsip(3151):  14:05:13.852   strm0x40f884
GET prefetch_cnt=0/12
08-18 14:05:13.843: VERBOSE/libpjsip(3151):  14:05:13.852   strm0x40f884
Jitter buffer is bufferring (prefetch=12)
08-18 14:05:13.863: VERBOSE/libpjsip(3151):  14:05:13.868   strm0x40f884
GET prefetch_cnt=0/12
08-18 14:05:13.913: VERBOSE/libpjsip(3151):  14:05:13.922   strm0x40f884
GET prefetch_cnt=0/12
08-18 14:05:13.934: VERBOSE/libpjsip(3151):  14:05:13.937   strm0x40f884
GET prefetch_cnt=0/12
08-18 14:05:13.993: VERBOSE/libpjsip(3151):  14:05:13.997   strm0x40f884
GET prefetch_cnt=0/12
08-18 14:05:13.993: VERBOSE/libpjsip(3151):  14:05:13.998   strm0x40f884
GET prefetch_cnt=0/12
08-18 14:05:14.023: VERBOSE/libpjsip(3151):  14:05:14.027   strm0x40f884
GET prefetch_cnt=0/12
08-18 14:05:14.053: VERBOSE/libpjsip(3151):  14:05:14.062   strm0x40f884
GET prefetch_cnt=0/12
During this time there is no sound.

I tried to play with jitter buffer init parameter but without any chance. I
don't know exactly what it affects and so it's a little bit foggy for me.
Maybe you'll have a suggestion on what I should try.

What is really really strange is that when things starts well, voice is
really clear and cpu usage is about 15% instead of 80% when it is choppy.




Le 17 ao?t 2010 19:26, R?gis Montoya <r3gis.3r at gmail.com> a ?crit :

> The two agent used mode 30. (Both are using pjsip with the same config)
>
> But I've just made a test that seems to really improve things :
> I've disabled the enhancer (attr->setting.penh = 0;) of ilbc... and by
> miracle things are really better now!
> I've asked a tester to confirm the behavior but regarding my tests it
> really seems to be the reason of the problem.
>
> I did this test because I had a look into the Asterisk code and see that
> they *always* disable the enhancer : that's an non configurable flag set to
> 0 (and they also use
>
> So... good news, and maybe can helps other people with ilbc and low cpu if
> confirmed.
>
> To anticipate, if it is really the cause of the issue :
> I think that there is no way to disable penh neither in config_site.h nor
> in pjsua. Can it be an evolution? I quickely search into the project and saw
> that it is enabled for ilbc and speex
> (I'll also try to disable it with speex and see if sound is better since
> actually it is not as better as I would expect on android - but by far
> better than it was with ilbc).
>
> As for me, I can afford to change by hand, but I would suggest you to add
> an option for penh.
> I assume that a setting in pjsua is not so easy to add, but a precompil
> flag to globaly enable / disable enhancers for codecs could be great (or by
> codec?)
>
> Thx
> Regis
>
>
> 2010/8/17 Benny Prijono <bennylp at teluu.com>
>
> 2010/8/17 R?gis Montoya <r3gis.3r at gmail.com>:
>> > Don't worry, I have already the good config_site set. (And recently
>> > optimized).
>> > Everything is just fine with all other codecs (and even better, I have
>> also
>> > ported the g729 port from samuel and also work really fine) GSM, speex
>> etc
>> > are fine too. Nexus One has a 1GHz CPU and should be enough to support
>> ilbc.
>> >
>> > My point is just a report to help the developer to find out what is
>> going
>> > wrong with ilbc. There is maybe a regression or something bad with it.
>> > That's really strange that 20ms is really good and 30ms become
>> absolutely
>> > unusable? Isn't it?
>> > But if we can support ilbc (as it is announced on the main page of
>> pjsip),
>> > it would be really cool. Well not a necessity but if somebody has an
>> idea on
>> > how to quickly fix it.
>> >
>>
>> The iLBC mode is set to 30ms by default, and I don't recall having any
>> problems with this mode..
>>
>> What peer did you use for the test?
>>
>> According to the spec, if any of the agent uses mode 30, then the
>> other must also use mode 30, even though it initially indicates that
>> it uses mode 20 in its SDP. It could be that the peer is still using
>> mode 20 even though you've set your mode to 30.
>>
>> And yes we used to have this problem in the past, but this was fixed
>> months/year ago, so as long as you have relatively recent pjsip
>> version you should be okay.
>>
>> This can be easily verified by looking at the .pcap capture.
>>
>> 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
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20100818/96de8dd6/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