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

Side by Side Diff: webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h

Issue 2913793002: Address some violations of chromium-style. (Closed)
Patch Set: Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 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 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 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 25 matching lines...) Expand all
36 uint32_t bitrate) = 0; 36 uint32_t bitrate) = 0;
37 37
38 virtual ~RemoteBitrateObserver() {} 38 virtual ~RemoteBitrateObserver() {}
39 }; 39 };
40 40
41 // TODO(holmer): Remove when all implementations have been updated. 41 // TODO(holmer): Remove when all implementations have been updated.
42 struct ReceiveBandwidthEstimatorStats {}; 42 struct ReceiveBandwidthEstimatorStats {};
43 43
44 class RemoteBitrateEstimator : public CallStatsObserver, public Module { 44 class RemoteBitrateEstimator : public CallStatsObserver, public Module {
45 public: 45 public:
46 virtual ~RemoteBitrateEstimator() {} 46 ~RemoteBitrateEstimator() override {}
47 47
48 // Called for each incoming packet. Updates the incoming payload bitrate 48 // Called for each incoming packet. Updates the incoming payload bitrate
49 // estimate and the over-use detector. If an over-use is detected the 49 // estimate and the over-use detector. If an over-use is detected the
50 // remote bitrate estimate will be updated. Note that |payload_size| is the 50 // remote bitrate estimate will be updated. Note that |payload_size| is the
51 // packet size excluding headers. 51 // packet size excluding headers.
52 // Note that |arrival_time_ms| can be of an arbitrary time base. 52 // Note that |arrival_time_ms| can be of an arbitrary time base.
53 virtual void IncomingPacket(int64_t arrival_time_ms, 53 virtual void IncomingPacket(int64_t arrival_time_ms,
54 size_t payload_size, 54 size_t payload_size,
55 const RTPHeader& header) = 0; 55 const RTPHeader& header) = 0;
56 56
57 // Removes all data for |ssrc|. 57 // Removes all data for |ssrc|.
58 virtual void RemoveStream(uint32_t ssrc) = 0; 58 virtual void RemoveStream(uint32_t ssrc) = 0;
59 59
60 // Returns true if a valid estimate exists and sets |bitrate_bps| to the 60 // Returns true if a valid estimate exists and sets |bitrate_bps| to the
61 // estimated payload bitrate in bits per second. |ssrcs| is the list of ssrcs 61 // estimated payload bitrate in bits per second. |ssrcs| is the list of ssrcs
62 // currently being received and of which the bitrate estimate is based upon. 62 // currently being received and of which the bitrate estimate is based upon.
63 virtual bool LatestEstimate(std::vector<uint32_t>* ssrcs, 63 virtual bool LatestEstimate(std::vector<uint32_t>* ssrcs,
64 uint32_t* bitrate_bps) const = 0; 64 uint32_t* bitrate_bps) const = 0;
65 65
66 // TODO(holmer): Remove when all implementations have been updated. 66 // TODO(holmer): Remove when all implementations have been updated.
67 virtual bool GetStats(ReceiveBandwidthEstimatorStats* output) const { 67 virtual bool GetStats(ReceiveBandwidthEstimatorStats* output) const;
68 return false;
69 }
70 68
71 virtual void SetMinBitrate(int min_bitrate_bps) = 0; 69 virtual void SetMinBitrate(int min_bitrate_bps) = 0;
72 70
73 protected: 71 protected:
74 static const int64_t kProcessIntervalMs = 500; 72 static const int64_t kProcessIntervalMs = 500;
75 static const int64_t kStreamTimeOutMs = 2000; 73 static const int64_t kStreamTimeOutMs = 2000;
76 }; 74 };
77 75
76 inline bool RemoteBitrateEstimator::GetStats(
77 ReceiveBandwidthEstimatorStats* output) const {
78 return false;
79 }
80
78 } // namespace webrtc 81 } // namespace webrtc
79 82
80 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_INCLUDE_REMOTE_BITRATE_ESTIMA TOR_H_ 83 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_INCLUDE_REMOTE_BITRATE_ESTIMA TOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698