Agora Java API Reference for Android

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

`#include <NGIAgoraMediaNode.h>`

## Public Member Functions
virtual bool | onMediaPacketReceived (const uint8_t *packet, size_t length, const agora::media::base::PacketOptions &options)=0

## Detailed Description

The IMediaPacketReceiver class. You can register a receiver in remote audio or video tracks to trigger callbacks when RTP/UDP packets are received.

## Member Function Documentation

## ◆ onMediaPacketReceived()

virtual bool agora::rtc::IMediaPacketReceiver::onMediaPacketReceived | ( | const uint8_t * | packet,
|  | size_t | length,
|  | const agora::media::base::PacketOptions & | options
| ) |  |
| pure virtual

Occurs when the track receives a media packet.

Parameters

  packet | The pointer to the media packet.
  length | The length of the packet.
  options | The packet info.