| 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/dummy_demuxer.h" | 5 #include "media/filters/dummy_demuxer.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 | 8 |
| 9 namespace media { | 9 namespace media { |
| 10 | 10 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 has_audio_(has_audio) { | 37 has_audio_(has_audio) { |
| 38 streams_.resize(DemuxerStream::NUM_TYPES); | 38 streams_.resize(DemuxerStream::NUM_TYPES); |
| 39 if (has_audio) | 39 if (has_audio) |
| 40 streams_[DemuxerStream::AUDIO] = | 40 streams_[DemuxerStream::AUDIO] = |
| 41 new DummyDemuxerStream(DemuxerStream::AUDIO); | 41 new DummyDemuxerStream(DemuxerStream::AUDIO); |
| 42 if (has_video) | 42 if (has_video) |
| 43 streams_[DemuxerStream::VIDEO] = | 43 streams_[DemuxerStream::VIDEO] = |
| 44 new DummyDemuxerStream(DemuxerStream::VIDEO); | 44 new DummyDemuxerStream(DemuxerStream::VIDEO); |
| 45 } | 45 } |
| 46 | 46 |
| 47 DummyDemuxer::~DummyDemuxer() {} | |
| 48 | |
| 49 void DummyDemuxer::Initialize(DemuxerHost* host, | 47 void DummyDemuxer::Initialize(DemuxerHost* host, |
| 50 const PipelineStatusCB& status_cb) { | 48 const PipelineStatusCB& status_cb) { |
| 51 host->SetDuration(media::kInfiniteDuration()); | 49 host->SetDuration(media::kInfiniteDuration()); |
| 52 status_cb.Run(PIPELINE_OK); | 50 status_cb.Run(PIPELINE_OK); |
| 53 } | 51 } |
| 54 | 52 |
| 55 scoped_refptr<DemuxerStream> DummyDemuxer::GetStream(DemuxerStream::Type type) { | 53 scoped_refptr<DemuxerStream> DummyDemuxer::GetStream(DemuxerStream::Type type) { |
| 56 return streams_[type]; | 54 return streams_[type]; |
| 57 } | 55 } |
| 58 | 56 |
| 59 base::TimeDelta DummyDemuxer::GetStartTime() const { | 57 base::TimeDelta DummyDemuxer::GetStartTime() const { |
| 60 return base::TimeDelta(); | 58 return base::TimeDelta(); |
| 61 } | 59 } |
| 62 | 60 |
| 63 int DummyDemuxer::GetBitrate() { | 61 int DummyDemuxer::GetBitrate() { |
| 64 return 0; | 62 return 0; |
| 65 } | 63 } |
| 66 | 64 |
| 65 DummyDemuxer::~DummyDemuxer() {} |
| 66 |
| 67 } // namespace media | 67 } // namespace media |
| OLD | NEW |