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 // 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. Used in WebRTC local video capture pipeline, where | 7 // playback channels. Used in WebRTC local video capture pipeline, where |
8 // demuxing is not needed. | 8 // demuxing is not needed. |
9 | 9 |
10 #ifndef MEDIA_FILTERS_DUMMY_DEMUXER_H_ | 10 #ifndef MEDIA_FILTERS_DUMMY_DEMUXER_H_ |
(...skipping 11 matching lines...) Expand all Loading... |
22 public: | 22 public: |
23 explicit DummyDemuxerStream(Type type); | 23 explicit DummyDemuxerStream(Type type); |
24 | 24 |
25 // DemuxerStream implementation. | 25 // DemuxerStream implementation. |
26 virtual void Read(const ReadCB& read_cb) OVERRIDE; | 26 virtual void Read(const ReadCB& read_cb) OVERRIDE; |
27 virtual Type type() OVERRIDE; | 27 virtual Type type() OVERRIDE; |
28 virtual const AudioDecoderConfig& audio_decoder_config() OVERRIDE; | 28 virtual const AudioDecoderConfig& audio_decoder_config() OVERRIDE; |
29 virtual const VideoDecoderConfig& video_decoder_config() OVERRIDE; | 29 virtual const VideoDecoderConfig& video_decoder_config() OVERRIDE; |
30 virtual void EnableBitstreamConverter() OVERRIDE; | 30 virtual void EnableBitstreamConverter() OVERRIDE; |
31 | 31 |
32 private: | 32 protected: |
33 virtual ~DummyDemuxerStream(); | 33 virtual ~DummyDemuxerStream(); |
34 | 34 |
| 35 private: |
35 Type type_; | 36 Type type_; |
36 AudioDecoderConfig audio_config_; | 37 AudioDecoderConfig audio_config_; |
37 VideoDecoderConfig video_config_; | 38 VideoDecoderConfig video_config_; |
38 | 39 |
39 DISALLOW_COPY_AND_ASSIGN(DummyDemuxerStream); | 40 DISALLOW_COPY_AND_ASSIGN(DummyDemuxerStream); |
40 }; | 41 }; |
41 | 42 |
42 class MEDIA_EXPORT DummyDemuxer : public Demuxer { | 43 class MEDIA_EXPORT DummyDemuxer : public Demuxer { |
43 public: | 44 public: |
44 DummyDemuxer(bool has_video, bool has_audio); | 45 DummyDemuxer(bool has_video, bool has_audio); |
45 virtual ~DummyDemuxer(); | |
46 | 46 |
47 // Demuxer implementation. | 47 // Demuxer implementation. |
48 virtual void Initialize(DemuxerHost* host, | 48 virtual void Initialize(DemuxerHost* host, |
49 const PipelineStatusCB& status_cb) OVERRIDE; | 49 const PipelineStatusCB& status_cb) OVERRIDE; |
50 virtual scoped_refptr<DemuxerStream> GetStream( | 50 virtual scoped_refptr<DemuxerStream> GetStream( |
51 DemuxerStream::Type type) OVERRIDE; | 51 DemuxerStream::Type type) OVERRIDE; |
52 virtual base::TimeDelta GetStartTime() const OVERRIDE; | 52 virtual base::TimeDelta GetStartTime() const OVERRIDE; |
53 virtual int GetBitrate() OVERRIDE; | 53 virtual int GetBitrate() OVERRIDE; |
54 | 54 |
| 55 protected: |
| 56 virtual ~DummyDemuxer(); |
| 57 |
55 private: | 58 private: |
56 bool has_video_; | 59 bool has_video_; |
57 bool has_audio_; | 60 bool has_audio_; |
58 std::vector< scoped_refptr<DummyDemuxerStream> > streams_; | 61 std::vector< scoped_refptr<DummyDemuxerStream> > streams_; |
59 | 62 |
60 DISALLOW_COPY_AND_ASSIGN(DummyDemuxer); | 63 DISALLOW_COPY_AND_ASSIGN(DummyDemuxer); |
61 }; | 64 }; |
62 | 65 |
63 } // namespace media | 66 } // namespace media |
64 | 67 |
65 #endif // MEDIA_FILTERS_DUMMY_DEMUXER_H_ | 68 #endif // MEDIA_FILTERS_DUMMY_DEMUXER_H_ |
OLD | NEW |