Agora RTC Objective-C API Reference Refactor

Public Member Functions
IMediaPacketSender Class Referenceabstract

Inherits RefCountInterface.

## 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

## 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()

~IMediaPacketSender | ( |  | ) |
| inline protected

## Member Function Documentation

## ◆ sendMediaPacket()

virtual int 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.

## ◆ AddRef()

virtual void AddRef | ( |  | ) | const
| pure virtual inherited

## ◆ Release()

virtual RefCountReleaseStatus Release | ( |  | ) | const
| pure virtual inherited

## ◆ HasOneRef()

virtual bool HasOneRef | ( |  | ) | const
| pure virtual inherited