| 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. Used in WebRTC local video capture pipeline, where |
| 8 // demuxing is not needed. |
| 8 | 9 |
| 9 #ifndef MEDIA_FILTERS_DUMMY_DEMUXER_H_ | 10 #ifndef MEDIA_FILTERS_DUMMY_DEMUXER_H_ |
| 10 #define MEDIA_FILTERS_DUMMY_DEMUXER_H_ | 11 #define MEDIA_FILTERS_DUMMY_DEMUXER_H_ |
| 11 | 12 |
| 12 #include <vector> | 13 #include <vector> |
| 13 | 14 |
| 14 #include "media/base/audio_decoder_config.h" | 15 #include "media/base/audio_decoder_config.h" |
| 15 #include "media/base/demuxer.h" | 16 #include "media/base/demuxer.h" |
| 16 #include "media/base/video_decoder_config.h" | 17 #include "media/base/video_decoder_config.h" |
| 17 | 18 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 33 | 34 |
| 34 Type type_; | 35 Type type_; |
| 35 AudioDecoderConfig audio_config_; | 36 AudioDecoderConfig audio_config_; |
| 36 VideoDecoderConfig video_config_; | 37 VideoDecoderConfig video_config_; |
| 37 | 38 |
| 38 DISALLOW_COPY_AND_ASSIGN(DummyDemuxerStream); | 39 DISALLOW_COPY_AND_ASSIGN(DummyDemuxerStream); |
| 39 }; | 40 }; |
| 40 | 41 |
| 41 class DummyDemuxer : public Demuxer { | 42 class DummyDemuxer : public Demuxer { |
| 42 public: | 43 public: |
| 43 DummyDemuxer(bool has_video, bool has_audio); | 44 DummyDemuxer(bool has_video, bool has_audio, bool local_source); |
| 44 virtual ~DummyDemuxer(); | 45 virtual ~DummyDemuxer(); |
| 45 | 46 |
| 46 // Demuxer implementation. | 47 // Demuxer implementation. |
| 47 virtual scoped_refptr<DemuxerStream> GetStream( | 48 virtual scoped_refptr<DemuxerStream> GetStream( |
| 48 DemuxerStream::Type type) OVERRIDE; | 49 DemuxerStream::Type type) OVERRIDE; |
| 49 virtual void SetPreload(Preload preload) OVERRIDE; | 50 virtual void SetPreload(Preload preload) OVERRIDE; |
| 50 virtual base::TimeDelta GetStartTime() const OVERRIDE; | 51 virtual base::TimeDelta GetStartTime() const OVERRIDE; |
| 51 virtual int GetBitrate() OVERRIDE; | 52 virtual int GetBitrate() OVERRIDE; |
| 53 virtual bool IsLocalSource() OVERRIDE; |
| 52 | 54 |
| 53 private: | 55 private: |
| 54 bool has_video_; | 56 bool has_video_; |
| 55 bool has_audio_; | 57 bool has_audio_; |
| 58 bool local_source_; |
| 56 std::vector< scoped_refptr<DummyDemuxerStream> > streams_; | 59 std::vector< scoped_refptr<DummyDemuxerStream> > streams_; |
| 57 | 60 |
| 58 DISALLOW_COPY_AND_ASSIGN(DummyDemuxer); | 61 DISALLOW_COPY_AND_ASSIGN(DummyDemuxer); |
| 59 }; | 62 }; |
| 60 | 63 |
| 61 } // namespace media | 64 } // namespace media |
| 62 | 65 |
| 63 #endif // MEDIA_FILTERS_DUMMY_DEMUXER_H_ | 66 #endif // MEDIA_FILTERS_DUMMY_DEMUXER_H_ |
| OLD | NEW |