mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
Fixed previous cherry-pick
This commit is contained in:
parent
9dbf7e36de
commit
0de510100c
3 changed files with 8 additions and 2 deletions
|
|
@ -198,6 +198,8 @@ LINPHONE_PUBLIC float linphone_call_stats_get_round_trip_delay (const LinphoneCa
|
|||
*/
|
||||
LINPHONE_PUBLIC float linphone_call_stats_get_estimated_download_bandwidth(const LinphoneCallStats *stats);
|
||||
|
||||
void linphone_call_stats_set_estimated_download_bandwidth(LinphoneCallStats *stats, float estimated_value);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -359,3 +359,7 @@ float linphone_call_stats_get_round_trip_delay (const LinphoneCallStats *stats)
|
|||
float linphone_call_stats_get_estimated_download_bandwidth(const LinphoneCallStats *stats) {
|
||||
return stats->estimated_download_bandwidth;
|
||||
}
|
||||
|
||||
void linphone_call_stats_set_estimated_download_bandwidth(LinphoneCallStats *stats, float estimated_value) {
|
||||
stats->estimated_download_bandwidth = estimated_value;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2298,8 +2298,8 @@ void MediaSessionPrivate::handleStreamEvents (int streamIndex) {
|
|||
} else if (evt == ORTP_EVENT_NEW_VIDEO_BANDWIDTH_ESTIMATION_AVAILABLE) {
|
||||
lInfo() << "Video bandwidth estimation is " << (int)(evd->info.video_bandwidth_available / 1000.) << " kbit/s";
|
||||
/* If this event happens then it should be a video stream */
|
||||
if (stream_index == call->main_video_stream_index)
|
||||
stats->estimated_download_bandwidth = (float)(evd->info.video_bandwidth_available)*1e-3;
|
||||
if (streamIndex == mainVideoStreamIndex)
|
||||
linphone_call_stats_set_estimated_download_bandwidth(stats, (float)(evd->info.video_bandwidth_available*1e-3));
|
||||
}
|
||||
ortp_event_destroy(ev);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue