RTCStatisticsReport.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * Copyright 2019 The WebRTC project authors. All Rights Reserved.
  3. *
  4. * Use of this source code is governed by a BSD-style license
  5. * that can be found in the LICENSE file in the root of the source
  6. * tree. An additional intellectual property rights grant can be found
  7. * in the file PATENTS. All contributing project authors may
  8. * be found in the AUTHORS file in the root of the source tree.
  9. */
  10. #import <Foundation/Foundation.h>
  11. #import "RTCMacros.h"
  12. @class RTC_OBJC_TYPE(RTCStatistics);
  13. NS_ASSUME_NONNULL_BEGIN
  14. /** A statistics report. Encapsulates a number of RTCStatistics objects. */
  15. RTC_OBJC_EXPORT
  16. @interface RTC_OBJC_TYPE (RTCStatisticsReport) : NSObject
  17. /** The timestamp of the report in microseconds since 1970-01-01T00:00:00Z. */
  18. @property(nonatomic, readonly) CFTimeInterval timestamp_us;
  19. /** RTCStatistics objects by id. */
  20. @property(nonatomic, readonly) NSDictionary<NSString *, RTC_OBJC_TYPE(RTCStatistics) *> *statistics;
  21. - (instancetype)init NS_UNAVAILABLE;
  22. @end
  23. /** A part of a report (a subreport) covering a certain area. */
  24. RTC_OBJC_EXPORT
  25. @interface RTC_OBJC_TYPE (RTCStatistics) : NSObject
  26. /** The id of this subreport, e.g. "RTCMediaStreamTrack_receiver_2". */
  27. @property(nonatomic, readonly) NSString *id;
  28. /** The timestamp of the subreport in microseconds since 1970-01-01T00:00:00Z. */
  29. @property(nonatomic, readonly) CFTimeInterval timestamp_us;
  30. /** The type of the subreport, e.g. "track", "codec". */
  31. @property(nonatomic, readonly) NSString *type;
  32. /** The keys and values of the subreport, e.g. "totalFramesDuration = 5.551".
  33. The values are either NSNumbers or NSStrings, or NSArrays encapsulating NSNumbers
  34. or NSStrings. */
  35. @property(nonatomic, readonly) NSDictionary<NSString *, NSObject *> *values;
  36. - (instancetype)init NS_UNAVAILABLE;
  37. @end
  38. NS_ASSUME_NONNULL_END