P2P连线接口
更新日期:2025/5/13
目录
P2P连线接口
KY_Connect
- 功能描述:
- 连线设备并出图,连线以及视频等信息回调参考 KY_registerSDKListener 。
接口定义
public abstract void KY_Connect(String uid, String password, int channel, boolean isDecode,KYCamera.KYRenderType type);
public abstract void KY_Connect(String uid, String password, int channel, boolean isDecode, KYCamera.KYRenderType type,boolean isAuthToken, String authKey);
参数说明
参数 | 类型 | 说明 |
---|---|---|
uid | string | 设备UID |
password | string | 设备密码 |
channel | int | 开启并使之出图的通道,默认0 |
isDecode | boolean | 是否解码出图,默认为true |
type | 上抛数据格式枚举,参考 回调说明 中的 KYRenderType 枚举 定义 | |
isAuthToken | boolean | 是否用AuthToken方式开通道 |
authKey | string | 使用AuthKey方式连线 |
回调说明
KYRenderType 枚举
ENUM | 说明 |
---|---|
OUTPUT_NULL() | 输出数据为空 |
OUTPUT_YUV() | 输出yuv数据(耗时) |
OUTPUT_RGB_8888() | 输出RGB_8888数据(耗时) |
OUTPUT_RGB_565() | 输出RGB_565数据(耗时) |
OUTPUT_YUV_NV12() | 输出yuv数据nv12(耗时) |
返回码
暂无
代码示例
暂无
KY_Disconnect
- 功能描述:
- 断开通道,并停止音视频功能。
接口定义
public abstract void KY_Disconnect(int avChannel);
参数说明
参数 | 类型 | 说明 |
---|---|---|
avChannel | int | 连接的通道,一般为0 |
回调说明
暂无
返回码
暂无
代码示例
暂无