OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 CHROMECAST_MEDIA_CMA_BASE_DEMUXER_STREAM_FOR_TEST_H_ | 5 #ifndef CHROMECAST_MEDIA_CMA_BASE_DEMUXER_STREAM_FOR_TEST_H_ |
6 #define CHROMECAST_MEDIA_CMA_BASE_DEMUXER_STREAM_FOR_TEST_H_ | 6 #define CHROMECAST_MEDIA_CMA_BASE_DEMUXER_STREAM_FOR_TEST_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 const std::list<int>& config_idx); | 40 const std::list<int>& config_idx); |
41 ~DemuxerStreamForTest() override; | 41 ~DemuxerStreamForTest() override; |
42 | 42 |
43 // ::media::DemuxerStream implementation. | 43 // ::media::DemuxerStream implementation. |
44 void Read(const ReadCB& read_cb) override; | 44 void Read(const ReadCB& read_cb) override; |
45 ::media::AudioDecoderConfig audio_decoder_config() override; | 45 ::media::AudioDecoderConfig audio_decoder_config() override; |
46 ::media::VideoDecoderConfig video_decoder_config() override; | 46 ::media::VideoDecoderConfig video_decoder_config() override; |
47 Type type() const override; | 47 Type type() const override; |
48 bool SupportsConfigChanges() override; | 48 bool SupportsConfigChanges() override; |
49 ::media::VideoRotation video_rotation() override; | 49 ::media::VideoRotation video_rotation() override; |
| 50 bool enabled() const override; |
| 51 void set_enabled(bool enabled, base::TimeDelta time) override; |
50 | 52 |
51 bool has_pending_read() const { return has_pending_read_; } | 53 bool has_pending_read() const { return has_pending_read_; } |
52 | 54 |
53 // Frame duration | 55 // Frame duration |
54 static const int kDemuxerStreamForTestFrameDuration = 40; | 56 static const int kDemuxerStreamForTestFrameDuration = 40; |
55 | 57 |
56 private: | 58 private: |
57 void DoRead(const ReadCB& read_cb); | 59 void DoRead(const ReadCB& read_cb); |
58 | 60 |
59 // Demuxer configuration. | 61 // Demuxer configuration. |
60 int total_frame_count_; | 62 int total_frame_count_; |
61 const int cycle_count_; | 63 const int cycle_count_; |
62 const int delayed_frame_count_; | 64 const int delayed_frame_count_; |
63 std::list<int> config_idx_; | 65 std::list<int> config_idx_; |
64 | 66 |
65 // Number of frames sent so far. | 67 // Number of frames sent so far. |
66 int frame_count_; | 68 int frame_count_; |
67 | 69 |
68 bool has_pending_read_; | 70 bool has_pending_read_; |
69 | 71 |
70 DISALLOW_COPY_AND_ASSIGN(DemuxerStreamForTest); | 72 DISALLOW_COPY_AND_ASSIGN(DemuxerStreamForTest); |
71 }; | 73 }; |
72 | 74 |
73 } // namespace media | 75 } // namespace media |
74 } // namespace chromecast | 76 } // namespace chromecast |
75 | 77 |
76 #endif // CHROMECAST_MEDIA_CMA_BASE_DEMUXER_STREAM_FOR_TEST_H_ | 78 #endif // CHROMECAST_MEDIA_CMA_BASE_DEMUXER_STREAM_FOR_TEST_H_ |
OLD | NEW |