sendCustomVideoData abstract method

void sendCustomVideoData(
  1. TRTCVideoStreamType streamType,
  2. TRTCVideoFrame frame
)

Deliver captured video frames to SDK

You can use this API to deliver video frames you capture to the SDK, and the SDK will encode and transfer them through its own network module.

We recommend you enter the following information for the TRTCVideoFrame parameter (other fields can be left empty):

  • pixelFormat:
  • bufferType:
  • data:
    • Buffer used to carry video frame data.
  • length:
    • Video frame data length. If pixelFormat is set to I420, length can be calculated according to the following formula: length = width * height * 3 / 2.
  • width:
    • Video image width, such as 640 px.
  • height:
    • Video image height, such as 480 px.
  • timestamp (ms)

Parameters:

Implementation

void sendCustomVideoData(TRTCVideoStreamType streamType, TRTCVideoFrame frame);