Server Gateway SDK v3.7.200.21 for Linux Java
|
Public Member Functions | |
int | onPreEncodeVideoFrame (AgoraVideoFrameObserver agora_video_frame_observer, VideoFrame frame) |
int | onRenderVideoFrame (AgoraVideoFrameObserver agora_video_frame_observer, String channel_id, int uid, VideoFrame frame) |
The IVideoFrameObserver class.
int io.agora.rtc.IVideoFrameObserver.onPreEncodeVideoFrame | ( | AgoraVideoFrameObserver | agora_video_frame_observer, |
VideoFrame | frame | ||
) |
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 when it receives a video frame. In this callback, you can get the video data before encoding. You can then process the data according to your particular scenarios.
After processing, you can send the processed video data back to the SDK by setting the videoFrame
parameter in this callback.
The video data that this callback gets has been pre-processed, with its content cropped, rotated, and the image enhanced.
agora_video_frame_observer | An AgoraVideoFrameObserver object. |
frame | The video frame. |
int io.agora.rtc.IVideoFrameObserver.onRenderVideoFrame | ( | AgoraVideoFrameObserver | agora_video_frame_observer, |
String | channel_id, | ||
int | uid, | ||
VideoFrame | frame | ||
) |
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 a video frame is received. In this callback, you can get the video data sent by the remote user. You can then post-process the data according to your scenarios.
After post-processing, you can send the processed data back to the SDK by setting the videoFrame
parameter in this callback.
agora_video_frame_observer | An AgoraVideoFrameObserver object. |
channel_id | The channel name. |
uid | ID of the remote user who sends the current video frame. |
frame | The video frame. |