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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 // Returns true if the given state is one that transitions to a new state | 281 // Returns true if the given state is one that transitions to a new state |
282 // after iterating through each filter. | 282 // after iterating through each filter. |
283 static bool TransientState(State state); | 283 static bool TransientState(State state); |
284 | 284 |
285 // Given the current state, returns the next state. | 285 // Given the current state, returns the next state. |
286 State FindNextState(State current); | 286 State FindNextState(State current); |
287 | 287 |
288 // DataSourceHost (by way of DemuxerHost) implementation. | 288 // DataSourceHost (by way of DemuxerHost) implementation. |
289 virtual void SetTotalBytes(int64 total_bytes) OVERRIDE; | 289 virtual void SetTotalBytes(int64 total_bytes) OVERRIDE; |
290 virtual void AddBufferedByteRange(int64 start, int64 end) OVERRIDE; | 290 virtual void AddBufferedByteRange(int64 start, int64 end) OVERRIDE; |
291 virtual void AddBufferedTimeRange(base::TimeDelta start, | |
292 base::TimeDelta end) OVERRIDE; | |
293 | 291 |
294 // DemuxerHost implementaion. | 292 // DemuxerHost implementaion. |
295 virtual void SetDuration(base::TimeDelta duration) OVERRIDE; | 293 virtual void SetDuration(base::TimeDelta duration) OVERRIDE; |
296 virtual void OnDemuxerError(PipelineStatus error) OVERRIDE; | 294 virtual void OnDemuxerError(PipelineStatus error) OVERRIDE; |
297 | 295 |
298 // FilterHost implementation. | 296 // FilterHost implementation. |
299 virtual void SetError(PipelineStatus error) OVERRIDE; | 297 virtual void SetError(PipelineStatus error) OVERRIDE; |
300 virtual base::TimeDelta GetTime() const OVERRIDE; | 298 virtual base::TimeDelta GetTime() const OVERRIDE; |
301 virtual base::TimeDelta GetDuration() const OVERRIDE; | 299 virtual base::TimeDelta GetDuration() const OVERRIDE; |
302 virtual void SetNaturalVideoSize(const gfx::Size& size) OVERRIDE; | 300 virtual void SetNaturalVideoSize(const gfx::Size& size) OVERRIDE; |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 bool tearing_down_; | 453 bool tearing_down_; |
456 | 454 |
457 // Whether or not an error triggered the teardown. | 455 // Whether or not an error triggered the teardown. |
458 bool error_caused_teardown_; | 456 bool error_caused_teardown_; |
459 | 457 |
460 // Whether or not a playback rate change should be done once seeking is done. | 458 // Whether or not a playback rate change should be done once seeking is done. |
461 bool playback_rate_change_pending_; | 459 bool playback_rate_change_pending_; |
462 | 460 |
463 // Amount of available buffered data. Set by filters. | 461 // Amount of available buffered data. Set by filters. |
464 Ranges<int64> buffered_byte_ranges_; | 462 Ranges<int64> buffered_byte_ranges_; |
465 Ranges<base::TimeDelta> buffered_time_ranges_; | |
466 | 463 |
467 // True when AddBufferedByteRange() has been called more recently than | 464 // True when AddBufferedByteRange() has been called more recently than |
468 // DidLoadingProgress(). | 465 // DidLoadingProgress(). |
469 mutable bool did_loading_progress_; | 466 mutable bool did_loading_progress_; |
470 | 467 |
471 // Total size of the media. Set by filters. | 468 // Total size of the media. Set by filters. |
472 int64 total_bytes_; | 469 int64 total_bytes_; |
473 | 470 |
474 // Video's natural width and height. Set by filters. | 471 // Video's natural width and height. Set by filters. |
475 gfx::Size natural_size_; | 472 gfx::Size natural_size_; |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
561 // Time of pipeline creation; is non-zero only until the pipeline first | 558 // Time of pipeline creation; is non-zero only until the pipeline first |
562 // reaches "kStarted", at which point it is used & zeroed out. | 559 // reaches "kStarted", at which point it is used & zeroed out. |
563 base::Time creation_time_; | 560 base::Time creation_time_; |
564 | 561 |
565 DISALLOW_COPY_AND_ASSIGN(Pipeline); | 562 DISALLOW_COPY_AND_ASSIGN(Pipeline); |
566 }; | 563 }; |
567 | 564 |
568 } // namespace media | 565 } // namespace media |
569 | 566 |
570 #endif // MEDIA_BASE_PIPELINE_H_ | 567 #endif // MEDIA_BASE_PIPELINE_H_ |
OLD | NEW |