Package im.zego.zegoexpress.callback
Class IZegoCustomVideoRenderHandler
- java.lang.Object
-
- im.zego.zegoexpress.callback.IZegoCustomVideoRenderHandler
-
public abstract class IZegoCustomVideoRenderHandler extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description IZegoCustomVideoRenderHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onCapturedVideoFrameRawData(java.nio.ByteBuffer[] data, int[] dataLength, ZegoVideoFrameParam param, ZegoVideoFlipMode flipMode, ZegoPublishChannel channel)
When custom video rendering is enabled, the original video frame data collected by the local preview is called back.void
onRemoteVideoFrameEncodedData(java.nio.ByteBuffer data, int dataLength, ZegoVideoEncodedFrameParam param, long referenceTimeMillisecond, java.lang.String streamID)
Custom video rendering remote playing stream video frame undecoded data callback.void
onRemoteVideoFrameRawData(java.nio.ByteBuffer[] data, int[] dataLength, ZegoVideoFrameParam param, java.lang.String streamID)
When custom video rendering is enabled, the remote end pulls the original video frame data to call back, and distinguishes different streams by streamID.
-
-
-
Method Detail
-
onCapturedVideoFrameRawData
public void onCapturedVideoFrameRawData(java.nio.ByteBuffer[] data, int[] dataLength, ZegoVideoFrameParam param, ZegoVideoFlipMode flipMode, ZegoPublishChannel channel)
When custom video rendering is enabled, the original video frame data collected by the local preview is called back. Available since: 1.1.0 Description: When using custom video rendering, the SDK callbacks the original video frame data collected by the local preview, which is rendered by the developer. Use cases: Use a cross-platform interface framework or game engine; need to obtain the video frame data collected or streamed by the SDK for special processing. When to Trigger: When the local preview is turned on, when the SDK collects the local preview video frame data. Related APIs: Call [setCustomVideoRenderHandler] to set custom video rendering callback.- Parameters:
data
- Raw video frame data (eg: RGBA only needs to consider data[0], I420 needs to consider data[0,1,2]).dataLength
- Data length (eg: RGBA only needs to consider dataLength[0], I420 needs to consider dataLength[0,1,2]).param
- Video frame parameters.flipMode
- video flip mode.channel
- Publishing stream channel.
-
onRemoteVideoFrameRawData
public void onRemoteVideoFrameRawData(java.nio.ByteBuffer[] data, int[] dataLength, ZegoVideoFrameParam param, java.lang.String streamID)
When custom video rendering is enabled, the remote end pulls the original video frame data to call back, and distinguishes different streams by streamID. Available since: 1.1.0 Description: When custom video rendering is enabled, the SDK calls back the remote end to pull the original video frame data, distinguishes different streams by streamID, and renders them by the developer. Use cases: Use a cross-platform interface framework or game engine; need to obtain the video frame data collected or streamed by the SDK for special processing. When to Trigger: After starting to stream, when the SDK receives the video frame data of the remote stream. Related APIs: Call [setCustomVideoRenderHandler] to set custom video rendering callback.- Parameters:
data
- Raw video frame data (eg: RGBA only needs to consider data[0], I420 needs to consider data[0,1,2]).dataLength
- Data length (eg: RGBA only needs to consider dataLength[0], I420 needs to consider dataLength[0,1,2]).param
- Video frame parameters.streamID
- Stream ID.
-
onRemoteVideoFrameEncodedData
public void onRemoteVideoFrameEncodedData(java.nio.ByteBuffer data, int dataLength, ZegoVideoEncodedFrameParam param, long referenceTimeMillisecond, java.lang.String streamID)
Custom video rendering remote playing stream video frame undecoded data callback. Available since: 1.10.0 Description: When [enableCustomVideoRender] is called to enable custom video rendering and the specified data type is [EncodedData], this function will be called back with the remote playing stream undecoded video frame data. When to Trigger: After calling [startPlayingStream], the SDK will call back when the remote streaming video frame data is received. Related APIs: Call [setCustomVideoRenderHandler] to set custom video rendering callback.- Parameters:
data
- Encoded data of video frames.dataLength
- Data length.param
- Video frame parameters.referenceTimeMillisecond
- video frame reference time, UNIX timestamp, in milliseconds.streamID
- Stream ID.
-
-