Agora Server Gateway SDK C++ API Reference
Public Member Functions | Protected Member Functions | List of all members
agora::rtc::IVideoTrack Class Referenceabstract

#include <NGIAgoraVideoTrack.h>

Public Member Functions

virtual bool addRenderer (agora_refptr< IVideoSinkBase > videoRenderer, media::base::VIDEO_MODULE_POSITION position=media::base::POSITION_POST_FILTERS)=0
 
virtual bool removeRenderer (agora_refptr< IVideoSinkBase > videoRenderer, media::base::VIDEO_MODULE_POSITION position=media::base::POSITION_POST_FILTERS)=0
 
virtual VideoTrackType getType ()=0
 

Protected Member Functions

 ~IVideoTrack ()
 

Detailed Description

The IVideoTrack class defines the behavior and status of a video track.

Constructor & Destructor Documentation

◆ ~IVideoTrack()

agora::rtc::IVideoTrack::~IVideoTrack ( )
inlineprotected

Member Function Documentation

◆ addRenderer()

virtual bool agora::rtc::IVideoTrack::addRenderer ( agora_refptr< IVideoSinkBase videoRenderer,
media::base::VIDEO_MODULE_POSITION  position = media::base::POSITION_POST_FILTERS 
)
pure virtual

Adds a video renderer to the video track.

Add a video renderer in either of the following ways:

  • Use the built-in video renderer by implementing the IVideoRenderer in the IMediaNodeFactory class.
  • Use a custom video renderer by implementing the IVideoSinkBase class.
Parameters
videoRendererThe video renderer that you want to add: IVideoSinkBase.
positionThe position where the renderer is added.
Returns
  • true: The video renderer is added successfully.
  • false: The video renderer fails to be added.

◆ getType()

virtual VideoTrackType agora::rtc::IVideoTrack::getType ( )
pure virtual

Get the track type of the video track

Returns
  • VideoTrackType

◆ removeRenderer()

virtual bool agora::rtc::IVideoTrack::removeRenderer ( agora_refptr< IVideoSinkBase videoRenderer,
media::base::VIDEO_MODULE_POSITION  position = media::base::POSITION_POST_FILTERS 
)
pure virtual

Removes the video renderer added by addRenderer from the video track.

Parameters
videoRendererThe video renderer that you want to remove: IVideoSinkBase.
positionThe position where the renderer is removed: VIDEO_MODULE_POSITION.
Returns
  • true: The video renderer is removed successfully.
  • false: The video renderer fails to be removed.

The documentation for this class was generated from the following file: