Agora Java API Reference for Android
Public Member Functions | List of all members
agora::media::IVideoFrameObserverEx Class Referenceabstract

#include <media_engine_i.h>

Inheritance diagram for agora::media::IVideoFrameObserverEx:
agora::media::IVideoFrameObserver

Public Member Functions

bool onCaptureVideoFrame (VideoFrame &videoFrame) final
 
bool onSecondaryCameraCaptureVideoFrame (VideoFrame &videoFrame) final
 
bool onScreenCaptureVideoFrame (VideoFrame &videoFrame) final
 
bool onSecondaryScreenCaptureVideoFrame (VideoFrame &videoFrame) final
 
bool onRenderVideoFrame (rtc::uid_t uid, rtc::conn_id_t connectionId, VideoFrame &videoFrame) final
 
bool onTranscodedVideoFrame (VideoFrame &videoFrame) final
 
bool onMediaPlayerVideoFrame (VideoFrame &videoFrame, int mediaPlayerId) final
 
bool isExternal () final
 
virtual bool onCaptureVideoFrame (webrtc::VideoFrame &videoFrame)=0
 
virtual bool onSecondaryCameraCaptureVideoFrame (webrtc::VideoFrame &videoFrame)=0
 
virtual bool onScreenCaptureVideoFrame (webrtc::VideoFrame &videoFrame)=0
 
virtual bool onSecondaryScreenCaptureVideoFrame (webrtc::VideoFrame &videoFrame)=0
 
virtual bool onRenderVideoFrame (rtc::uid_t uid, rtc::conn_id_t connectionId, const webrtc::VideoFrame &videoFrame)=0
 
virtual bool onTranscodedVideoFrame (webrtc::VideoFrame &videoFrame)=0
 
virtual bool onMediaPlayerVideoFrame (webrtc::VideoFrame &videoFrame, int mediaPlayerId)=0
 
- Public Member Functions inherited from agora::media::IVideoFrameObserver
virtual VIDEO_FRAME_PROCESS_MODE getVideoFrameProcessMode ()
 
virtual base::VIDEO_PIXEL_FORMAT getVideoPixelFormatPreference ()
 
virtual int getRotationApplied ()
 
virtual bool getMirrorApplied ()
 

Additional Inherited Members

- Public Types inherited from agora::media::IVideoFrameObserver
enum  VIDEO_FRAME_PROCESS_MODE { PROCESS_MODE_READ_ONLY, PROCESS_MODE_READ_WRITE }
 
typedef media::base::VideoFrame VideoFrame
 

Detailed Description

The IVideoFrameObserverEx class.

Member Function Documentation

◆ onCaptureVideoFrame()

bool agora::media::IVideoFrameObserverEx::onCaptureVideoFrame ( VideoFrame videoFrame)
finalvirtual

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
videoFrameA 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.

Implements agora::media::IVideoFrameObserver.

◆ onScreenCaptureVideoFrame()

bool agora::media::IVideoFrameObserverEx::onScreenCaptureVideoFrame ( VideoFrame videoFrame)
finalvirtual

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
videoFrameA 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.

Implements agora::media::IVideoFrameObserver.

◆ onRenderVideoFrame()

bool agora::media::IVideoFrameObserverEx::onRenderVideoFrame ( rtc::uid_t  uid,
rtc::conn_id_t  connectionId,
VideoFrame videoFrame 
)
finalvirtual

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
uidID of the remote user who sends the current video frame.
connectionIdID of the connection.
videoFrameA 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.

Implements agora::media::IVideoFrameObserver.

◆ onMediaPlayerVideoFrame()

bool agora::media::IVideoFrameObserverEx::onMediaPlayerVideoFrame ( VideoFrame videoFrame,
int  mediaPlayerId 
)
finalvirtual

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
videoFrameA pointer to the video frame: VideoFrame
mediaPlayerIdof 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.

Implements agora::media::IVideoFrameObserver.

◆ isExternal()

bool agora::media::IVideoFrameObserverEx::isExternal ( )
finalvirtual

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

Reimplemented from agora::media::IVideoFrameObserver.