Agora C++ API Reference for All Platforms

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

`#include <AgoraBase.h>`

## Classes
struct | Packet

## Public Member Functions
virtual | ~IPacketObserver ()
virtual bool | onSendAudioPacket (Packet &packet)=0
virtual bool | onSendVideoPacket (Packet &packet)=0
virtual bool | onReceiveAudioPacket (Packet &packet)=0
virtual bool | onReceiveVideoPacket (Packet &packet)=0

## Detailed Description

The definition of the IPacketObserver struct.

## Constructor & Destructor Documentation

## ◆ ~IPacketObserver()

virtual agora::rtc::IPacketObserver::~IPacketObserver | ( |  | ) |
| inline virtual

## Member Function Documentation

## ◆ onSendAudioPacket()

virtual bool agora::rtc::IPacketObserver::onSendAudioPacket | ( | Packet & | packet | ) |
| pure virtual

Occurs when the local user sends an audio packet.

Parameters

  packet | The sent audio packet, see `Packet`.

Returns
  - `true`: The audio packet is sent successfully.
  - `false`: The audio packet is discarded.

## ◆ onSendVideoPacket()

virtual bool agora::rtc::IPacketObserver::onSendVideoPacket | ( | Packet & | packet | ) |
| pure virtual

Occurs when the local user sends a video packet.

Parameters

  packet | The sent video packet, see `Packet`.

Returns
  - `true`: The video packet is sent successfully.
  - `false`: The video packet is discarded.

## ◆ onReceiveAudioPacket()

virtual bool agora::rtc::IPacketObserver::onReceiveAudioPacket | ( | Packet & | packet | ) |
| pure virtual

Occurs when the local user receives an audio packet.

Parameters

  packet | The received audio packet, see `Packet`.

Returns
  - `true`: The audio packet is received successfully.
  - `false`: The audio packet is discarded.

## ◆ onReceiveVideoPacket()

virtual bool agora::rtc::IPacketObserver::onReceiveVideoPacket | ( | Packet & | packet | ) |
| pure virtual

Occurs when the local user receives a video packet.

Parameters

  packet | The received video packet, see `Packet`.

Returns
  - `true`: The video packet is received successfully.
  - `false`: The video packet is discarded.