跳转到主要内容

视频轨道推流信息(RTCVideoPublishOptions)

参数名称参数类型参数说明
descchar *轨道描述信息
codecint编码类型查看
widthint编码宽度,-1为自动匹配采集宽度
heightint编码高度,-1为自动匹配采集高度
maxFpsint最大帧率,-1为自动匹配采集帧率
maxBitrateint最大码率,-1为自动匹配合适码率
simucastRTCVideoPublishOptions*协同辅流
simucast_sizeint协同辅流个数

视频轨道采集信息(RTCCameraCaptureOptions)

参数名称参数类型参数说明
deviceIdchar *设备名称
widthint采集视频宽度,-1为自动匹配
heightint采集视频高度,-1为自动匹配
maxFpsint采集视频最大帧率,-1为自动匹配

屏幕轨道采集信息(RTCScreenCaptureOptions)

参数名称参数类型参数说明
deviceIdchar *设备名称
widthint采集屏幕宽度,-1为自动匹配
heightint采集屏幕高度,-1为自动匹配
maxFpsint采集视频最大帧率
showCursorint是否采集鼠标
xint采集屏幕左上角点x坐标
yint采集屏幕左上角点y坐标

音频轨道推流信息(RTCAudioPublishOptions)

参数名称参数类型参数说明
descchar *轨道描述信息
codecint编码类型查看
maxBitrateint最大码率,-1为自动匹配合适码率

音频轨道采集信息(RTCMicCaptureOptions)

参数名称参数类型参数说明
deviceIdchar *设备名称,default 为默认设备
echoCancellationintaec,回音消除
noiseSuppressionintans,噪声抑制
autoGainControlintagc,自动增益
channelCountint声道数
sampleRateint采样波特率
sampleSizeint采样位深

音频轨道输出信息(RTCAudioOutputOptions)

参数名称参数类型参数说明
deviceIdchar *设备名称,default 为默认设备

轨道信息

参数名称参数类型参数说明
idchar*轨道id
descchar*轨道描述
kindchar*轨道种类
codecint编码类型:StreamCodec
widthint视频宽度
heightint视频高度
fpsint视频帧率
angleint视频流角度
bitrateint码率
sample_rateint音频采样频率
trackint轨道号

用户信息

参数名称参数类型参数说明
channelstring频道id
device_idstring设备id
device_typeint设备类型
namestring昵称
propsjson扩展信息
sidstringsid
stream_trackslist<stream_track>流轨道集合
uidstringuid
versionstring版本信息

流信息

stream_track
angleint角度
bitrateint码率
codecint编码类型
descstring流描述
fpsint编码帧率
heightint高度
idstring流id
kindstring流类型
sample_rateint音频波特率
trackint轨道号
widthint宽度

摄像头枚举信息

{
    "count":1,
    "equip_list":[
        {"name":"USB HD Webcam",
            "resolutions":[
                {"height":480,"width":640,"type":0},
                {"height":144,"width":176,"type":0},
                {"height":240,"width":320,"type":0},
                {"height":288,"width":352,"type":0},
                {"height":360,"width":640,"type":0},
                {"height":720,"width":1280,"type":0}
            ]
        }
    ]
}
```html

| count | int | 设备个数 |
| --- | --- | --- |
| equip_list | `list<obj>` | 设备信息集合 |
| equip_list[0].name | string | 设备名称 |
| equip_list[0].resolutions | `list<obj>` | 设备分辨率集合 |
| equip_list[0].resolutions[0].width | int | 设备分辨率宽 |
| equip_list[0].resolutions[0].height | int | 设备分辨率高 |
| equip_list[0].resolutions[0].type | int | 设备分辨率类型 |


### 麦克风/扬声器枚举信息
```cpp
{
    "count":1,
    "equip_list":[
        {"name":"麦克风 (Realtek(R) Audio)","type":"default"}
    ]
}
countint设备个数
equip_listlist<obj>设备信息集合
equip_list[0].namestring设备名称
equip_list[0].typestring表示是否为系统默认设备

共享屏幕枚举信息

{
    "count":1,
    "equip_list":[
        {
            "name":"//display"
            "height":1080,
            "width":1920,
            "x":0,
            "y":0
        }
    ]
}
```html

| count | int | 设备个数 |
| --- | --- | --- |
| equip_list | `list<obj>` | 设备信息集合 |
| equip_list[0].name | string | 设备名称 |
| equip_list[0].x | int | 设备左上坐标x |
| equip_list[0].y | int | 设备左上坐标y |
| equip_list[0].height | int | 设备分辨率高 |
| equip_list[0].width | int | 设备分辨率宽 |




### 流数据自定义收流结构体
av_frame_s

| bits | unsigned char* | frame buffer |
| --- | --- | --- |
| bitslen | unsigned int | frame length |
| bitspos | unsigned int | frame start pos within buffer |
| medtype | unsigned int | media type such as audio or video |
| stmtype | unsigned int | stream type such as h264, aac etc |
| frmtype | unsigned int | frame type such as key frame |
| frmmisc | unsigned int | misc character |
| tmscale | unsigned int | time scale for pts and dts |
| frmsequ | unsigned int | frame's sequence |
| pcr | long long | frame pcr |
| pts | long long | frame pts |
| dts | long long | frame dts |
| dur | int | frame duration |
| track | track | frame track |
| arg | void* | |
| language | int | frame language |




### 上行回调
| delay | int | 延迟,delay = -1 表示流媒体短线 |
| --- | --- | --- |
| rate | int | 速率 |
| first_lost | double | 丢包 |
| re_lost | double | 补偿丢包 |
| signal | int | 信号塔能量 0最差,4最好 |


```cpp
{
    "delay":20,
    "rate":0,
    "first_lost":0,
    "re_lost":0,
    "signal":4
}

下行回调

audioint音频包
compint补偿包数
losfint总丢包
lr1double端到端丢包
lr2double服务到段丢包
recvint总包
useridstd::stringuserid
[
    {
        "audio":10,
        "comp":0,
        "losf":0,
        "lr1":0,
        "lr2":0,
        "recv":20,
        "userid":"123131231"
    }
]
```cpp



### 音柱回调
| [0].pow | long | 能量 |
| --- | --- | --- |
| [0].userid | string | uid |
| [0].db | int | db |


```cpp

[
    {
        "pow":10,
        "userid":"12345678",
        "db":-60,
    }
]

网络检测回调

probe_timeint
streamint流媒体是否正常
networkint网络
delayint延迟
up_data上行数据集合
up_data.delayint延迟
up_data.recvint接收包数
up_data.missint错续包数
up_data.losfint丢包数
up_data.speedint速度
up_data.losf2double丢包率
up_data.statusint综合状态值,0 好,1不佳,2 较差,3极差
up_data.test_dataint测试速率
down_dataint下行数据集合
down_data.delayint延迟
down_data.recvint接收包数
down_data.missint错续包数
down_data.losfint丢包数
down_data.speedint速度
down_data.losf2double丢包率
down_data.statusint综合状态值,0 好,1不佳,2 较差,3极差
down_data.test_dataint测试速率
{
    "probe_time":10,
    "stream":1,
    "network":1,
    "delay":100,
    "up_data":{
        "delay":100,
        "recv":10000,
        "miss":0,
        "losf":0,
        "speed":100,
        "losf2":0,
        "status":0,
        "test_data":1024
    },
    "down_data":{
        "delay":100,
        "recv":10000,
        "miss":0,
        "losf":0,
        "speed":100,
        "losf2":0,
        "status":0,
        "test_data":1024
    }
}
```cpp