pushExternalVideoFrame method

FutureOr<int> pushExternalVideoFrame(
  1. VideoFrameData frame
)

@detail api @hiddensdk(audiosdk) @author liuyangyang @brief Pushes external video frames. @param frame The data information of the video frame @return API call result:
- 0: Success. - <0: Failure. See ReturnStatus{@link #ReturnStatus} for specific reasons. @note - This method actively encapsulates the video frame data with the VideoFrameData{@link #VideoFrameData} class and passes it to the SDK. - Make sure that setVideoSourceType{@link #RTCEngine#setVideoSourceType} is set to custom video capture before you call this method. - When using texture data, make sure eglContext in createRTCEngine{@link #RTCEngine#createRTCEngine} is sharedContext or the same as eglContext in frame, otherwise it will not be able to encode - Support for raw data in I420, NV12, RGBA, and texutre of Texture2D and TextureOES

Implementation

FutureOr<int> pushExternalVideoFrame(VideoFrameData frame) async {
  return await nativeCall('pushExternalVideoFrame', [frame]);
}