手机看片1024精品国产,丁香婷婷成人,午夜国产一级片,黄色片网站在线免费观看,男人的天堂香蕉在线视频,一级特黄毛片在线,中文日产国产精品久久

智慧服務(wù),成就美好體驗(yàn) 項(xiàng)目咨詢

主頁(yè) > 服務(wù)與支持 > 開發(fā)平臺(tái) > 客戶端SDK參考 > iOS Native SDK > 會(huì)議 獲取信號(hào)和質(zhì)量數(shù)據(jù)

入門使用

獲取信號(hào)和質(zhì)量數(shù)據(jù)

更新時(shí)間:2019-11-20

獲取信號(hào)和質(zhì)量數(shù)據(jù)

描述

用戶正在通話中或者會(huì)議中,用戶可以獲取當(dāng)前呼叫的信號(hào)強(qiáng)度和質(zhì)量數(shù)據(jù)信息,如果在當(dāng)前正在主動(dòng)共享或觀看共享,用戶還能獲取共享的質(zhì)量數(shù)據(jù)信息。

前提條件

用戶正在通話中或者會(huì)議中。

業(yè)務(wù)流程

圖1 獲取信號(hào)和質(zhì)量數(shù)據(jù)流程

  1. SDK向UI上報(bào)事件TSDK_E_CALL_EVT_STATISTIC_INFO,通知事件攜帶參數(shù)callid標(biāo)識(shí)本次呼叫,信號(hào)強(qiáng)度和音視頻質(zhì)量數(shù)據(jù),音視頻質(zhì)量數(shù)據(jù)對(duì)應(yīng)的事件數(shù)據(jù)結(jié)構(gòu)TSDK_S_CALL_STATISTIC_INFO包含音頻和視頻呼叫質(zhì)量信息。UI獲取到事件內(nèi)容后,刷新顯示。
    說(shuō)明: 

    TSDK_E_CALL_EVT_STATISTIC_INFO事件每5秒上報(bào)一次,若UI需要更高頻率獲取音視頻質(zhì)量數(shù)據(jù),可以調(diào)用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;
    }
     
  2. 如果在當(dāng)前正在主動(dòng)共享或觀看共享,UI可以調(diào)用tsdk_get_share_statistic_info()接口獲取共享質(zhì)量數(shù)據(jù),傳入?yún)?shù)conf_handle標(biāo)識(shí)本次會(huì)議句柄,返回參數(shù)數(shù)據(jù)結(jié)構(gòu)TSDK_S_SHARE_STATISTIC_INFO包含共享質(zhì)量數(shù)據(jù)。

    代碼示例:

    //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;
    }