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/chunk_demuxer.h" | 5 #include "media/filters/chunk_demuxer.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <list> | 9 #include <list> |
10 | 10 |
(...skipping 1497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1508 // Check to see if data was appended at the pending seek point. This | 1508 // Check to see if data was appended at the pending seek point. This |
1509 // indicates we have parsed enough data to complete the seek. | 1509 // indicates we have parsed enough data to complete the seek. |
1510 if (old_waiting_for_data && !IsSeekWaitingForData_Locked() && | 1510 if (old_waiting_for_data && !IsSeekWaitingForData_Locked() && |
1511 !seek_cb_.is_null()) { | 1511 !seek_cb_.is_null()) { |
1512 base::ResetAndReturn(&seek_cb_).Run(PIPELINE_OK); | 1512 base::ResetAndReturn(&seek_cb_).Run(PIPELINE_OK); |
1513 } | 1513 } |
1514 | 1514 |
1515 ranges = GetBufferedRanges_Locked(); | 1515 ranges = GetBufferedRanges_Locked(); |
1516 } | 1516 } |
1517 | 1517 |
1518 for (size_t i = 0; i < ranges.size(); ++i) | 1518 host_->OnBufferedTimeRangesChanged(ranges); |
1519 host_->AddBufferedTimeRange(ranges.start(i), ranges.end(i)); | |
1520 } | 1519 } |
1521 | 1520 |
1522 void ChunkDemuxer::ResetParserState(const std::string& id, | 1521 void ChunkDemuxer::ResetParserState(const std::string& id, |
1523 TimeDelta append_window_start, | 1522 TimeDelta append_window_start, |
1524 TimeDelta append_window_end, | 1523 TimeDelta append_window_end, |
1525 TimeDelta* timestamp_offset) { | 1524 TimeDelta* timestamp_offset) { |
1526 DVLOG(1) << "ResetParserState(" << id << ")"; | 1525 DVLOG(1) << "ResetParserState(" << id << ")"; |
1527 base::AutoLock auto_lock(lock_); | 1526 base::AutoLock auto_lock(lock_); |
1528 DCHECK(!id.empty()); | 1527 DCHECK(!id.empty()); |
1529 CHECK(IsValidId(id)); | 1528 CHECK(IsValidId(id)); |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1965 } | 1964 } |
1966 | 1965 |
1967 void ChunkDemuxer::ShutdownAllStreams() { | 1966 void ChunkDemuxer::ShutdownAllStreams() { |
1968 for (SourceStateMap::iterator itr = source_state_map_.begin(); | 1967 for (SourceStateMap::iterator itr = source_state_map_.begin(); |
1969 itr != source_state_map_.end(); ++itr) { | 1968 itr != source_state_map_.end(); ++itr) { |
1970 itr->second->Shutdown(); | 1969 itr->second->Shutdown(); |
1971 } | 1970 } |
1972 } | 1971 } |
1973 | 1972 |
1974 } // namespace media | 1973 } // namespace media |
OLD | NEW |