[Top][All Lists]

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

Re: [Linphone-developers] liblinphone API

From: Simon Morlat
Subject: Re: [Linphone-developers] liblinphone API
Date: Tue, 02 Mar 2010 10:32:38 +0100

Hi Matthias,

What you're suggesting is the ideal way of doing things.
Unfortunately this is not implementable for several reasons:
- many fds are out of control of liblinphone, especially in the SIP
- there are many timers (to retransmit SIP packets, registers,
subscribes, notify...). These timers are not related with any file
descriptors. Thus the api should need also to add virtual pointers such
as set_timer/unset_timer . This would make things really complex.

As far as I know when called every 30ms iterate() consumes very little
cpu (you can't even notice linphone with 'top').
I admit that on embedded hardware with battery this could be a problem,
but you are free to call iterate() with longer intervals.


Le mardi 16 février 2010 à 20:03 +0100, Matthias Berndt a écrit :
> Hi, 
> first of all i'd like to say that i think that linphone is a great 
> application. 
> Of all the SIP VoIP programs i've tried linphone is the only one that 
> actually 
> worked for me. 
> That said, i don't like the way that liblinphone interacts with the 
> application. 
> One needs to call linphone_core_iterate regularly, and ltrace shows me that 
> this 
> is done dozens of time per second in the GTK+ frontend. This wastes CPU time 
> and 
> energy. 
> I think that this problem can be solved with system calls like select or 
> poll. 
> One could add additional callbacks such as these to the _LinphoneVTable 
> structure:
> void (*add_pollable_fd)(struct _LinphoneCore *lc, int fd, short events);
> void (*remove_pollable_fd)(struct _LinphoneCore *lc, int fd);
> where fd is a file descriptor and events is an ORed combination of POLLIN, 
> POLLOUT etc. This would allow liblinphone to tell the application about the 
> file 
> descriptors it is interested in. The application can then use poll, select 
> etc. 
> with these file descriptors and call linphone_core_iterate only when 
> necessary. 
> What do you think about the idea? 
> _______________________________________________
> Linphone-developers mailing list
> address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]