OpenTV Player SDK For iOS  version 2.30.0
NetworkStatistics.h
Go to the documentation of this file.
1
14#import <Foundation/Foundation.h>
15
16@protocol AdaptiveStreaming;
17@protocol ContentServer;
18@protocol NetworkUsage;
19@protocol IStatisticsListener;
20
21#pragma mark NetworkStatistics -
27@interface NetworkStatistics : NSObject
28
35@property (weak, nonatomic, readonly) id<AdaptiveStreaming> adaptiveStreaming;
36
43@property (weak, nonatomic, readonly) id<ContentServer> contentServer;
44
51@property (weak, nonatomic, readonly) id<NetworkUsage> usage;
52
58@property (nonatomic, readonly) NSInteger error;
59
65@property (weak, nonatomic, readonly) NSString* httpErrorMessage;
66
74- (void) setListener:(id<IStatisticsListener>) xListener;
75
76@end
77
78
79#pragma mark ContentServer -
80
87@protocol ContentServer <NSObject>
88
94@property (nonatomic, readonly) NSString* url;
95
104@property (nonatomic, readonly) NSString* finalUrl;
105
106@end
107
108#pragma mark Network Usage -
115@protocol NetworkUsage <NSObject>
116
124@property (nonatomic, readonly) NSUInteger downloadBitrate;
125
133@property (nonatomic, readonly) NSUInteger downloadBitrateAverage;
134
142@property (nonatomic, readonly) int64_t bytesDownloaded;
143
144@end
145
146#pragma mark Adaptive Streaming -
153@protocol AdaptiveStreaming <NSObject>
154
161@property (nonatomic, readonly) NSArray* availableBitrates;
162
169@property (nonatomic, readonly) NSUInteger selectedBitrate;
170
171@end
172
173#pragma mark IStatisticsListener -
174
181@protocol IStatisticsListener <NSObject>
182@optional
183
190
197
203- (void)urlChanged;
204
209- (void)errorChanged;
210
211@end
NetworkStatistics provides APIs to return various network statistic information during HLS stream pla...
NSInteger error
This attribute provides network error.
NSString * httpErrorMessage
This attribute provides network errorMessage.
id< NetworkUsage > usage
This attribute provides access to the NetworkUsage interface.
id< ContentServer > contentServer
This attribute provides access to the ContentServer interface.
id< AdaptiveStreaming > adaptiveStreaming
This attribute provides access to the AdaptiveStreaming interface.
AdaptiveStreaming provides statistics and event pertaining to the adaptive bitrate streaming protocol...
NSArray * availableBitrates
This attribute contains the list of currently available bitrates for the currently opened content exp...
NSUInteger selectedBitrate
This attribute contains the currently selected bitrate that is being downloaded by the player express...
ContentServer provides statistics pertaining to the content server currently in use.
NSString * finalUrl
This attribute contains the URL of the content currently downloading, after redirect if any.
NSString * url
This attribute contains the URL of the content currently downloading, as found in the adaptive stream...
IStatisticsListener provides notification for the statistics reporter fires statistic changed events.
void urlChanged()
Signal triggered when the content server URL changed.
void selectedBitrateChanged()
Signal triggered when the selected bitrate changed.
void errorChanged()
Signal triggered when the network error changed.
void availableBitratesChanged()
Signal triggered when the available bitrates list changed.
NetworkUsage provides statistics specific to the network usage.
int64_t bytesDownloaded
This attribute contains the amount of bytes downloaded for the current content.
NSUInteger downloadBitrate
This attribute contains an estimate of the current download bitrate expressed in bits/second.
NSUInteger downloadBitrateAverage
This attribute contains an estimate of the average over time of the download bitrate expressed in bit...