| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef MEDIA_REMOTING_FAKE_REMOTING_DEMUXER_STREAM_PROVIDER_H_ | 5 #ifndef MEDIA_REMOTING_FAKE_REMOTING_MEDIA_RESOURCE_H_ |
| 6 #define MEDIA_REMOTING_FAKE_REMOTING_DEMUXER_STREAM_PROVIDER_H_ | 6 #define MEDIA_REMOTING_FAKE_REMOTING_MEDIA_RESOURCE_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 | 9 |
| 10 #include "media/base/audio_decoder_config.h" | 10 #include "media/base/audio_decoder_config.h" |
| 11 #include "media/base/demuxer_stream.h" | 11 #include "media/base/demuxer_stream.h" |
| 12 #include "media/base/demuxer_stream_provider.h" | 12 #include "media/base/media_resource.h" |
| 13 #include "media/base/video_decoder_config.h" | 13 #include "media/base/video_decoder_config.h" |
| 14 #include "testing/gmock/include/gmock/gmock.h" | 14 #include "testing/gmock/include/gmock/gmock.h" |
| 15 | 15 |
| 16 namespace media { | 16 namespace media { |
| 17 | 17 |
| 18 class DummyDemuxerStream : public DemuxerStream { | 18 class DummyDemuxerStream : public DemuxerStream { |
| 19 public: | 19 public: |
| 20 explicit DummyDemuxerStream(bool is_audio); | 20 explicit DummyDemuxerStream(bool is_audio); |
| 21 ~DummyDemuxerStream() override; | 21 ~DummyDemuxerStream() override; |
| 22 | 22 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 41 BufferQueue buffer_queue_; | 41 BufferQueue buffer_queue_; |
| 42 ReadCB pending_read_cb_; | 42 ReadCB pending_read_cb_; |
| 43 Type type_; | 43 Type type_; |
| 44 AudioDecoderConfig audio_config_; | 44 AudioDecoderConfig audio_config_; |
| 45 VideoDecoderConfig video_config_; | 45 VideoDecoderConfig video_config_; |
| 46 | 46 |
| 47 DISALLOW_COPY_AND_ASSIGN(DummyDemuxerStream); | 47 DISALLOW_COPY_AND_ASSIGN(DummyDemuxerStream); |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 // Audio only demuxer stream provider | 50 // Audio only demuxer stream provider |
| 51 class FakeRemotingDemuxerStreamProvider : public DemuxerStreamProvider { | 51 class FakeRemotingMediaResource : public MediaResource { |
| 52 public: | 52 public: |
| 53 FakeRemotingDemuxerStreamProvider(); | 53 FakeRemotingMediaResource(); |
| 54 ~FakeRemotingDemuxerStreamProvider() final; | 54 ~FakeRemotingMediaResource() final; |
| 55 | 55 |
| 56 // DemuxerStreamProvider implementation. | 56 // MediaResource implementation. |
| 57 DemuxerStream* GetStream(DemuxerStream::Type type) override; | 57 std::vector<DemuxerStream*> GetStreams() override; |
| 58 | 58 |
| 59 private: | 59 private: |
| 60 std::unique_ptr<DummyDemuxerStream> demuxer_stream_; | 60 std::unique_ptr<DummyDemuxerStream> demuxer_stream_; |
| 61 | 61 |
| 62 DISALLOW_COPY_AND_ASSIGN(FakeRemotingDemuxerStreamProvider); | 62 DISALLOW_COPY_AND_ASSIGN(FakeRemotingMediaResource); |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 } // namespace media | 65 } // namespace media |
| 66 | 66 |
| 67 #endif // MEDIA_REMOTING_FAKE_REMOTING_DEMUXER_STREAM_PROVIDER_H_ | 67 #endif // MEDIA_REMOTING_FAKE_REMOTING_MEDIA_RESOURCE_H_ |
| OLD | NEW |