函数 | |
AudioFrameData (byte[] data, int dataSize, int channelCount, int sampleRate, int bitWidth) | |
AudioLevelParam (String userId, byte level) | |
AudioStatistics (double bitrate, double lossRate) | |
DeviceInfo (String deviceName, String deviceId) | |
DeviceList (int type, int count, List< DeviceInfo > devices) | |
DualVideoStreamParam (int maxBitrate, int mediaIndex) | |
EncodedVideoData (byte[] data, int dataSize, int width, int height, int frameId, long timestampMs, boolean isKeyFrame, int profile) | |
ImageBuffer (byte[] buffer, int length, int width, int height) | |
JoinRoomParam (String confE164, int bitrate) | |
KRtcSdkInitParam (boolean customVideoCapture, boolean customVideoRender, boolean customAudioCapture, boolean customAudioPlayout, boolean customVideoEncode, boolean customVideoDecode) | |
KRtcSdkLogParam (boolean enableLog, String logPath, LogCallback logCallback) | |
LoginParam (String serverAddr, String userId, String token, String nickName) | |
MainVideoStreamParam (int layerCount, RESOLUTION maxResolution, int maxFps, int bitrate, int mediaIndex) | |
Statistics (int bytesSent, int bytesReceived, double bitrateSend, double bitrateRecv, double lossRateSend, double lossRateRecv) | |
StreamParam (int type, int mediaIndex, int layerCount, int width, int height, int maxFps, int maxBitrate) | |
SubscribeStreamParam (STREAM_TYPE type, int mediaIndex, int layerIndex) | |
VideoCodecParam (int width, int height, int bitrate, int frameRate, int keyframeInterval, int profile) | |
VideoFrameData (int width, int height, int strideY, int strideU, int strideV, byte[] dataY, byte[] dataU, byte[] dataV, long timestampMs) | |
VideoStatistics (int width, int height, int frameRate, double bitrate, double lossRate, int freezeCount, int totalFreezesDuration) | |
关键类型定义
AudioFrameData | ( | byte[] | data, |
int | dataSize, | ||
int | channelCount, | ||
int | sampleRate, | ||
int | bitWidth | ||
) |
data | 音频数据 |
dataSize | 数据长度 |
channelCount | 声道数,目前为2 |
sampleRate | 采样频率,目前为48khz |
bitWidth | 采样位宽,目前为16位 |
AudioLevelParam | ( | String | userId, |
byte | level | ||
) |
userId | 用户ID |
level | 0~127 |
AudioStatistics | ( | double | bitrate, |
double | lossRate | ||
) |
bitrate | 音频码率(bps) |
lossRate | 丢包率() |
DeviceInfo | ( | String | deviceName, |
String | deviceId | ||
) |
deviceName | 设备名称 |
deviceId | 设备ID |
DeviceList | ( | int | type, |
int | count, | ||
List< DeviceInfo > | devices | ||
) |
type | 设备类型 |
count | 设备数量 |
devices | 设备信息 |
DualVideoStreamParam | ( | int | maxBitrate, |
int | mediaIndex | ||
) |
maxBitrate | 最大比特率 |
mediaIndex | 发布多条流时每个视频源的索引号 |
EncodedVideoData | ( | byte[] | data, |
int | dataSize, | ||
int | width, | ||
int | height, | ||
int | frameId, | ||
long | timestampMs, | ||
boolean | isKeyFrame, | ||
int | profile | ||
) |
data | 已编码数据 |
dataSize | 数据长度(字节数) |
width | 帧宽 |
height | 帧高 |
frameId | 帧ID |
timestampMs | 采集/渲染时间(毫秒) |
isKeyFrame | 是否关键帧(IDR帧) |
profile | H264画质级别 |
ImageBuffer | ( | byte[] | buffer, |
int | length, | ||
int | width, | ||
int | height | ||
) |
buffer | 图像内容(BGRA) |
length | 图像缓存大小 |
width | 图像宽 |
height | 图像高 |
JoinRoomParam | ( | String | confE164, |
int | bitrate | ||
) |
confE164 | 房间id |
bitrate | 呼叫码率 0表示使用默认值 |
KRtcSdkInitParam | ( | boolean | customVideoCapture, |
boolean | customVideoRender, | ||
boolean | customAudioCapture, | ||
boolean | customAudioPlayout, | ||
boolean | customVideoEncode, | ||
boolean | customVideoDecode | ||
) |
customVideoCapture | 启用或关闭自定义视频采集 |
customVideoRender | 启用或关闭自定义视频渲染 |
customAudioCapture | 启用或关闭自定义音频采集,启用后需用户手动调用sendRecordVideoData发送音频帧,发送间隔必须为20ms |
customAudioPlayout | 启用或关闭自定义音频输出 |
customVideoEncode | 启用或关闭自定义视频编码 |
customVideoDecode | 启用或关闭自定义视频解码 |
KRtcSdkLogParam | ( | boolean | enableLog, |
String | logPath, | ||
LogCallback | logCallback | ||
) |
enableLog | 是否开启Log功能 |
logPath | log路径,设nullptr表示不写入log文件 |
logCallback | log回调,设nullptr不需要回调 |
LoginParam | ( | String | serverAddr, |
String | userId, | ||
String | token, | ||
String | nickName | ||
) |
serverAddr | ipv4, ipv6, domain name |
userId | 用户id,匿名登录时填nullptr即可 |
token | token:appKey + userId + ExpiredTs + assignment |
nickName | 用户别名 |
MainVideoStreamParam | ( | int | layerCount, |
RESOLUTION | maxResolution, | ||
int | maxFps, | ||
int | bitrate, | ||
int | mediaIndex | ||
) |
layerCount | 同一条主流最多允许同时发送三层分辨率,双流仅允许发一层 |
maxResolution | 最高层分辨率,中低层分辨率为 maxResolution/2,maxResolution/4 |
maxFps | 最大FPS |
bitrate | 最大比特率 |
mediaIndex | 发布多条主流时每个视频源的索引号 |
Statistics | ( | int | bytesSent, |
int | bytesReceived, | ||
double | bitrateSend, | ||
double | bitrateRecv, | ||
double | lossRateSend, | ||
double | lossRateRecv | ||
) |
bytesSent | 累计发送(Byte) |
bytesReceived | 累计接收(Byte) |
bitrateSend | 上行总码率(bps) |
bitrateRecv | 下行总码率(bps) |
lossRateSend | 上行总丢包率(%) |
lossRateRecv | 下行总丢包率(%) |
StreamParam | ( | int | type, |
int | mediaIndex, | ||
int | layerCount, | ||
int | width, | ||
int | height, | ||
int | maxFps, | ||
int | maxBitrate | ||
) |
type | 流类型 |
mediaIndex | 发布多条辅流时每个视频源的索引号 |
layerCount | 分辨率层数 |
width | 最大分辨率宽度 |
height | 最大分辨率高度 |
maxFps | 最大帧率 |
maxBitrate | 最大码率 |
SubscribeStreamParam | ( | STREAM_TYPE | type, |
int | mediaIndex, | ||
int | layerIndex | ||
) |
type | 流类型 |
mediaIndex | 多流时每个视频源的索引号,音频填0即可 |
layerIndex | 订阅的分辨率层,辅流及音频填0即可 |
VideoCodecParam | ( | int | width, |
int | height, | ||
int | bitrate, | ||
int | frameRate, | ||
int | keyframeInterval, | ||
int | profile | ||
) |
width | 帧宽 |
height | 帧高 |
bitrate | 码率,kbps |
frameRate | 帧率 |
keyframeInterval | 关键帧间隔 |
profile | H264画质级别 |
VideoFrameData | ( | int | width, |
int | height, | ||
int | strideY, | ||
int | strideU, | ||
int | strideV, | ||
byte[] | dataY, | ||
byte[] | dataU, | ||
byte[] | dataV, | ||
long | timestampMs | ||
) |
width | 帧宽 |
height | 帧高 |
strideY | Y跨距 |
strideU | U跨距 |
strideV | V跨距 |
dataY | Y数据 |
dataU | U数据 |
dataV | V数据 |
timestampMs | 采集时间 |
VideoStatistics | ( | int | width, |
int | height, | ||
int | frameRate, | ||
double | bitrate, | ||
double | lossRate, | ||
int | freezeCount, | ||
int | totalFreezesDuration | ||
) |
width | 视频宽度 |
height | 视频高度 |
frameRate | 视频帧率(fps) |
bitrate | 视频码率(bps) |
lossRate | 丢包率() |
freezeCount | 视频卡顿帧数 |
totalFreezesDuration | 视频卡顿时长 |