Agora C++ API Reference for All Platforms

Classes | Public Member Functions | List of all members
agora::rtc::IVideoRendererEx Class Reference

Inherits agora::rtc::IVideoRenderer.

Inherited by agora::rtc::IObservableVideoSink.

## Classes
struct | ViewOption

## Public Member Functions
virtual int | onFrame (const webrtc::VideoFrame &videoFrame)
int | setView (void *view, aosl_ref_t ares=AOSL_REF_INVALID) override
int | addView (void *view, const Rectangle &cropArea, aosl_ref_t ares=AOSL_REF_INVALID) override
int | removeView (void *view) override
virtual int | addViewEx (agora::rtc::view_shared_ptr_t view, const ViewOption &option)
virtual int | addViewEx (agora::rtc::view_shared_ptr_t view)
virtual int | removeViewEx (agora::view_t view)
int | setRenderMode (void *view, media::base::RENDER_MODE_TYPE renderMode, aosl_ref_t ares=AOSL_REF_INVALID) override
int | setMirror (void *view, bool mirror, aosl_ref_t ares=AOSL_REF_INVALID) override
virtual int | setRenderModeEx (agora::view_t view, media::base::RENDER_MODE_TYPE renderMode, aosl_ref_t ares=AOSL_REF_INVALID)
virtual int | setMirrorEx (agora::view_t view, bool mirror, aosl_ref_t ares=AOSL_REF_INVALID)
virtual int | setCropAreaEx (agora::view_t view, const Rectangle &cropArea, aosl_ref_t ares=AOSL_REF_INVALID)
virtual void | attachUserInfo (uid_t uid, uint64_t state_space)
virtual void | SetVideoQoEPusher (std::weak_ptr< agora::rtc::VideoStatsEventsPusher > pusher)
virtual int | getViewMetaInfo (PreviewMetaInfo &info)
virtual int | getViewMetaInfo (agora::view_t view, PreviewMetaInfo &info)
virtual int | getViewCount ()
virtual int | clearBuffer ()
virtual int | setRenderModeLLApiInternal (media::base::RENDER_MODE_TYPE renderMode)
virtual int | setRenderModeLLApiInternal (void *view, media::base::RENDER_MODE_TYPE renderMode)
virtual int | setRenderModeExLLApiInternal (view_t view, media::base::RENDER_MODE_TYPE renderMode)
virtual int | setMirrorLLApiInternal (bool mirror)
virtual int | setMirrorLLApiInternal (void *view, bool mirror)
virtual int | setMirrorExLLApiInternal (view_t view, bool mirror)
virtual int | setCropAreaExLLApiInternal (view_t view, const Rectangle &cropArea)
virtual int | setViewLLApiInternal (view_t view)
virtual int | addViewLLApiInternal (view_t view, const Rectangle &cropArea)
virtual int | unsetViewLLApiInternal ()
virtual int | removeViewLLApiInternal (view_t view)
virtual int | setRenderMode (media::base::RENDER_MODE_TYPE renderMode, aosl_ref_t ares=AOSL_REF_INVALID)=0
virtual int | setRenderMode (void *view, media::base::RENDER_MODE_TYPE renderMode, aosl_ref_t ares=AOSL_REF_INVALID)=0
virtual int | setMirror (bool mirror, aosl_ref_t ares=AOSL_REF_INVALID)=0
virtual int | setMirror (void *view, bool mirror, aosl_ref_t ares=AOSL_REF_INVALID)=0
Public Member Functions inherited from agora::rtc::IVideoRenderer
virtual int | setRenderMode (media::base::RENDER_MODE_TYPE renderMode, aosl_ref_t ares=AOSL_REF_INVALID)=0
virtual int | setMirror (bool mirror, aosl_ref_t ares=AOSL_REF_INVALID)=0
virtual int | unsetView (aosl_ref_t ares=AOSL_REF_INVALID)=0
Public Member Functions inherited from agora::rtc::IVideoSinkBase
virtual int | setProperty (const char *key, const void *buf, int buf_size)
virtual int | getProperty (const char *key, void *buf, int buf_size)
virtual int | onFrame (const media::base::VideoFrame &videoFrame)=0
virtual bool | isExternalSink ()
virtual bool | onDataStreamWillStart ()
virtual void | onDataStreamWillStop ()
virtual bool | applyMirror ()
virtual bool | applyRotation ()
Public Member Functions inherited from agora::RefCountInterface
virtual void | AddRef () const =0
virtual RefCountReleaseStatus | Release () const =0
virtual bool | HasOneRef () const =0

## Additional Inherited Members
Protected Member Functions inherited from agora::RefCountInterface
virtual | ~RefCountInterface ()

## Member Function Documentation

## ◆ onFrame()

virtual int agora::rtc::IVideoRendererEx::onFrame | ( | const webrtc::VideoFrame & | videoFrame | ) |
| inline virtual

## ◆ setView()

int agora::rtc::IVideoRendererEx::setView | ( | void * | view,
|  | aosl_ref_t | ares = `AOSL_REF_INVALID`
| ) |  |
| inline override virtual

Sets the video display window.

Parameters

  view | The pointer to the video display window.

Returns
  - 0: Success.
  - < 0: Failure.

Implements agora::rtc::IVideoRenderer.

## ◆ addView()

int agora::rtc::IVideoRendererEx::addView | ( | void * | view,
|  | const Rectangle & | cropArea,
|  | aosl_ref_t | ares = `AOSL_REF_INVALID`
| ) |  |
| inline override virtual

Sets the video display window.

Parameters

  view | The pointer to the video display window.
  cropArea | (Optional) Sets the relative location of the region to show. See Rectangle.

Returns
  - 0: Success.
  - < 0: Failure.

Implements agora::rtc::IVideoRenderer.

## ◆ removeView()

int agora::rtc::IVideoRendererEx::removeView | ( | void * | view | ) |
| inline override virtual

remove rendering the video view on the window.

Returns
  - 0: Success.
  - < 0: Failure.

Implements agora::rtc::IVideoRenderer.

## ◆ addViewEx() [1/2]

virtual int agora::rtc::IVideoRendererEx::addViewEx | ( | agora::rtc::view_shared_ptr_t | view,
|  | const ViewOption & | option
| ) |  |
| inline virtual

## ◆ addViewEx() [2/2]

virtual int agora::rtc::IVideoRendererEx::addViewEx | ( | agora::rtc::view_shared_ptr_t | view | ) |
| inline virtual

## ◆ removeViewEx()

virtual int agora::rtc::IVideoRendererEx::removeViewEx | ( | agora::view_t | view | ) |
| inline virtual

## ◆ setRenderMode() [1/3]

int agora::rtc::IVideoRendererEx::setRenderMode | ( | void * | view,
|  | media::base::RENDER_MODE_TYPE | renderMode,
|  | aosl_ref_t | ares = `AOSL_REF_INVALID`
| ) |  |
| inline override virtual

Sets the render mode of the view.

Parameters

  view | the view to set render mode.
  renderMode | The video render mode.

Returns
  - 0: Success.
  - < 0: Failure.

Implements agora::rtc::IVideoRenderer.

## ◆ setMirror() [1/3]

int agora::rtc::IVideoRendererEx::setMirror | ( | void * | view,
|  | bool | mirror,
|  | aosl_ref_t | ares = `AOSL_REF_INVALID`
| ) |  |
| inline override virtual

Sets whether to mirror the video.

Parameters

  view | the view to set mirror mode.
  mirror | Whether to mirror the video: `true`: Mirror the video. `false`: Do not mirror the video.

Returns
  - 0: Success.
  - < 0: Failure.

Implements agora::rtc::IVideoRenderer.

## ◆ setRenderModeEx()

virtual int agora::rtc::IVideoRendererEx::setRenderModeEx | ( | agora::view_t | view,
|  | media::base::RENDER_MODE_TYPE | renderMode,
|  | aosl_ref_t | ares = `AOSL_REF_INVALID`
| ) |  |
| inline virtual

## ◆ setMirrorEx()

virtual int agora::rtc::IVideoRendererEx::setMirrorEx | ( | agora::view_t | view,
|  | bool | mirror,
|  | aosl_ref_t | ares = `AOSL_REF_INVALID`
| ) |  |
| inline virtual

## ◆ setCropAreaEx()

virtual int agora::rtc::IVideoRendererEx::setCropAreaEx | ( | agora::view_t | view,
|  | const Rectangle & | cropArea,
|  | aosl_ref_t | ares = `AOSL_REF_INVALID`
| ) |  |
| inline virtual

## ◆ attachUserInfo()

virtual void agora::rtc::IVideoRendererEx::attachUserInfo | ( | uid_t | uid,
|  | uint64_t | state_space
| ) |  |
| inline virtual

## ◆ SetVideoQoEPusher()

virtual void agora::rtc::IVideoRendererEx::SetVideoQoEPusher | ( | std::weak_ptr< agora::rtc::VideoStatsEventsPusher > | pusher | ) |
| inline virtual

## ◆ getViewMetaInfo() [1/2]

virtual int agora::rtc::IVideoRendererEx::getViewMetaInfo | ( | PreviewMetaInfo & | info | ) |
| inline virtual

## ◆ getViewMetaInfo() [2/2]

virtual int agora::rtc::IVideoRendererEx::getViewMetaInfo | ( | agora::view_t | view,
|  | PreviewMetaInfo & | info
| ) |  |
| inline virtual

## ◆ getViewCount()

virtual int agora::rtc::IVideoRendererEx::getViewCount | ( |  | ) |
| inline virtual

## ◆ clearBuffer()

virtual int agora::rtc::IVideoRendererEx::clearBuffer | ( |  | ) |
| inline virtual

## ◆ setRenderModeLLApiInternal() [1/2]

virtual int agora::rtc::IVideoRendererEx::setRenderModeLLApiInternal | ( | media::base::RENDER_MODE_TYPE | renderMode | ) |
| inline virtual

## ◆ setRenderModeLLApiInternal() [2/2]

virtual int agora::rtc::IVideoRendererEx::setRenderModeLLApiInternal | ( | void * | view,
|  | media::base::RENDER_MODE_TYPE | renderMode
| ) |  |
| inline virtual

## ◆ setRenderModeExLLApiInternal()

virtual int agora::rtc::IVideoRendererEx::setRenderModeExLLApiInternal | ( | view_t | view,
|  | media::base::RENDER_MODE_TYPE | renderMode
| ) |  |
| inline virtual

## ◆ setMirrorLLApiInternal() [1/2]

virtual int agora::rtc::IVideoRendererEx::setMirrorLLApiInternal | ( | bool | mirror | ) |
| inline virtual

## ◆ setMirrorLLApiInternal() [2/2]

virtual int agora::rtc::IVideoRendererEx::setMirrorLLApiInternal | ( | void * | view,
|  | bool | mirror
| ) |  |
| inline virtual

## ◆ setMirrorExLLApiInternal()

virtual int agora::rtc::IVideoRendererEx::setMirrorExLLApiInternal | ( | view_t | view,
|  | bool | mirror
| ) |  |
| inline virtual

## ◆ setCropAreaExLLApiInternal()

virtual int agora::rtc::IVideoRendererEx::setCropAreaExLLApiInternal | ( | view_t | view,
|  | const Rectangle & | cropArea
| ) |  |
| inline virtual

## ◆ setViewLLApiInternal()

virtual int agora::rtc::IVideoRendererEx::setViewLLApiInternal | ( | view_t | view | ) |
| inline virtual

## ◆ addViewLLApiInternal()

virtual int agora::rtc::IVideoRendererEx::addViewLLApiInternal | ( | view_t | view,
|  | const Rectangle & | cropArea
| ) |  |
| inline virtual

## ◆ unsetViewLLApiInternal()

virtual int agora::rtc::IVideoRendererEx::unsetViewLLApiInternal | ( |  | ) |
| inline virtual

## ◆ removeViewLLApiInternal()

virtual int agora::rtc::IVideoRendererEx::removeViewLLApiInternal | ( | view_t | view | ) |
| inline virtual

## ◆ setRenderMode() [2/3]

virtual int agora::rtc::IVideoRenderer::setRenderMode

Sets the render mode.

Parameters

  renderMode | The video render mode.

Returns
  - 0: Success.
  - < 0: Failure.

## ◆ setRenderMode() [3/3]

virtual int agora::rtc::IVideoRenderer::setRenderMode

Sets the render mode of the view.

Parameters

  view | the view to set render mode.
  renderMode | The video render mode.

Returns
  - 0: Success.
  - < 0: Failure.

## ◆ setMirror() [2/3]

virtual int agora::rtc::IVideoRenderer::setMirror

Sets whether to mirror the video.

Parameters

  mirror | Whether to mirror the video: `true`: Mirror the video. `false`: Do not mirror the video.

Returns
  - 0: Success.
  - < 0: Failure.

## ◆ setMirror() [3/3]

virtual int agora::rtc::IVideoRenderer::setMirror

Sets whether to mirror the video.

Parameters

  view | the view to set mirror mode.
  mirror | Whether to mirror the video: `true`: Mirror the video. `false`: Do not mirror the video.

Returns
  - 0: Success.
  - < 0: Failure.