更新時間:2019-11-20
描述
用戶正在通話中或者會議中,用戶可以獲取當前呼叫的信號強度和質量數據信息,如果在當前正在主動共享或觀看共享,用戶還能獲取共享的質量數據信息。
前提條件
用戶正在通話中或者會議中。
業(yè)務流程
TSDK_E_CALL_EVT_STATISTIC_INFO事件每5秒上報一次,若UI需要更高頻率獲取音視頻質量數據,可以調用tsdk_get_call_statistic_info()接口獲取。
代碼示例:
//c code case TSDK_E_CALL_EVT_STATISTIC_INFO: { handle_call_statistic_info(param1, param2, (TSDK_S_CALL_STATISTIC_INFO *)data); break; }
代碼示例:
//c code - (VideoStreamInfo *)getSignalDataInfo { TSDK_S_SHARE_STATISTIC_INFO share_statistic_info; memset(&share_statistic_info, 0, sizeof(TSDK_S_SHARE_STATISTIC_INFO)); tsdk_get_share_statistic_info(_confHandle, &share_statistic_info); VideoStreamInfo *videoStreamInfo = [[VideoStreamInfo alloc] init]; videoStreamInfo.sendBitRate = share_statistic_info.send_bit_rate; videoStreamInfo.sendFrameSize = [NSString stringWithFormat:@"%u*%u",share_statistic_info.send_frame_size_width,share_statistic_info.send_frame_size_height]; videoStreamInfo.sendFrameRate = share_statistic_info.send_frame_rate; videoStreamInfo.sendLossFraction = share_statistic_info.send_pkt_loss; videoStreamInfo.sendDelay = share_statistic_info.send_rtt; videoStreamInfo.sendJitter = share_statistic_info.send_jitter; videoStreamInfo.recvBitRate = share_statistic_info.recv_bit_rate; videoStreamInfo.recvFrameSize = [NSString stringWithFormat:@"%u*%u",share_statistic_info.recv_frame_size_width,share_statistic_info.recv_frame_size_height]; videoStreamInfo.recvLossFraction = share_statistic_info.recv_pkt_loss; videoStreamInfo.recvFrameRate = share_statistic_info.recv_frame_rate; videoStreamInfo.recvDelay = share_statistic_info.recv_rtt; videoStreamInfo.recvJitter = share_statistic_info.recv_jitter; return videoStreamInfo; }