[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Linphone-users] Linphone console using 100% CPU
From: |
Simon Morlat |
Subject: |
Re: [Linphone-users] Linphone console using 100% CPU |
Date: |
Mon, 16 Jun 2008 15:46:05 +0200 |
User-agent: |
KMail/1.9.9 |
>
> funnily enough when I do a man readline, under "bugs" I found this:
>
> BUGS
> It's too big and too slow.
>
> If the main loop is polling for input from the keyboard, wouldn't it be
> possible to use another function like scanf("%s",&inputbuffer);
> Such functions work under DOS, which is where I learnt C, I am unsure if
> the gcc libc supports this *shrugs*
Yes it is possible, but the problem is that linphone_core_iterate() must be
called periodically (every 50 ms, even if nothing is entered in the command
line).
So if you want to do this, you should have a separate thread running scanf()
and passing commands through a shared buffer to the main thread who is
running the actual readline loop.
Simon
>
> Let me know what you think.
>
> Thanks!
> Alex
>
> Simon Morlat wrote:
> > Did you finally found a workaround for the terminal issue ? Looks like a
> > problem with readline support.
> >
> > - concerning oRTP: yes there is a difference between the lastest oRTP
> > released and the one embedded in linphone (my fault). The one embedded in
> > linphone tarball always works (guaranteed).
> >
> > About the cpu usage: which codec did you use ?
> > How powefull is your machine ? speex and gsm codecs are the most cpu
> > consuming. G711 Alaw and mulaw consume very few cpu: enable only these
> > two ones by editing the ~/.linphonerc config file.
> >
> > Simon
> >
> > Le Wednesday 23 April 2008 09:39:01 alex, vous avez écrit :
> >> Sorry to flood, but this is a seperate issue.
> >>
> >> Top output:
> >> ---------------
> >>
> >> last pid: 24352; load averages: 1.15, 1.09,
> >> 1.03
> >> up 0+03:41:12 16:39:24
> >> 58 processes: 3 running, 55 sleeping
> >> CPU states: 30.8% user, 0.0% nice, 68.8% system, 0.4% interrupt, 0.0%
> >> idle
> >> Mem: 75M Active, 266M Inact, 94M Wired, 440K Cache, 112M Buf, 1552M Free
> >> Swap: 2007M Total, 2007M Free
> >>
> >> PID USERNAME THR PRI NICE SIZE RES STATE TIME WCPU COMMAND
> >> 24339 ahhyes 4 97 0 7032K 4064K RUN 0:35 104.79%
> >> linphonec
> >>
> >> Side effect is choppy audio. When cpu usage drops under 100% audio
> >> quality if fine for that period.
> >> Is this program doing something naughty in its main loop?
> >>
> >> How can I find out what is bogging things down.
> >>
> >>
> >>
> >> _______________________________________________
> >> Linphone-users mailing list
> >> address@hidden
> >> http://lists.nongnu.org/mailman/listinfo/linphone-users
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Linphone-users] Linphone console using 100% CPU,
Simon Morlat <=