Agora C++ API Reference for All Platforms

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

## 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 SDK is ready to send the audio packet.

Parameters

  packet | The audio packet to be sent: Packet.

Returns
  Whether to send the audio packet:
  - true: Send the packet.
  - false: Do not send the packet, in which case the audio packet will be discarded.

## ◆ onSendVideoPacket()

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

Occurs when the SDK is ready to send the video packet.

Parameters

  packet | The video packet to be sent: Packet.

Returns
  Whether to send the video packet:
  - true: Send the packet.
  - false: Do not send the packet, in which case the audio packet will be discarded.

## ◆ onReceiveAudioPacket()

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

Occurs when the audio packet is received.

Parameters

  packet | The received audio packet: Packet.

Returns
  Whether to process the audio packet:
  - true: Process the packet.
  - false: Do not process the packet, in which case the audio packet will be discarded.

## ◆ onReceiveVideoPacket()

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

Occurs when the video packet is received.

Parameters

  packet | The received video packet: Packet.

Returns
  Whether to process the audio packet:
  - true: Process the packet.
  - false: Do not process the packet, in which case the video packet will be discarded.