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

Side by Side Diff: media/cast/congestion_control/congestion_control.h

Issue 149093008: Cast:Refactor CongestionControl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_CAST_CONGESTION_CONTROL_CONGESTION_CONTROL_H_ 5 #ifndef MEDIA_CAST_CONGESTION_CONTROL_CONGESTION_CONTROL_H_
6 #define MEDIA_CAST_CONGESTION_CONTROL_CONGESTION_CONTROL_H_ 6 #define MEDIA_CAST_CONGESTION_CONTROL_CONGESTION_CONTROL_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/time/tick_clock.h" 10 #include "base/time/tick_clock.h"
(...skipping 12 matching lines...) Expand all
23 23
24 virtual ~CongestionControl(); 24 virtual ~CongestionControl();
25 25
26 // Don't call OnAck if the same message contain a NACK. 26 // Don't call OnAck if the same message contain a NACK.
27 // Returns true if the bitrate have changed. 27 // Returns true if the bitrate have changed.
28 bool OnAck(base::TimeDelta rtt_ms, uint32* new_bitrate); 28 bool OnAck(base::TimeDelta rtt_ms, uint32* new_bitrate);
29 29
30 // Returns true if the bitrate have changed. 30 // Returns true if the bitrate have changed.
31 bool OnNack(base::TimeDelta rtt_ms, uint32* new_bitrate); 31 bool OnNack(base::TimeDelta rtt_ms, uint32* new_bitrate);
32 32
33
34 private: 33 private:
35 base::TickClock* const clock_; // Not owned by this class. 34 base::TickClock* const clock_; // Not owned by this class.
36 const float congestion_control_back_off_; 35 const float congestion_control_back_off_;
37 const uint32 max_bitrate_configured_; 36 const uint32 max_bitrate_configured_;
38 const uint32 min_bitrate_configured_; 37 const uint32 min_bitrate_configured_;
39 uint32 bitrate_; 38 uint32 bitrate_;
40 base::TimeTicks time_last_increase_; 39 base::TimeTicks time_last_increase_;
41 base::TimeTicks time_last_decrease_; 40 base::TimeTicks time_last_decrease_;
42 41
43 DISALLOW_COPY_AND_ASSIGN(CongestionControl); 42 DISALLOW_COPY_AND_ASSIGN(CongestionControl);
44 }; 43 };
45 44
46 } // namespace cast 45 } // namespace cast
47 } // namespace media 46 } // namespace media
48 47
49 #endif // MEDIA_CAST_CONGESTION_CONTROL_CONGESTION_CONTROL_H_ 48 #endif // MEDIA_CAST_CONGESTION_CONTROL_CONGESTION_CONTROL_H_
OLDNEW
« no previous file with comments | « media/cast/audio_sender/audio_sender.cc ('k') | media/cast/congestion_control/congestion_control.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698