OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // Implements the Demuxer interface. DummyDemuxer returns corresponding | 5 // Implements the Demuxer interface. DummyDemuxer returns corresponding |
6 // DummyDemuxerStream as signal for media pipeline to construct correct | 6 // DummyDemuxerStream as signal for media pipeline to construct correct |
7 // playback channels. | 7 // playback channels. |
8 | 8 |
9 #ifndef MEDIA_FILTERS_DUMMY_DEMUXER_H_ | 9 #ifndef MEDIA_FILTERS_DUMMY_DEMUXER_H_ |
10 #define MEDIA_FILTERS_DUMMY_DEMUXER_H_ | 10 #define MEDIA_FILTERS_DUMMY_DEMUXER_H_ |
11 | 11 |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
| 14 #include "media/base/audio_decoder_config.h" |
14 #include "media/base/demuxer.h" | 15 #include "media/base/demuxer.h" |
15 | 16 |
16 namespace media { | 17 namespace media { |
17 | 18 |
18 class DummyDemuxerStream : public DemuxerStream { | 19 class DummyDemuxerStream : public DemuxerStream { |
19 public: | 20 public: |
20 explicit DummyDemuxerStream(Type type); | 21 explicit DummyDemuxerStream(Type type); |
21 | 22 |
22 // DemuxerStream implementation. | 23 // DemuxerStream implementation. |
23 virtual void Read(const ReadCallback& read_callback) OVERRIDE; | 24 virtual void Read(const ReadCallback& read_callback) OVERRIDE; |
24 virtual Type type() OVERRIDE; | 25 virtual Type type() OVERRIDE; |
| 26 virtual const AudioDecoderConfig& audio_decoder_config() OVERRIDE; |
25 virtual void EnableBitstreamConverter() OVERRIDE; | 27 virtual void EnableBitstreamConverter() OVERRIDE; |
26 | 28 |
27 private: | 29 private: |
28 virtual ~DummyDemuxerStream(); | 30 virtual ~DummyDemuxerStream(); |
29 | 31 |
30 Type type_; | 32 Type type_; |
| 33 AudioDecoderConfig audio_config_; |
31 | 34 |
32 DISALLOW_COPY_AND_ASSIGN(DummyDemuxerStream); | 35 DISALLOW_COPY_AND_ASSIGN(DummyDemuxerStream); |
33 }; | 36 }; |
34 | 37 |
35 class DummyDemuxer : public Demuxer { | 38 class DummyDemuxer : public Demuxer { |
36 public: | 39 public: |
37 DummyDemuxer(bool has_video, bool has_audio); | 40 DummyDemuxer(bool has_video, bool has_audio); |
38 virtual ~DummyDemuxer(); | 41 virtual ~DummyDemuxer(); |
39 | 42 |
40 // Demuxer implementation. | 43 // Demuxer implementation. |
41 virtual scoped_refptr<DemuxerStream> GetStream( | 44 virtual scoped_refptr<DemuxerStream> GetStream( |
42 DemuxerStream::Type type) OVERRIDE; | 45 DemuxerStream::Type type) OVERRIDE; |
43 virtual void SetPreload(Preload preload) OVERRIDE; | 46 virtual void SetPreload(Preload preload) OVERRIDE; |
44 virtual base::TimeDelta GetStartTime() const OVERRIDE; | 47 virtual base::TimeDelta GetStartTime() const OVERRIDE; |
45 | 48 |
46 private: | 49 private: |
47 bool has_video_; | 50 bool has_video_; |
48 bool has_audio_; | 51 bool has_audio_; |
49 std::vector< scoped_refptr<DummyDemuxerStream> > streams_; | 52 std::vector< scoped_refptr<DummyDemuxerStream> > streams_; |
50 | 53 |
51 DISALLOW_COPY_AND_ASSIGN(DummyDemuxer); | 54 DISALLOW_COPY_AND_ASSIGN(DummyDemuxer); |
52 }; | 55 }; |
53 | 56 |
54 } // namespace media | 57 } // namespace media |
55 | 58 |
56 #endif // MEDIA_FILTERS_DUMMY_DEMUXER_H_ | 59 #endif // MEDIA_FILTERS_DUMMY_DEMUXER_H_ |
OLD | NEW |