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_MEDIA_RESOURCE_H_ | 5 #ifndef MEDIA_REMOTING_FAKE_MEDIA_RESOURCE_H_ |
6 #define MEDIA_REMOTING_FAKE_MEDIA_RESOURCE_H_ | 6 #define MEDIA_REMOTING_FAKE_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" |
(...skipping 13 matching lines...) Expand all Loading... |
24 // DemuxerStream implementation. | 24 // DemuxerStream implementation. |
25 MOCK_METHOD1(Read, void(const ReadCB& read_cb)); | 25 MOCK_METHOD1(Read, void(const ReadCB& read_cb)); |
26 void FakeRead(const ReadCB& read_cb); | 26 void FakeRead(const ReadCB& read_cb); |
27 AudioDecoderConfig audio_decoder_config() override; | 27 AudioDecoderConfig audio_decoder_config() override; |
28 VideoDecoderConfig video_decoder_config() override; | 28 VideoDecoderConfig video_decoder_config() override; |
29 Type type() const override; | 29 Type type() const override; |
30 Liveness liveness() const override; | 30 Liveness liveness() const override; |
31 void EnableBitstreamConverter() override {} | 31 void EnableBitstreamConverter() override {} |
32 bool SupportsConfigChanges() override; | 32 bool SupportsConfigChanges() override; |
33 VideoRotation video_rotation() override; | 33 VideoRotation video_rotation() override; |
34 bool enabled() const override; | |
35 void set_enabled(bool enabled, base::TimeDelta timestamp) override {} | |
36 | 34 |
37 void CreateFakeFrame(size_t size, bool key_frame, int pts_ms); | 35 void CreateFakeFrame(size_t size, bool key_frame, int pts_ms); |
38 | 36 |
39 private: | 37 private: |
40 using BufferQueue = std::deque<scoped_refptr<DecoderBuffer>>; | 38 using BufferQueue = std::deque<scoped_refptr<DecoderBuffer>>; |
41 BufferQueue buffer_queue_; | 39 BufferQueue buffer_queue_; |
42 ReadCB pending_read_cb_; | 40 ReadCB pending_read_cb_; |
43 Type type_; | 41 Type type_; |
44 AudioDecoderConfig audio_config_; | 42 AudioDecoderConfig audio_config_; |
45 VideoDecoderConfig video_config_; | 43 VideoDecoderConfig video_config_; |
(...skipping 14 matching lines...) Expand all Loading... |
60 private: | 58 private: |
61 std::unique_ptr<FakeDemuxerStream> demuxer_stream_; | 59 std::unique_ptr<FakeDemuxerStream> demuxer_stream_; |
62 | 60 |
63 DISALLOW_COPY_AND_ASSIGN(FakeMediaResource); | 61 DISALLOW_COPY_AND_ASSIGN(FakeMediaResource); |
64 }; | 62 }; |
65 | 63 |
66 } // namespace remoting | 64 } // namespace remoting |
67 } // namespace media | 65 } // namespace media |
68 | 66 |
69 #endif // MEDIA_REMOTING_FAKE_MEDIA_RESOURCE_H_ | 67 #endif // MEDIA_REMOTING_FAKE_MEDIA_RESOURCE_H_ |
OLD | NEW |