setExternalRemoteEglContext

Sets the EGL context for rendering remote video streams.

virtual int setExternalRemoteEglContext(void* eglContext) = 0;
Since
v4.5.0

This method can replace the default remote EGL context within the SDK, making it easier to manage the EGL context.

When the engine is destroyed, the SDK will automatically release the EGL context.

Attention: This method is for Android only.

Applicable scenarios

This method is suitable for using a custom video rendering method instead of the default SDK rendering method to render remote video frames in Texture format.

Call timing

Call this method before joining a channel.

Restrictions

None.

Parameters

eglContext
The EGL context for rendering remote video streams.

Returns

  • 0: Success.
  • < 0: Failure.