| 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 #include <utility> | 10 #include <utility> |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 base::AutoLock auto_lock(lock_); | 452 base::AutoLock auto_lock(lock_); |
| 453 if (type == DemuxerStream::VIDEO) | 453 if (type == DemuxerStream::VIDEO) |
| 454 return video_.get(); | 454 return video_.get(); |
| 455 | 455 |
| 456 if (type == DemuxerStream::AUDIO) | 456 if (type == DemuxerStream::AUDIO) |
| 457 return audio_.get(); | 457 return audio_.get(); |
| 458 | 458 |
| 459 return NULL; | 459 return NULL; |
| 460 } | 460 } |
| 461 | 461 |
| 462 GURL* ChunkDemuxer::GetUrl() { |
| 463 // Should never return anything else than nullptr (see DemuxerStreamProvider). |
| 464 return nullptr; |
| 465 } |
| 466 |
| 462 TimeDelta ChunkDemuxer::GetStartTime() const { | 467 TimeDelta ChunkDemuxer::GetStartTime() const { |
| 463 return TimeDelta(); | 468 return TimeDelta(); |
| 464 } | 469 } |
| 465 | 470 |
| 466 int64_t ChunkDemuxer::GetMemoryUsage() const { | 471 int64_t ChunkDemuxer::GetMemoryUsage() const { |
| 467 base::AutoLock auto_lock(lock_); | 472 base::AutoLock auto_lock(lock_); |
| 468 return (audio_ ? audio_->GetBufferedSize() : 0) + | 473 return (audio_ ? audio_->GetBufferedSize() : 0) + |
| 469 (video_ ? video_->GetBufferedSize() : 0); | 474 (video_ ? video_->GetBufferedSize() : 0); |
| 470 } | 475 } |
| 471 | 476 |
| (...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1156 } | 1161 } |
| 1157 | 1162 |
| 1158 void ChunkDemuxer::ShutdownAllStreams() { | 1163 void ChunkDemuxer::ShutdownAllStreams() { |
| 1159 for (MediaSourceStateMap::iterator itr = source_state_map_.begin(); | 1164 for (MediaSourceStateMap::iterator itr = source_state_map_.begin(); |
| 1160 itr != source_state_map_.end(); ++itr) { | 1165 itr != source_state_map_.end(); ++itr) { |
| 1161 itr->second->Shutdown(); | 1166 itr->second->Shutdown(); |
| 1162 } | 1167 } |
| 1163 } | 1168 } |
| 1164 | 1169 |
| 1165 } // namespace media | 1170 } // namespace media |
| OLD | NEW |