| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BASE_PIPELINE_H_ | 5 #ifndef MEDIA_BASE_PIPELINE_H_ |
| 6 #define MEDIA_BASE_PIPELINE_H_ | 6 #define MEDIA_BASE_PIPELINE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 bool DidLoadingProgress(); | 176 bool DidLoadingProgress(); |
| 177 | 177 |
| 178 // Gets the current pipeline statistics. | 178 // Gets the current pipeline statistics. |
| 179 PipelineStatistics GetStatistics() const; | 179 PipelineStatistics GetStatistics() const; |
| 180 | 180 |
| 181 void set_underflow_disabled_for_testing(bool disabled) { | 181 void set_underflow_disabled_for_testing(bool disabled) { |
| 182 underflow_disabled_for_testing_ = disabled; | 182 underflow_disabled_for_testing_ = disabled; |
| 183 } | 183 } |
| 184 void SetTimeDeltaInterpolatorForTesting(TimeDeltaInterpolator* interpolator); | 184 void SetTimeDeltaInterpolatorForTesting(TimeDeltaInterpolator* interpolator); |
| 185 void SetErrorForTesting(PipelineStatus status); | 185 void SetErrorForTesting(PipelineStatus status); |
| 186 bool HasWeakPtrsForTesting() const; |
| 186 | 187 |
| 187 private: | 188 private: |
| 188 FRIEND_TEST_ALL_PREFIXES(PipelineTest, GetBufferedTimeRanges); | 189 FRIEND_TEST_ALL_PREFIXES(PipelineTest, GetBufferedTimeRanges); |
| 189 FRIEND_TEST_ALL_PREFIXES(PipelineTest, EndedCallback); | 190 FRIEND_TEST_ALL_PREFIXES(PipelineTest, EndedCallback); |
| 190 FRIEND_TEST_ALL_PREFIXES(PipelineTest, AudioStreamShorterThanVideo); | 191 FRIEND_TEST_ALL_PREFIXES(PipelineTest, AudioStreamShorterThanVideo); |
| 191 friend class MediaLog; | 192 friend class MediaLog; |
| 192 | 193 |
| 193 // Pipeline states, as described above. | 194 // Pipeline states, as described above. |
| 194 enum State { | 195 enum State { |
| 195 kCreated, | 196 kCreated, |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 | 430 |
| 430 // NOTE: Weak pointers must be invalidated before all other member variables. | 431 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 431 base::WeakPtrFactory<Pipeline> weak_factory_; | 432 base::WeakPtrFactory<Pipeline> weak_factory_; |
| 432 | 433 |
| 433 DISALLOW_COPY_AND_ASSIGN(Pipeline); | 434 DISALLOW_COPY_AND_ASSIGN(Pipeline); |
| 434 }; | 435 }; |
| 435 | 436 |
| 436 } // namespace media | 437 } // namespace media |
| 437 | 438 |
| 438 #endif // MEDIA_BASE_PIPELINE_H_ | 439 #endif // MEDIA_BASE_PIPELINE_H_ |
| OLD | NEW |