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

Side by Side Diff: webrtc/modules/congestion_controller/transport_feedback_adapter.h

Issue 2695923004: Add logging of delay-based bandwidth estimate. (Closed)
Patch Set: Only log BWE update if bitrate or state has changed. Created 3 years, 10 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) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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
11 #ifndef WEBRTC_MODULES_CONGESTION_CONTROLLER_TRANSPORT_FEEDBACK_ADAPTER_H_ 11 #ifndef WEBRTC_MODULES_CONGESTION_CONTROLLER_TRANSPORT_FEEDBACK_ADAPTER_H_
12 #define WEBRTC_MODULES_CONGESTION_CONTROLLER_TRANSPORT_FEEDBACK_ADAPTER_H_ 12 #define WEBRTC_MODULES_CONGESTION_CONTROLLER_TRANSPORT_FEEDBACK_ADAPTER_H_
13 13
14 #include <memory> 14 #include <memory>
15 #include <vector> 15 #include <vector>
16 16
17 #include "webrtc/base/criticalsection.h" 17 #include "webrtc/base/criticalsection.h"
18 #include "webrtc/base/thread_annotations.h" 18 #include "webrtc/base/thread_annotations.h"
19 #include "webrtc/base/thread_checker.h" 19 #include "webrtc/base/thread_checker.h"
20 #include "webrtc/modules/congestion_controller/delay_based_bwe.h" 20 #include "webrtc/modules/congestion_controller/delay_based_bwe.h"
21 #include "webrtc/modules/include/module_common_types.h" 21 #include "webrtc/modules/include/module_common_types.h"
22 #include "webrtc/modules/remote_bitrate_estimator/include/send_time_history.h" 22 #include "webrtc/modules/remote_bitrate_estimator/include/send_time_history.h"
23 23
24 namespace webrtc { 24 namespace webrtc {
25 25
26 class BitrateController; 26 class BitrateController;
27 class RtcEventLog;
27 class ProcessThread; 28 class ProcessThread;
28 29
29 class TransportFeedbackAdapter : public TransportFeedbackObserver, 30 class TransportFeedbackAdapter : public TransportFeedbackObserver,
30 public CallStatsObserver { 31 public CallStatsObserver {
31 public: 32 public:
32 TransportFeedbackAdapter(Clock* clock, BitrateController* bitrate_controller); 33 TransportFeedbackAdapter(RtcEventLog* event_log,
34 Clock* clock,
35 BitrateController* bitrate_controller);
33 virtual ~TransportFeedbackAdapter(); 36 virtual ~TransportFeedbackAdapter();
34 37
35 void InitBwe(); 38 void InitBwe();
36 // Implements TransportFeedbackObserver. 39 // Implements TransportFeedbackObserver.
37 void AddPacket(uint16_t sequence_number, 40 void AddPacket(uint16_t sequence_number,
38 size_t length, 41 size_t length,
39 int probe_cluster_id) override; 42 int probe_cluster_id) override;
40 void OnSentPacket(uint16_t sequence_number, int64_t send_time_ms); 43 void OnSentPacket(uint16_t sequence_number, int64_t send_time_ms);
41 44
42 // TODO(holmer): This method should return DelayBasedBwe::Result so that we 45 // TODO(holmer): This method should return DelayBasedBwe::Result so that we
(...skipping 14 matching lines...) Expand all
57 private: 60 private:
58 std::vector<PacketInfo> GetPacketFeedbackVector( 61 std::vector<PacketInfo> GetPacketFeedbackVector(
59 const rtcp::TransportFeedback& feedback); 62 const rtcp::TransportFeedback& feedback);
60 63
61 const bool send_side_bwe_with_overhead_; 64 const bool send_side_bwe_with_overhead_;
62 rtc::CriticalSection lock_; 65 rtc::CriticalSection lock_;
63 rtc::CriticalSection bwe_lock_; 66 rtc::CriticalSection bwe_lock_;
64 int transport_overhead_bytes_per_packet_ GUARDED_BY(&lock_); 67 int transport_overhead_bytes_per_packet_ GUARDED_BY(&lock_);
65 SendTimeHistory send_time_history_ GUARDED_BY(&lock_); 68 SendTimeHistory send_time_history_ GUARDED_BY(&lock_);
66 std::unique_ptr<DelayBasedBwe> delay_based_bwe_ GUARDED_BY(&bwe_lock_); 69 std::unique_ptr<DelayBasedBwe> delay_based_bwe_ GUARDED_BY(&bwe_lock_);
70 RtcEventLog* const event_log_;
67 Clock* const clock_; 71 Clock* const clock_;
68 int64_t current_offset_ms_; 72 int64_t current_offset_ms_;
69 int64_t last_timestamp_us_; 73 int64_t last_timestamp_us_;
70 BitrateController* const bitrate_controller_; 74 BitrateController* const bitrate_controller_;
71 std::vector<PacketInfo> last_packet_feedback_vector_; 75 std::vector<PacketInfo> last_packet_feedback_vector_;
72 }; 76 };
73 77
74 } // namespace webrtc 78 } // namespace webrtc
75 79
76 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_TRANSPORT_FEEDBACK_ADAPTER_H_ 80 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_TRANSPORT_FEEDBACK_ADAPTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698