Agora C++ API Reference for All Platforms

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
agora::rtc::RtcStats Struct Reference

`#include <AgoraBase.h>`

## Public Member Functions
| RtcStats ()

## Public Attributes
unsigned int | duration
unsigned int | txBytes
unsigned int | rxBytes
unsigned int | txAudioBytes
unsigned int | txVideoBytes
unsigned int | rxAudioBytes
unsigned int | rxVideoBytes
unsigned short | txKBitRate
unsigned short | rxKBitRate
unsigned short | rxAudioKBitRate
unsigned short | txAudioKBitRate
unsigned short | rxVideoKBitRate
unsigned short | txVideoKBitRate
unsigned short | lastmileDelay
unsigned int | userCount
double | cpuAppUsage
double | cpuTotalUsage
int | gatewayRtt
double | memoryAppUsageRatio
double | memoryTotalUsageRatio
int | memoryAppUsageInKbytes
int | connectTimeMs
int | firstAudioPacketDuration
int | firstVideoPacketDuration
int | firstVideoKeyFramePacketDuration
int | packetsBeforeFirstKeyFramePacket
int | firstAudioPacketDurationAfterUnmute
int | firstVideoPacketDurationAfterUnmute
int | firstVideoKeyFramePacketDurationAfterUnmute
int | firstVideoKeyFrameDecodedDurationAfterUnmute
int | firstVideoKeyFrameRenderedDurationAfterUnmute
int | txPacketLossRate
int | rxPacketLossRate
int | lanAccelerateState

## Constructor & Destructor Documentation

## ◆ RtcStats()

agora::rtc::RtcStats::RtcStats | ( |  | ) |
| inline

## Member Data Documentation

## ◆ duration

unsigned int agora::rtc::RtcStats::duration

Call duration of the local user in seconds, represented by an aggregate value.

## ◆ txBytes

unsigned int agora::rtc::RtcStats::txBytes

The number of bytes sent.

## ◆ rxBytes

unsigned int agora::rtc::RtcStats::rxBytes

The number of bytes received.

## ◆ txAudioBytes

unsigned int agora::rtc::RtcStats::txAudioBytes

The total number of audio bytes sent, represented by an aggregate value.

## ◆ txVideoBytes

unsigned int agora::rtc::RtcStats::txVideoBytes

The total number of video bytes sent, represented by an aggregate value.

## ◆ rxAudioBytes

unsigned int agora::rtc::RtcStats::rxAudioBytes

The total number of audio bytes received, represented by an aggregate value.

## ◆ rxVideoBytes

unsigned int agora::rtc::RtcStats::rxVideoBytes

The total number of video bytes received, represented by an aggregate value.

## ◆ txKBitRate

unsigned short agora::rtc::RtcStats::txKBitRate

The actual bitrate (Kbps) while sending the local video stream.

## ◆ rxKBitRate

unsigned short agora::rtc::RtcStats::rxKBitRate

The receiving bitrate (Kbps).

## ◆ rxAudioKBitRate

unsigned short agora::rtc::RtcStats::rxAudioKBitRate

The bitrate (Kbps) of receiving the audio.

## ◆ txAudioKBitRate

unsigned short agora::rtc::RtcStats::txAudioKBitRate

The bitrate (Kbps) of sending the audio packet.

## ◆ rxVideoKBitRate

unsigned short agora::rtc::RtcStats::rxVideoKBitRate

The bitrate (Kbps) of receiving the video.

## ◆ txVideoKBitRate

unsigned short agora::rtc::RtcStats::txVideoKBitRate

The bitrate (Kbps) of sending the video.

## ◆ lastmileDelay

unsigned short agora::rtc::RtcStats::lastmileDelay

The client-to-server delay (milliseconds).

## ◆ userCount

unsigned int agora::rtc::RtcStats::userCount

The number of users in the channel.

## ◆ cpuAppUsage

double agora::rtc::RtcStats::cpuAppUsage

Application CPU usage (%).

Note
  - The value of `cpuAppUsage` is always reported as 0 in the `onLeaveChannel` callback.
  - As of Android 8.1, you cannot get the CPU usage from this attribute due to system limitations.

## ◆ cpuTotalUsage

double agora::rtc::RtcStats::cpuTotalUsage

The system CPU usage (%). For Windows, in the multi-kernel environment, this member represents the average CPU usage. The value = (100 - System Idle Progress in Task Manager)/100.

Note
  - The value of `cpuTotalUsage` is always reported as 0 in the `onLeaveChannel` callback.
  - As of Android 8.1, you cannot get the CPU usage from this attribute due to system limitations.

## ◆ gatewayRtt

int agora::rtc::RtcStats::gatewayRtt

The round-trip time delay (ms) from the client to the local router.

Note
  This property is disabled on devices running iOS 14 or later, and enabled on devices running versions earlier than iOS 14 by default. To enable this property on devices running iOS 14 or later, `technical support`. On Android, to get `gatewayRtt`, ensure that you add the `android.permission.ACCESS_WIFI_STATE` permission after `</application>` in the `AndroidManifest.xml` file in your project.

## ◆ memoryAppUsageRatio

double agora::rtc::RtcStats::memoryAppUsageRatio

The memory ratio occupied by the app (%).

Note
  This value is for reference only. Due to system limitations, you may not get this value.

## ◆ memoryTotalUsageRatio

double agora::rtc::RtcStats::memoryTotalUsageRatio

The memory occupied by the system (%).

Note
  This value is for reference only. Due to system limitations, you may not get this value.

## ◆ memoryAppUsageInKbytes

int agora::rtc::RtcStats::memoryAppUsageInKbytes

The memory size occupied by the app (KB).

Note
  This value is for reference only. Due to system limitations, you may not get this value.

## ◆ connectTimeMs

int agora::rtc::RtcStats::connectTimeMs

The duration (ms) between the SDK starts connecting and the connection is established. If the value reported is 0, it means invalid.

## ◆ firstAudioPacketDuration

int agora::rtc::RtcStats::firstAudioPacketDuration

The duration (ms) between the app starting connecting to an Agora channel and the first audio packet is received. 0 indicates that this member does not apply.

## ◆ firstVideoPacketDuration

int agora::rtc::RtcStats::firstVideoPacketDuration

The duration (ms) between the app starting connecting to an Agora channel and the first video packet is received. 0 indicates that this member does not apply.

## ◆ firstVideoKeyFramePacketDuration

int agora::rtc::RtcStats::firstVideoKeyFramePacketDuration

The duration (ms) between the app starting connecting to an Agora channel and the first video key frame is received. 0 indicates that this member does not apply.

## ◆ packetsBeforeFirstKeyFramePacket

int agora::rtc::RtcStats::packetsBeforeFirstKeyFramePacket

The number of video packets before the first video key frame is received. 0 indicates that this member does not apply.

## ◆ firstAudioPacketDurationAfterUnmute

int agora::rtc::RtcStats::firstAudioPacketDurationAfterUnmute

The duration (ms) between the last time unmute audio and the first audio packet is received. 0 indicates that this member does not apply.

## ◆ firstVideoPacketDurationAfterUnmute

int agora::rtc::RtcStats::firstVideoPacketDurationAfterUnmute

The duration (ms) between the last time unmute video and the first video packet is received. 0 indicates that this member does not apply.

## ◆ firstVideoKeyFramePacketDurationAfterUnmute

int agora::rtc::RtcStats::firstVideoKeyFramePacketDurationAfterUnmute

The duration (ms) between the last time unmute video and the first video key frame is received. 0 indicates that this member does not apply.

## ◆ firstVideoKeyFrameDecodedDurationAfterUnmute

int agora::rtc::RtcStats::firstVideoKeyFrameDecodedDurationAfterUnmute

The duration (ms) between the last time unmute video and the first video key frame is decoded. 0 indicates that this member does not apply.

## ◆ firstVideoKeyFrameRenderedDurationAfterUnmute

int agora::rtc::RtcStats::firstVideoKeyFrameRenderedDurationAfterUnmute

The duration (ms) between the last time unmute video and the first video key frame is rendered. 0 indicates that this member does not apply.

## ◆ txPacketLossRate

int agora::rtc::RtcStats::txPacketLossRate

The packet loss rate (%) from the client to the Agora server before applying the anti-packet-loss algorithm.

## ◆ rxPacketLossRate

int agora::rtc::RtcStats::rxPacketLossRate

The packet loss rate (%) from the Agora server to the client before using the anti-packet-loss method.

## ◆ lanAccelerateState

int agora::rtc::RtcStats::lanAccelerateState

The local network acceleration state. A value of 1 indicates that local network acceleration is active, while 0 indicates it is inactive. @technical preview