|
From: | Sylvain Berfini |
Subject: | Re: [Linphone-developers] Set call duration! |
Date: | Tue, 27 Oct 2015 15:28:02 +0100 |
User-agent: | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
Hi Bilal,
In coreapi/linphonecall.c, in the method linphone_call_set_state, you'll see a call->log->connected_date_time = ms_time(NULL) for the state LinphoneCallConnected. If you move/copy this statement into the LinphoneCallStreamsRunning, the getDuration() method will return the time since the call has really started. Beware that a single call can go multiple times through the state LinphoneCallStreamsRunning! If you don't want to touch the source code, you can always store somewhere the time difference between the first time your call went into LinphoneCallStreamsRunning state and the getDuration() value at this time, and then always substract this value to the getDuration() result... Cheers. Sylvain Berfini Software Engineer @ Belledonne CommunicationsLe 27/10/2015 15:10, bilal khan a écrit :
|
[Prev in Thread] | Current Thread | [Next in Thread] |