pushExternalEncodedVideoFrame method

FutureOr<int> pushExternalEncodedVideoFrame(
  1. int videoIndex,
  2. RTCEncodedVideoFrame encodedVideoFrame
)

@detail api @hiddensdk(audiosdk) @author wangzhanqiang @brief Push a custom encoded video stream @param videoIndex The corresponding encoded stream subscript, starting from 0, if the call setVideoEncoderConfig{@link #RTCEngine#setVideoEncoderConfig} sets multiple streams, the number here must be consistent with it @param encodedVideoFrame Coded Stream Video For frame information. See RTCEncodedVideoFrame{@link #RTCEncodedVideoFrame}. @return API call result:
- 0: Success. - <0: Failure. See ReturnStatus{@link #ReturnStatus} 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 #RTCEngine#setVideoSourceType} to switch the video input source to the custom encoded video source.

Implementation

FutureOr<int> pushExternalEncodedVideoFrame(
    int videoIndex, RTCEncodedVideoFrame encodedVideoFrame) async {
  return await nativeCall(
      'pushExternalEncodedVideoFrame', [videoIndex, encodedVideoFrame]);
}