#include <AgoraMediaBase.h>
|
enum | VIDEO_FRAME_PROCESS_MODE { PROCESS_MODE_READ_ONLY,
PROCESS_MODE_READ_WRITE
} |
|
typedef media::base::VideoFrame | VideoFrame |
|
◆ onCaptureVideoFrame()
virtual bool agora::media::IVideoFrameObserver::onCaptureVideoFrame |
( |
VideoFrame & |
videoFrame | ) |
|
|
pure virtual |
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 a video frame is received. 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.
After pre-processing, you can send the processed video data back to the SDK by setting the videoFrame
parameter in this callback.
- Parameters
-
videoFrame | A pointer to the video frame: VideoFrame |
- Returns
- Determines whether to ignore the current video frame if the pre-processing fails:
- true: Do not ignore.
- false: Ignore, in which case this method does not sent the current video frame to the SDK.
◆ onScreenCaptureVideoFrame()
virtual bool agora::media::IVideoFrameObserver::onScreenCaptureVideoFrame |
( |
VideoFrame & |
videoFrame | ) |
|
|
pure virtual |
Occurs each time the SDK receives a video frame captured by the screen.
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 captured by the screen. You can then pre-process the data according to your scenarios.
After pre-processing, you can send the processed video data back to the SDK by setting the videoFrame
parameter in this callback.
- Parameters
-
videoFrame | A pointer to the video frame: VideoFrame |
- Returns
- Determines whether to ignore the current video frame if the pre-processing fails:
- true: Do not ignore.
- false: Ignore, in which case this method does not sent the current video frame to the SDK.
◆ onMediaPlayerVideoFrame()
virtual bool agora::media::IVideoFrameObserver::onMediaPlayerVideoFrame |
( |
VideoFrame & |
videoFrame, |
|
|
int |
mediaPlayerId |
|
) |
| |
|
pure virtual |
Occurs each time the SDK receives a video frame decoded by the MediaPlayer.
After you successfully register the video frame observer, the SDK triggers this callback each time a video frame is decoded. In this callback, you can get the video data decoded by the MediaPlayer. You can then pre-process the data according to your scenarios.
After pre-processing, you can send the processed video data back to the SDK by setting the videoFrame
parameter in this callback.
- Parameters
-
videoFrame | A pointer to the video frame: VideoFrame |
mediaPlayerId | of the mediaPlayer. |
- Returns
- Determines whether to ignore the current video frame if the pre-processing fails:
- true: Do not ignore.
- false: Ignore, in which case this method does not sent the current video frame to the SDK.
◆ onRenderVideoFrame()
virtual bool agora::media::IVideoFrameObserver::onRenderVideoFrame |
( |
const char * |
channelId, |
|
|
rtc::uid_t |
remoteUid, |
|
|
VideoFrame & |
videoFrame |
|
) |
| |
|
pure virtual |
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.
- Parameters
-
channelId | The channel name |
remoteUid | ID of the remote user who sends the current video frame. |
videoFrame | A pointer to the video frame: VideoFrame |
- Returns
- Determines whether to ignore the current video frame if the post-processing fails:
- true: Do not ignore.
- false: Ignore, in which case this method does not sent the current video frame to the SDK.
◆ getVideoFrameProcessMode()
virtual VIDEO_FRAME_PROCESS_MODE agora::media::IVideoFrameObserver::getVideoFrameProcessMode |
( |
| ) |
|
|
virtual |
Indicate the video frame mode of the observer.
- Returns
- VIDEO_FRAME_PROCESS_MODE
◆ getRotationApplied()
virtual int agora::media::IVideoFrameObserver::getRotationApplied |
( |
| ) |
|
|
virtual |
Occurs each time needs to get rotation angle.
- Returns
- rotation angle.
◆ getMirrorApplied()
virtual bool agora::media::IVideoFrameObserver::getMirrorApplied |
( |
| ) |
|
|
virtual |
Occurs each time needs to get whether mirror is applied or not.
- Returns
- Determines whether to mirror.
- true: need to mirror.
- false: no mirror.
◆ isExternal()
virtual bool agora::media::IVideoFrameObserver::isExternal |
( |
| ) |
|
|
virtual |
Indicate if the observer is for internal use. Note: Never override this function
- Returns
- true: the observer is for external use
- false: the observer is for internal use