Package com.zego.zegoavkit2
Class ZegoExternalVideoCapture
- java.lang.Object
-
- com.zego.zegoavkit2.ZegoExternalVideoCapture
-
public final class ZegoExternalVideoCapture extends java.lang.Object
外部视频采集接口。Copyright © 2017 Zego. All rights reserved.
-
-
Constructor Summary
Constructors Constructor Description ZegoExternalVideoCapture()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
setTrafficControlCallback(ZegoTrafficControlCallback callback, int channelIndex)
设置流控回调接口。当引擎认为需要调整推流参数时,通过此回调接口通知 App。static boolean
setVideoCaptureFactory(ZegoVideoCaptureFactory factory, int channelIndex)
设置外部采集设备工厂
-
-
-
Method Detail
-
setVideoCaptureFactory
public static boolean setVideoCaptureFactory(ZegoVideoCaptureFactory factory, int channelIndex)
设置外部采集设备工厂注意:1. 可以在任何时机调用;
2. 在 SDK 回调销毁后,才可以销毁对应的 factory。- Parameters:
factory
- 外部采集工厂实例;当置空时,关闭外部采集功能。channelIndex
- 推流通道, 参考ZegoConstants.PublishChannelIndex
- Returns:
- 设置成功返回 true, 否则返回 false
-
setTrafficControlCallback
public static boolean setTrafficControlCallback(ZegoTrafficControlCallback callback, int channelIndex)
设置流控回调接口。当引擎认为需要调整推流参数时,通过此回调接口通知 App。注意:1. 必须在 推流 前设置;
2. 在 推流 过程中不要置空;
3. 必须使用 enableTrafficControl(int properties, boolean enable) 开启流控才会触发此回调;
4. 仅在使用外部码流时有效。- Parameters:
callback
- 流控回调channelIndex
- 推流通道, 参考ZegoConstants.PublishChannelIndex
。目前只支持对主通道进行流控- Returns:
- 设置成功返回 true, 否则返回 false
-
-