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 12 matching lines...) Expand all Loading... |
23 return audio_config_; | 23 return audio_config_; |
24 } | 24 } |
25 | 25 |
26 const VideoDecoderConfig& DummyDemuxerStream::video_decoder_config() { | 26 const VideoDecoderConfig& DummyDemuxerStream::video_decoder_config() { |
27 CHECK_EQ(type_, VIDEO); | 27 CHECK_EQ(type_, VIDEO); |
28 return video_config_; | 28 return video_config_; |
29 } | 29 } |
30 | 30 |
31 void DummyDemuxerStream::Read(const ReadCB& read_cb) {} | 31 void DummyDemuxerStream::Read(const ReadCB& read_cb) {} |
32 | 32 |
| 33 bool DummyDemuxerStream::is_encrypted() { |
| 34 return false; |
| 35 } |
| 36 |
33 void DummyDemuxerStream::EnableBitstreamConverter() {} | 37 void DummyDemuxerStream::EnableBitstreamConverter() {} |
34 | 38 |
35 DummyDemuxer::DummyDemuxer(bool has_video, bool has_audio) { | 39 DummyDemuxer::DummyDemuxer(bool has_video, bool has_audio) { |
36 streams_.resize(DemuxerStream::NUM_TYPES); | 40 streams_.resize(DemuxerStream::NUM_TYPES); |
37 if (has_audio) | 41 if (has_audio) |
38 streams_[DemuxerStream::AUDIO] = | 42 streams_[DemuxerStream::AUDIO] = |
39 new DummyDemuxerStream(DemuxerStream::AUDIO); | 43 new DummyDemuxerStream(DemuxerStream::AUDIO); |
40 if (has_video) | 44 if (has_video) |
41 streams_[DemuxerStream::VIDEO] = | 45 streams_[DemuxerStream::VIDEO] = |
42 new DummyDemuxerStream(DemuxerStream::VIDEO); | 46 new DummyDemuxerStream(DemuxerStream::VIDEO); |
43 } | 47 } |
44 | 48 |
45 void DummyDemuxer::Initialize(DemuxerHost* host, | 49 void DummyDemuxer::Initialize(DemuxerHost* host, |
46 const PipelineStatusCB& status_cb) { | 50 const PipelineStatusCB& status_cb) { |
47 host->SetDuration(media::kInfiniteDuration()); | 51 host->SetDuration(media::kInfiniteDuration()); |
48 status_cb.Run(PIPELINE_OK); | 52 status_cb.Run(PIPELINE_OK); |
49 } | 53 } |
50 | 54 |
51 scoped_refptr<DemuxerStream> DummyDemuxer::GetStream(DemuxerStream::Type type) { | 55 scoped_refptr<DemuxerStream> DummyDemuxer::GetStream(DemuxerStream::Type type) { |
52 return streams_[type]; | 56 return streams_[type]; |
53 } | 57 } |
54 | 58 |
55 base::TimeDelta DummyDemuxer::GetStartTime() const { | 59 base::TimeDelta DummyDemuxer::GetStartTime() const { |
56 return base::TimeDelta(); | 60 return base::TimeDelta(); |
57 } | 61 } |
58 | 62 |
59 DummyDemuxer::~DummyDemuxer() {} | 63 DummyDemuxer::~DummyDemuxer() {} |
60 | 64 |
61 } // namespace media | 65 } // namespace media |
OLD | NEW |