pushExternalEncodedVideoFrame method
- NSInteger videoIndex,
- ByteRTCEncodedVideoFrame videoFrame
@detail api
@hiddensdk(audiosdk)
@author wangzhanqiang
@brief Push custom encoded video stream
@param videoIndex The corresponding encoded stream subscript, starting from 0, if you call setVideoEncoderConfig:{@link #ByteRTCEngine#setVideoEncoderConfig} The number of multiple streams must be consistent here
@param videoFrame Encoding For streaming video frame information. See ByteRTCEncodedVideoFrame{@link #ByteRTCEncodedVideoFrame}.
@return API call result:
- 0: Success.
- <0: Failure. See ByteRTCReturnStatus{@link #ByteRTCReturnStatus} for specific reasons.
@note
- Currently, only video frames in H264 and ByteVC1 formats are supported, and the video stream protocol must be in an Annex B format.
- This function runs within the user calling thread
- Before pushing a custom encoded video frame, you must call setVideoSourceType:{@link #ByteRTCEngine#setVideoSourceType} to switch the video input source to the custom encoded video source.
Implementation
FutureOr<int> pushExternalEncodedVideoFrame(
NSInteger videoIndex, ByteRTCEncodedVideoFrame videoFrame) async {
return await nativeCall(
'pushExternalEncodedVideoFrame:withEncodedVideoFrame:',
[videoIndex, videoFrame]);
}