OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CHROMECAST_MEDIA_CMA_BASE_BUFFERING_CONTROLLER_H | 5 #ifndef CHROMECAST_MEDIA_CMA_BASE_BUFFERING_CONTROLLER_H |
6 #define CHROMECAST_MEDIA_CMA_BASE_BUFFERING_CONTROLLER_H | 6 #define CHROMECAST_MEDIA_CMA_BASE_BUFFERING_CONTROLLER_H |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 scoped_refptr<BufferingConfig> config_; | 84 scoped_refptr<BufferingConfig> config_; |
85 | 85 |
86 // Callback invoked each time there is a change of the buffering state. | 86 // Callback invoked each time there is a change of the buffering state. |
87 BufferingNotificationCB buffering_notification_cb_; | 87 BufferingNotificationCB buffering_notification_cb_; |
88 | 88 |
89 // State of the buffering controller. | 89 // State of the buffering controller. |
90 bool is_buffering_; | 90 bool is_buffering_; |
91 | 91 |
92 // Start time of a re-buffering phase. | 92 // Start time of a re-buffering phase. |
93 base::Time begin_buffering_time_; | 93 base::Time begin_buffering_time_; |
| 94 bool initial_buffering_; |
94 | 95 |
95 // Buffering level for each individual stream. | 96 // Buffering level for each individual stream. |
96 typedef std::list<scoped_refptr<BufferingState> > StreamList; | 97 typedef std::list<scoped_refptr<BufferingState> > StreamList; |
97 StreamList stream_list_; | 98 StreamList stream_list_; |
98 | 99 |
99 base::WeakPtr<BufferingController> weak_this_; | 100 base::WeakPtr<BufferingController> weak_this_; |
100 base::WeakPtrFactory<BufferingController> weak_factory_; | 101 base::WeakPtrFactory<BufferingController> weak_factory_; |
101 | 102 |
102 DISALLOW_COPY_AND_ASSIGN(BufferingController); | 103 DISALLOW_COPY_AND_ASSIGN(BufferingController); |
103 }; | 104 }; |
104 | 105 |
105 } // namespace media | 106 } // namespace media |
106 } // namespace chromecast | 107 } // namespace chromecast |
107 | 108 |
108 #endif // CHROMECAST_MEDIA_CMA_BASE_BUFFERING_CONTROLLER_H | 109 #endif // CHROMECAST_MEDIA_CMA_BASE_BUFFERING_CONTROLLER_H |
OLD | NEW |