Agora C++ API Reference for All Platforms

Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
agora::rtc::IRemoteVideoTrack Class Referenceabstract

`#include <NGIAgoraVideoTrack.h>`

Inherits agora::rtc::IVideoTrack.

Inherited by agora::rtc::IRemoteVideoTrackEx.

## Public Member Functions
virtual bool | getStatistics (RemoteVideoTrackStats &stats)=0
virtual REMOTE_VIDEO_STATE | getState ()=0
virtual bool | getTrackInfo (VideoTrackInfo &info)=0
virtual int | registerVideoEncodedFrameObserver (agora::media::IVideoEncodedFrameObserver *encodedObserver, aosl_ref_t ares=AOSL_REF_INVALID)=0
virtual int | unregisterVideoEncodedFrameObserver (agora::media::IVideoEncodedFrameObserver *encodedObserver)=0
virtual int | registerMediaPacketReceiver (IMediaPacketReceiver *videoReceiver, aosl_ref_t ares=AOSL_REF_INVALID)=0
virtual int | unregisterMediaPacketReceiver (IMediaPacketReceiver *videoReceiver)=0
virtual VideoTrackType | getType () OPTIONAL_OVERRIDE
Public Member Functions inherited from agora::rtc::IVideoTrack
virtual bool | addVideoFilter (agora_refptr< IVideoFilter > filter, media::base::VIDEO_MODULE_POSITION position=media::base::POSITION_POST_CAPTURER, const char *id=NULL, aosl_ref_t ares=AOSL_REF_INVALID)=0
virtual bool | removeVideoFilter (agora_refptr< IVideoFilter > filter, media::base::VIDEO_MODULE_POSITION position=media::base::POSITION_POST_CAPTURER, const char *id=NULL, aosl_ref_t ares=AOSL_REF_INVALID)=0
virtual bool | hasVideoFilter (const char *id, media::base::VIDEO_MODULE_POSITION position=media::base::POSITION_POST_CAPTURER)=0
virtual bool | addRenderer (agora_refptr< IVideoSinkBase > videoRenderer, media::base::VIDEO_MODULE_POSITION position, aosl_ref_t ares=AOSL_REF_INVALID)=0
virtual bool | removeRenderer (agora_refptr< IVideoSinkBase > videoRenderer, media::base::VIDEO_MODULE_POSITION position, aosl_ref_t ares=AOSL_REF_INVALID)=0
virtual int | enableVideoFilter (const char *id, bool enable, aosl_ref_t ares=AOSL_REF_INVALID)
virtual int | setFilterProperty (const char *id, const char *key, const char *json_value, aosl_ref_t ares=AOSL_REF_INVALID)
virtual int | getFilterProperty (const char *id, const char *key, char *json_value, size_t buf_size, aosl_ref_t ares=AOSL_REF_INVALID)
Public Member Functions inherited from agora::RefCountInterface
virtual void | AddRef () const =0
virtual RefCountReleaseStatus | Release () const =0
virtual bool | HasOneRef () const =0

## Protected Member Functions
| ~IRemoteVideoTrack ()
Protected Member Functions inherited from agora::rtc::IVideoTrack
| ~IVideoTrack ()
Protected Member Functions inherited from agora::RefCountInterface
virtual | ~RefCountInterface ()

## Detailed Description

The IRemoteVideoTrack class.

## Constructor & Destructor Documentation

## ◆ ~IRemoteVideoTrack()

agora::rtc::IRemoteVideoTrack::~IRemoteVideoTrack | ( |  | ) |
| inline protected

## Member Function Documentation

## ◆ getStatistics()

virtual bool agora::rtc::IRemoteVideoTrack::getStatistics | ( | RemoteVideoTrackStats & | stats | ) |
| pure virtual

Gets the statistics of the remote video track.

Parameters

  [out] | stats | The reference to the statistics of the remote video track.

Returns
  - `true`: Success.
  - `false`: Failure.

## ◆ getState()

virtual REMOTE_VIDEO_STATE agora::rtc::IRemoteVideoTrack::getState | ( |  | ) |
| pure virtual

Gets the state of the remote video track.

Returns
  The state of the remote video track.

## ◆ getTrackInfo()

virtual bool agora::rtc::IRemoteVideoTrack::getTrackInfo | ( | VideoTrackInfo & | info | ) |
| pure virtual

Gets the information of the remote video track.

Parameters

  [out] | info | The reference to the information of the remote video track.

Returns
  - `true`: Success.
  - `false`: Failure.

## ◆ registerVideoEncodedFrameObserver()

virtual int agora::rtc::IRemoteVideoTrack::registerVideoEncodedFrameObserver | ( | agora::media::IVideoEncodedFrameObserver * | encodedObserver,
|  | aosl_ref_t | ares = AOSL_REF_INVALID )
| pure virtual

Registers an IVideoEncodedFrameObserver object.

You need to implement the `IVideoEncodedFrameObserver` class in this method. Once you successfully register the encoded image receiver, the SDK triggers the onEncodedVideoFrameReceived callback when it receives the encoded video image.

Parameters

  encodedObserver | The pointer to the `IVideoEncodedFrameObserver` object.

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

## ◆ unregisterVideoEncodedFrameObserver()

virtual int agora::rtc::IRemoteVideoTrack::unregisterVideoEncodedFrameObserver | ( | agora::media::IVideoEncodedFrameObserver * | encodedObserver | ) |
| pure virtual

Releases the IVideoEncodedFrameObserver object.

Parameters

  encodedObserver | The pointer to the `IVideoEncodedFrameObserver` object.

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

## ◆ registerMediaPacketReceiver()

virtual int agora::rtc::IRemoteVideoTrack::registerMediaPacketReceiver | ( | IMediaPacketReceiver * | videoReceiver,
|  | aosl_ref_t | ares = AOSL_REF_INVALID )
| pure virtual

Registers an IMediaPacketReceiver object.

You need to implement the `IMediaPacketReceiver` class in this method. Once you successfully register the media packet receiver, the SDK triggers the onMediaPacketReceived callback when it receives the video packet.

Parameters

  videoReceiver | The pointer to the `IMediaPacketReceiver` object.

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

## ◆ unregisterMediaPacketReceiver()

virtual int agora::rtc::IRemoteVideoTrack::unregisterMediaPacketReceiver | ( | IMediaPacketReceiver * | videoReceiver | ) |
| pure virtual

Releases the IMediaPacketReceiver object.

Parameters

  videoReceiver | The pointer to the `IMediaPacketReceiver` object.

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

## ◆ getType()

virtual VideoTrackType agora::rtc::IRemoteVideoTrack::getType | ( |  | ) |
| inline virtual

Get the track type of the video track

Returns
  - VideoTrackType

Implements agora::rtc::IVideoTrack.