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

Side by Side Diff: media/base/pipeline.h

Issue 10698134: Merge 143765 - Ensure media's buffered ranges always have a range that includes currentTime. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1180/src/
Patch Set: Created 8 years, 5 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
« no previous file with comments | « media/base/mock_filters.h ('k') | media/base/pipeline.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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;
291 293
292 // DemuxerHost implementaion. 294 // DemuxerHost implementaion.
293 virtual void SetDuration(base::TimeDelta duration) OVERRIDE; 295 virtual void SetDuration(base::TimeDelta duration) OVERRIDE;
294 virtual void OnDemuxerError(PipelineStatus error) OVERRIDE; 296 virtual void OnDemuxerError(PipelineStatus error) OVERRIDE;
295 297
296 // FilterHost implementation. 298 // FilterHost implementation.
297 virtual void SetError(PipelineStatus error) OVERRIDE; 299 virtual void SetError(PipelineStatus error) OVERRIDE;
298 virtual base::TimeDelta GetTime() const OVERRIDE; 300 virtual base::TimeDelta GetTime() const OVERRIDE;
299 virtual base::TimeDelta GetDuration() const OVERRIDE; 301 virtual base::TimeDelta GetDuration() const OVERRIDE;
300 virtual void SetNaturalVideoSize(const gfx::Size& size) OVERRIDE; 302 virtual void SetNaturalVideoSize(const gfx::Size& size) OVERRIDE;
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 bool tearing_down_; 455 bool tearing_down_;
454 456
455 // Whether or not an error triggered the teardown. 457 // Whether or not an error triggered the teardown.
456 bool error_caused_teardown_; 458 bool error_caused_teardown_;
457 459
458 // Whether or not a playback rate change should be done once seeking is done. 460 // Whether or not a playback rate change should be done once seeking is done.
459 bool playback_rate_change_pending_; 461 bool playback_rate_change_pending_;
460 462
461 // Amount of available buffered data. Set by filters. 463 // Amount of available buffered data. Set by filters.
462 Ranges<int64> buffered_byte_ranges_; 464 Ranges<int64> buffered_byte_ranges_;
465 Ranges<base::TimeDelta> buffered_time_ranges_;
463 466
464 // True when AddBufferedByteRange() has been called more recently than 467 // True when AddBufferedByteRange() has been called more recently than
465 // DidLoadingProgress(). 468 // DidLoadingProgress().
466 mutable bool did_loading_progress_; 469 mutable bool did_loading_progress_;
467 470
468 // Total size of the media. Set by filters. 471 // Total size of the media. Set by filters.
469 int64 total_bytes_; 472 int64 total_bytes_;
470 473
471 // Video's natural width and height. Set by filters. 474 // Video's natural width and height. Set by filters.
472 gfx::Size natural_size_; 475 gfx::Size natural_size_;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 // Time of pipeline creation; is non-zero only until the pipeline first 561 // Time of pipeline creation; is non-zero only until the pipeline first
559 // reaches "kStarted", at which point it is used & zeroed out. 562 // reaches "kStarted", at which point it is used & zeroed out.
560 base::Time creation_time_; 563 base::Time creation_time_;
561 564
562 DISALLOW_COPY_AND_ASSIGN(Pipeline); 565 DISALLOW_COPY_AND_ASSIGN(Pipeline);
563 }; 566 };
564 567
565 } // namespace media 568 } // namespace media
566 569
567 #endif // MEDIA_BASE_PIPELINE_H_ 570 #endif // MEDIA_BASE_PIPELINE_H_
OLDNEW
« no previous file with comments | « media/base/mock_filters.h ('k') | media/base/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698