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 #include "media/filters/source_buffer_stream.h" | 5 #include "media/filters/source_buffer_stream.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 #include <sstream> | 9 #include <sstream> |
10 | 10 |
(...skipping 1081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1092 | 1092 |
1093 // If the track buffer becomes empty, then try to set the selected range | 1093 // If the track buffer becomes empty, then try to set the selected range |
1094 // based on the timestamp of this buffer being returned. | 1094 // based on the timestamp of this buffer being returned. |
1095 if (track_buffer_.empty()) | 1095 if (track_buffer_.empty()) |
1096 SetSelectedRangeIfNeeded(last_output_buffer_timestamp_); | 1096 SetSelectedRangeIfNeeded(last_output_buffer_timestamp_); |
1097 | 1097 |
1098 return kSuccess; | 1098 return kSuccess; |
1099 } | 1099 } |
1100 | 1100 |
1101 if (!selected_range_ || !selected_range_->HasNextBuffer()) { | 1101 if (!selected_range_ || !selected_range_->HasNextBuffer()) { |
1102 if (end_of_stream_ && IsEndSelected()) | 1102 if (end_of_stream_ && (!selected_range_ || IsEndSelected())) |
wolenetz
2015/05/05 20:51:35
Interesting. Since IsEndSelected() is only used in
landell
2015/05/06 08:59:53
I agree. That is how I wanted to do it but I went
landell
2015/05/06 10:46:53
Done.
| |
1103 return kEndOfStream; | 1103 return kEndOfStream; |
1104 DVLOG(3) << __FUNCTION__ << " " << GetStreamTypeName() | 1104 DVLOG(3) << __FUNCTION__ << " " << GetStreamTypeName() |
1105 << ": returning kNeedBuffer " | 1105 << ": returning kNeedBuffer " |
1106 << (selected_range_ ? "(selected range has no next buffer)" | 1106 << (selected_range_ ? "(selected range has no next buffer)" |
1107 : "(no selected range)"); | 1107 : "(no selected range)"); |
1108 return kNeedBuffer; | 1108 return kNeedBuffer; |
1109 } | 1109 } |
1110 | 1110 |
1111 if (selected_range_->GetNextConfigId() != current_config_index_) { | 1111 if (selected_range_->GetNextConfigId() != current_config_index_) { |
1112 config_change_pending_ = true; | 1112 config_change_pending_ = true; |
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1575 return false; | 1575 return false; |
1576 | 1576 |
1577 DCHECK_NE(have_splice_buffers, have_preroll_buffer); | 1577 DCHECK_NE(have_splice_buffers, have_preroll_buffer); |
1578 splice_buffers_index_ = 0; | 1578 splice_buffers_index_ = 0; |
1579 pending_buffer_.swap(*out_buffer); | 1579 pending_buffer_.swap(*out_buffer); |
1580 pending_buffers_complete_ = false; | 1580 pending_buffers_complete_ = false; |
1581 return true; | 1581 return true; |
1582 } | 1582 } |
1583 | 1583 |
1584 } // namespace media | 1584 } // namespace media |
OLD | NEW |