Interface IVideoFrameObserver

The IVideoFrameObserver class.

Hierarchy

  • IVideoFrameObserver

Methods

  • Occurs each time the SDK receives a video frame captured by the local camera. After you successfully register the video frame observer, the SDK triggers this callback each time it receives a video frame. In this callback, you can get the video data captured by the local camera. You can then pre-process the data according to your scenarios.Once the pre-processing is complete, you can directly modify videoFrame in this callback, and set the return value to true to send the modified video data to the SDK.The video data that this callback gets has not been pre-processed, and is not watermarked, cropped, rotated or beautified.If the video data type you get is RGBA, the SDK does not support processing the data of the alpha channel.

    Returns

    When the video processing mode is ProcessModeReadOnly:true: Reserved for future use.false: Reserved for future use.When the video processing mode is ProcessModeReadWrite:true: Sets the SDK to receive the video frame.false: Sets the SDK to discard the video frame.

    Parameters

    • sourceType: VideoSourceType

      The type of the video source. See VideoSourceType .

    • videoFrame: VideoFrame

      The video frame. See VideoFrame .The default value of the video frame data format obtained through this callback is as follows:Android: textureiOS: cvPixelBuffer

    Returns boolean

  • Occurs each time the SDK receives a video frame before encoding. After you successfully register the video frame observer, the SDK triggers this callback each time it receives a video frame. In this callback, you can get the video data before encoding and then process the data according to your particular scenarios.After processing, you can send the processed video data back to the SDK in this callback.The video data that this callback gets has been preprocessed, with its content cropped and rotated, and the image enhanced.

    Returns

    When the video processing mode is ProcessModeReadOnly: true: Reserved for future use. false: Reserved for future use. When the video processing mode is ProcessModeReadWrite: true: Sets the SDK to receive the video frame. false: Sets the SDK to discard the video frame.

    Parameters

    • sourceType: VideoSourceType

      The type of the video source. See VideoSourceType .

    • videoFrame: VideoFrame

      The video frame. See VideoFrame .The default value of the video frame data format obtained through this callback is as follows: Android: texture iOS: cvPixelBuffer

    Returns boolean

  • Occurs each time the SDK receives a video frame sent by the remote user. After you successfully register the video frame observer, the SDK triggers this callback each time it receives a video frame. In this callback, you can get the video data sent from the remote end before rendering, and then process it according to the particular scenarios.If the video data type you get is RGBA, the SDK does not support processing the data of the alpha channel.

    Returns

    When the video processing mode is ProcessModeReadOnly:true: Reserved for future use.false: Reserved for future use.When the video processing mode is ProcessModeReadWrite:true: Sets the SDK to receive the video frame.false: Sets the SDK to discard the video frame.

    Parameters

    • channelId: string

      The channel ID.

    • remoteUid: number

      The user ID of the remote user who sends the current video frame.

    • videoFrame: VideoFrame

      The video frame. See VideoFrame .The default value of the video frame data format obtained through this callback is as follows:Android: textureiOS: cvPixelBuffer

    Returns boolean

Generated using TypeDoc