TRTCStatistics.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. /*
  2. * Module: TRTCStatistics @ TXLiteAVSDK
  3. *
  4. * Function: 腾讯云视频通话功能的质量统计相关接口
  5. *
  6. */
  7. /// 自己本地的音视频统计信息
  8. @interface TRTCLocalStatistics : NSObject
  9. ///视频宽度
  10. @property (nonatomic, assign) uint32_t width;
  11. ///视频高度
  12. @property (nonatomic, assign) uint32_t height;
  13. ///帧率(fps)
  14. @property (nonatomic, assign) uint32_t frameRate;
  15. ///视频发送码率(Kbps)
  16. @property (nonatomic, assign) uint32_t videoBitrate;
  17. ///音频采样率(Hz)
  18. @property (nonatomic, assign) uint32_t audioSampleRate;
  19. ///音频发送码率(Kbps)
  20. @property (nonatomic, assign) uint32_t audioBitrate;
  21. ///流类型(大画面 | 小画面 | 辅路画面)
  22. @property (nonatomic, assign) TRTCVideoStreamType streamType;
  23. @end
  24. /// 远端成员的音视频统计信息
  25. @interface TRTCRemoteStatistics : NSObject
  26. /// 用户 ID,指定是哪个用户的视频流
  27. @property (nonatomic, retain) NSString* userId;
  28. /** 该线路的总丢包率(%)。
  29. *
  30. * 这个值越小越好,比如:0%的丢包率代表网络很好。
  31. * 这个丢包率是该线路的 userId 从上行到服务器再到下行的总丢包率。
  32. * 如果 downLoss 为 0%, 但是 finalLoss 不为0%,说明该 userId 在上行就出现了无法恢复的丢包。
  33. */
  34. @property (nonatomic, assign) uint32_t finalLoss;
  35. ///视频宽度
  36. @property (nonatomic, assign) uint32_t width;
  37. ///视频高度
  38. @property (nonatomic, assign) uint32_t height;
  39. ///接收帧率(fps)
  40. @property (nonatomic, assign) uint32_t frameRate;
  41. ///视频码率(Kbps)
  42. @property (nonatomic, assign) uint32_t videoBitrate;
  43. ///音频采样率(Hz)
  44. @property (nonatomic, assign) uint32_t audioSampleRate;
  45. ///音频码率(Kbps)
  46. @property (nonatomic, assign) uint32_t audioBitrate;
  47. ///流类型(大画面 | 小画面 | 辅路画面)
  48. @property (nonatomic, assign) TRTCVideoStreamType streamType;
  49. @end
  50. /// 统计数据
  51. @interface TRTCStatistics : NSObject
  52. /** C -> S 上行丢包率(%),
  53. * 这个值越小越好,例如,0%的丢包率代表网络很好,
  54. * 而 30% 的丢包率则意味着 SDK 向服务器发送的每10个数据包中就会有3个会在上行传输中丢失。
  55. */
  56. @property (nonatomic, assign) uint32_t upLoss;
  57. /** S -> C 下行丢包率(%),
  58. * 这个值越小越好,例如,0%的丢包率代表网络很好,
  59. * 而 30% 的丢包率则意味着服务器向 SDK 发送的每10个数据包中就会有3个会在下行传输中丢失。
  60. */
  61. @property (nonatomic, assign) uint32_t downLoss;
  62. ///当前 App 的 CPU 使用率(%)
  63. @property (nonatomic, assign) uint32_t appCpu;
  64. ///当前系统的 CPU 使用率(%)
  65. @property (nonatomic, assign) uint32_t systemCpu;
  66. /// 延迟(毫秒)
  67. ///
  68. /// 代表 SDK 跟服务器一来一回之间所消耗的时间,这个值越小越好。
  69. /// 一般低于50ms的 rtt 是比较理想的情况,而高于100ms的 rtt 会引入较大的通话延时。
  70. /// 由于数据上下行共享一条网络连接,所以 local 和 remote 的 rtt 相同。
  71. @property (nonatomic, assign) uint32_t rtt;
  72. /// 总接收字节数(包含信令及音视频)
  73. @property (nonatomic, assign) uint64_t receivedBytes;
  74. /// 总发送字节数(包含信令及音视频)
  75. @property (nonatomic, assign) uint64_t sentBytes;
  76. ///自己本地的音视频统计信息,由于可能有大画面、小画面以及辅路画面等多路的情况,所以是一个数组
  77. @property (nonatomic, strong) NSArray<TRTCLocalStatistics*>* localStatistics;
  78. ///远端成员的音视频统计信息,由于可能有大画面、小画面以及辅路画面等多路的情况,所以是一个数组
  79. @property (nonatomic, strong) NSArray<TRTCRemoteStatistics*>* remoteStatistics;
  80. @end