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 11 #import <Foundation/Foundation.h> 12 13 #import "RTCMacros.h" 14 15 @class RTC_OBJC_TYPE(RTCStatistics); 16 17 NS_ASSUME_NONNULL_BEGIN 18 19 /** A statistics report. Encapsulates a number of RTCStatistics objects. */ 20 RTC_OBJC_EXPORT 21 @interface RTC_OBJC_TYPE (RTCStatisticsReport) : NSObject 22 23 /** The timestamp of the report in microseconds since 1970-01-01T00:00:00Z. */ 24 @property(nonatomic, readonly) CFTimeInterval timestamp_us; 25 26 /** RTCStatistics objects by id. */ 27 @property(nonatomic, readonly) NSDictionary<NSString *, RTC_OBJC_TYPE(RTCStatistics) *> *statistics; 28 29 - (instancetype)init NS_UNAVAILABLE; 30 31 @end 32 33 /** A part of a report (a subreport) covering a certain area. */ 34 RTC_OBJC_EXPORT 35 @interface RTC_OBJC_TYPE (RTCStatistics) : NSObject 36 37 /** The id of this subreport, e.g. "RTCMediaStreamTrack_receiver_2". */ 38 @property(nonatomic, readonly) NSString *id; 39 40 /** The timestamp of the subreport in microseconds since 1970-01-01T00:00:00Z. */ 41 @property(nonatomic, readonly) CFTimeInterval timestamp_us; 42 43 /** The type of the subreport, e.g. "track", "codec". */ 44 @property(nonatomic, readonly) NSString *type; 45 46 /** The keys and values of the subreport, e.g. "totalFramesDuration = 5.551". 47 The values are either NSNumbers or NSStrings, or NSArrays encapsulating NSNumbers 48 or NSStrings. */ 49 @property(nonatomic, readonly) NSDictionary<NSString *, NSObject *> *values; 50 51 - (instancetype)init NS_UNAVAILABLE; 52 53 @end 54 55 NS_ASSUME_NONNULL_END 56