Agora C++ API Reference for All Platforms

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

`#include <NGIAgoraMediaNode.h>`

Inherits agora::RefCountInterface.

Inherited by agora::rtc::IMediaPacketSenderEx.

## Public Member Functions
virtual int | sendMediaPacket (const uint8_t *packet, size_t length, const media::base::PacketOptions &options, aosl_ref_t ares=AOSL_REF_INVALID)=0
Public Member Functions inherited from agora::RefCountInterface
virtual void | AddRef () const =0
virtual RefCountReleaseStatus | Release () const =0
virtual bool | HasOneRef () const =0

## Protected Member Functions
| ~IMediaPacketSender ()
Protected Member Functions inherited from agora::RefCountInterface
virtual | ~RefCountInterface ()

## Detailed Description

The `IMediaPacketSender` class.

You can use the `IMediaPacketSender` class to create a LocalVideoTrack or LocalAudioTrack, and then send media packets directly to the track. The media packets are RTP/UDP packets that contain media payload. If the track is disabled, the packets will be automatically discarded.

## Constructor & Destructor Documentation

## ◆ ~IMediaPacketSender()

agora::rtc::IMediaPacketSender::~IMediaPacketSender | ( |  | ) |
| inlineprotected

## Member Function Documentation

## ◆ sendMediaPacket()

virtual int agora::rtc::IMediaPacketSender::sendMediaPacket | ( | const uint8_t * | packet,
|  | size_t | length,
|  | const media::base::PacketOptions & | options,
|  | aosl_ref_t | ares = AOSL_REF_INVALID )
| pure virtual

Sends the frame packet to the local track.

Parameters

  packet | The pointer to the packet.
  length | The packet size.
  options | The packet information: `PacketOptions`.

Returns
  - `true`: Success.
  - `false`: Failure.