Agora Java API Reference for Android

Public Member Functions | List of all members
agora::rtc::IRemoteVideoTrack Class Referenceabstract

`#include <NGIAgoraVideoTrack.h>`

Inheritance diagram for agora::rtc::IRemoteVideoTrack:

## Public Member Functions
virtual bool | getStatistics (RemoteVideoTrackStats &stats)=0
virtual REMOTE_VIDEO_STATE | getState ()=0
virtual bool | getTrackInfo (VideoTrackInfo &info)=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)
virtual int | registerVideoEncodedFrameObserver (agora::media::IVideoEncodedFrameObserver *encodedObserver, aosl_ref_t ares=AOSL_REF_INVALID)
virtual int | unregisterVideoEncodedFrameObserver (agora::media::IVideoEncodedFrameObserver *encodedObserver)
Public Member Functions inherited from agora::RefCountInterface
virtual void | AddRef () const =0
virtual RefCountReleaseStatus | Release () const =0
virtual bool | HasOneRef () const =0

## Detailed Description

The IRemoteVideoTrack class.

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

## ◆ 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 | ( |  | ) |
| virtual

Get the track type of the video track

Returns
  - VideoTrackType

Implements agora::rtc::IVideoTrack.