IExternalVideoEncoderEventHandler class

Constructors

IExternalVideoEncoderEventHandler({FutureOr<void> onStart(String streamId)?, FutureOr<void> onStop(String streamId)?, FutureOr<void> onRateUpdate(String streamId, int videoIndex, int fps, int bitrateKbps)?, FutureOr<void> onRequestKeyFrame(String streamId, int videoIndex)?, FutureOr<void> onActiveVideoLayer(String streamId, int videoIndex, bool active)?})

Properties

hashCode int
The hash code for this object.
no setterinherited
onActiveVideoLayer FutureOr<void> Function(String streamId, int videoIndex, bool active)?
@valid since 3.56 @detail callback @brief As the sender of a external encoded video stream, you will receive this callback at certain moments.
Based on the hints of this callback, you can selectively encode the video stream that is ready for transmission, in order to reduce the performance impact of video encoding on the local device. This callback is triggered based on a combination of factors, including the performance of the local device, the local network, and whether the stream is subscribed by the remote user. @param streamId See StreamIndex. @param streamInfo See StreamIndex. @param videoIndex Subscript of the corresponding encoded stream. @param active The active state of the corresponding encoded stream. @note To receive the callback, call setVideoSourceType{@link #RTCEngine#setVideoSourceType} to set the input video source to custom encoded video and call setExternalVideoEncoderEventHandler{@link #RTCEngine#setExternalVideoEncoderEventHandler} to set the callback handler.
getter/setter pair
onRateUpdate FutureOr<void> Function(String streamId, int videoIndex, int fps, int bitrateKbps)?
@detail callback @author wangzhanqiang @brief When the frame rate or bit rate of a custom encoded stream changes, the callback is triggered @param streamId The ID of the encoded stream that changes @param streamInfo The properties of the encoded stream that changes @param videoIndex The subscript of the corresponding encoded stream @param fps The frame rate after the change, the unit: fps @param bitrateKbps The code rate after the change, the unit: kbps
getter/setter pair
onRequestKeyFrame FutureOr<void> Function(String streamId, int videoIndex)?
@detail callback @author wangzhanqiang @brief This callback is used to inform the stream publisher that a keyframe needs to be regenerated. @param streamId Remote encoded stream ID @param streamInfo Remote encoded stream property @param videoIndex Subscript of the corresponding encoded stream
getter/setter pair
onStart FutureOr<void> Function(String streamId)?
@detail callback @author wangzhanqiang @brief Prompt custom encoded frames to start pushing callbacks.
After receiving this callback, you can call pushExternalEncodedVideoFrame{@link #RTCEngine#pushExternalEncodedVideoFrame} to push a custom encoded video frame to the SDK @param streamId The ID of the encoded stream that can be pushed @param streamInfo The properties of the encoded stream that can be pushed
getter/setter pair
onStop FutureOr<void> Function(String streamId)?
@detail callback @author wangzhanqiang @brief When receiving the callback, you need to stop pushing custom encoded video frames to the SDK @param streamId The ID of the encoded stream that needs to be stopped @param streamInfo The properties of the encoded stream that needs to be stopped
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited