onRateUpdate$info$withVideoIndex$withFps$withBitRate method
FutureOr<void>
onRateUpdate$info$withVideoIndex$withFps$withBitRate(
- dynamic streamId,
- dynamic info,
- dynamic videoIndex,
- dynamic fps,
- dynamic bitRateKps,
override
@detail callback @author wangzhanqiang @brief 当自定义编码流的帧率或码率发生变化时,触发该回调 @param streamId 远端编码流 ID @param info 远端编码流信息,参看 ByteRTCStreamInfo{@link #ByteRTCStreamInfo} @param videoIndex 对应编码流的下标 @param fps 变化后的帧率,单位:fps @param bitRateKps 变化后的码率,单位:kbps
Implementation
FutureOr<void> onRateUpdate$info$withVideoIndex$withFps$withBitRate(
dynamic streamId,
dynamic info,
dynamic videoIndex,
dynamic fps,
dynamic bitRateKps) async {
if ($instance == null || $instance is! IExternalVideoEncoderEventHandler) {
return;
}
return ($instance as IExternalVideoEncoderEventHandler).onRateUpdate?.call(
streamId.toString(),
int.tryParse(videoIndex.toString()) ?? 0,
int.tryParse(fps.toString()) ?? 0,
int.tryParse(bitRateKps.toString()) ?? 0);
}