Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(387)

Unified Diff: webrtc/examples/objc/AppRTCDemo/ARDBitrateTracker.h

Issue 2358133003: Revert of Rename AppRTCDemo on Android and iOS to AppRTCMobile (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/examples/objc/AppRTCDemo/ARDBitrateTracker.h
diff --git a/webrtc/examples/objc/AppRTCDemo/ARDBitrateTracker.h b/webrtc/examples/objc/AppRTCDemo/ARDBitrateTracker.h
new file mode 100644
index 0000000000000000000000000000000000000000..81ac4b4bd532e7975fd8e015cb1f8ff0191c4258
--- /dev/null
+++ b/webrtc/examples/objc/AppRTCDemo/ARDBitrateTracker.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2015 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import <Foundation/Foundation.h>
+
+/** Class used to estimate bitrate based on byte count. It is expected that
+ * byte count is monotonocially increasing. This class tracks the times that
+ * byte count is updated, and measures the bitrate based on the byte difference
+ * over the interval between updates.
+ */
+@interface ARDBitrateTracker : NSObject
+
+/** The bitrate in bits per second. */
+@property(nonatomic, readonly) double bitrate;
+/** The bitrate as a formatted string in bps, Kbps or Mbps. */
+@property(nonatomic, readonly) NSString *bitrateString;
+
+/** Converts the bitrate to a readable format in bps, Kbps or Mbps. */
++ (NSString *)bitrateStringForBitrate:(double)bitrate;
+/** Updates the tracked bitrate with the new byte count. */
+- (void)updateBitrateWithCurrentByteCount:(NSInteger)byteCount;
+
+@end
« no previous file with comments | « webrtc/examples/objc/AppRTCDemo/ARDAppEngineClient.m ('k') | webrtc/examples/objc/AppRTCDemo/ARDBitrateTracker.m » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698