Agora Java API Reference for Android
Classes | Public Member Functions | List of all members
agora::rtc::IPacketObserver Class Referenceabstract

#include <AgoraBase.h>

Classes

struct  Packet
 

Public Member Functions

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.

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