| 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 #include "media/formats/webm/webm_cluster_parser.h" | 5 #include "media/formats/webm/webm_cluster_parser.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 591 const scoped_refptr<MediaLog>& media_log) | 591 const scoped_refptr<MediaLog>& media_log) |
| 592 : track_num_(track_num), | 592 : track_num_(track_num), |
| 593 is_video_(is_video), | 593 is_video_(is_video), |
| 594 default_duration_(default_duration), | 594 default_duration_(default_duration), |
| 595 estimated_next_frame_duration_(kNoTimestamp()), | 595 estimated_next_frame_duration_(kNoTimestamp()), |
| 596 media_log_(media_log) { | 596 media_log_(media_log) { |
| 597 DCHECK(default_duration_ == kNoTimestamp() || | 597 DCHECK(default_duration_ == kNoTimestamp() || |
| 598 default_duration_ > base::TimeDelta()); | 598 default_duration_ > base::TimeDelta()); |
| 599 } | 599 } |
| 600 | 600 |
| 601 WebMClusterParser::Track::Track(const Track& other) = default; |
| 602 |
| 601 WebMClusterParser::Track::~Track() {} | 603 WebMClusterParser::Track::~Track() {} |
| 602 | 604 |
| 603 DecodeTimestamp WebMClusterParser::Track::GetReadyUpperBound() { | 605 DecodeTimestamp WebMClusterParser::Track::GetReadyUpperBound() { |
| 604 DCHECK(ready_buffers_.empty()); | 606 DCHECK(ready_buffers_.empty()); |
| 605 if (last_added_buffer_missing_duration_.get()) | 607 if (last_added_buffer_missing_duration_.get()) |
| 606 return last_added_buffer_missing_duration_->GetDecodeTimestamp(); | 608 return last_added_buffer_missing_duration_->GetDecodeTimestamp(); |
| 607 | 609 |
| 608 return DecodeTimestamp::FromPresentationTime(base::TimeDelta::Max()); | 610 return DecodeTimestamp::FromPresentationTime(base::TimeDelta::Max()); |
| 609 } | 611 } |
| 610 | 612 |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 875 WebMClusterParser::FindTextTrack(int track_num) { | 877 WebMClusterParser::FindTextTrack(int track_num) { |
| 876 const TextTrackMap::iterator it = text_track_map_.find(track_num); | 878 const TextTrackMap::iterator it = text_track_map_.find(track_num); |
| 877 | 879 |
| 878 if (it == text_track_map_.end()) | 880 if (it == text_track_map_.end()) |
| 879 return NULL; | 881 return NULL; |
| 880 | 882 |
| 881 return &it->second; | 883 return &it->second; |
| 882 } | 884 } |
| 883 | 885 |
| 884 } // namespace media | 886 } // namespace media |
| OLD | NEW |