#include <NGIAgoraMediaNode.h>
The IMediaControlPacketSender class.
You can get the IMediaControlPacketSender class object from a video track or audio track, and then send media control packets directly. The media control packets are RTCP/UDP packets that contain media control payload. If the track is disabled, the packets will be automatically discarded.
◆ sendPeerMediaControlPacket()
| virtual int agora::rtc::IMediaControlPacketSender::sendPeerMediaControlPacket |
( |
media::base::user_id_t |
userId, |
|
|
const uint8_t * |
packet, |
|
|
size_t |
length, |
|
|
aosl_ref_t |
ares = AOSL_REF_INVALID |
|
) |
| |
|
pure virtual |
Sends the media control packet to a specified user. Currently, we only support sending packets through video tracks.
- Parameters
-
| userId | ID of the user to send the packet to. |
| packet | The pointer to the packet. |
| length | The packet size. |
- Returns
true: Success.
false: Failure.
◆ sendBroadcastMediaControlPacket()
| virtual int agora::rtc::IMediaControlPacketSender::sendBroadcastMediaControlPacket |
( |
const uint8_t * |
packet, |
|
|
size_t |
length, |
|
|
aosl_ref_t |
ares = AOSL_REF_INVALID |
|
) |
| |
|
pure virtual |
Sends the media transport control packet to all users. Currently, we only support sending packets through video tracks.
- Parameters
-
| packet | The pointer to the packet. |
| length | The packet size. |
- Returns
true: Success.
false: Failure.