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; |
| 52 void SetStreamRestartedCB(const StreamRestartedCB& cb) override; |
50 | 53 |
51 bool has_pending_read() const { return has_pending_read_; } | 54 bool has_pending_read() const { return has_pending_read_; } |
52 | 55 |
53 // Frame duration | 56 // Frame duration |
54 static const int kDemuxerStreamForTestFrameDuration = 40; | 57 static const int kDemuxerStreamForTestFrameDuration = 40; |
55 | 58 |
56 private: | 59 private: |
57 void DoRead(const ReadCB& read_cb); | 60 void DoRead(const ReadCB& read_cb); |
58 | 61 |
59 // Demuxer configuration. | 62 // Demuxer configuration. |
60 int total_frame_count_; | 63 int total_frame_count_; |
61 const int cycle_count_; | 64 const int cycle_count_; |
62 const int delayed_frame_count_; | 65 const int delayed_frame_count_; |
63 std::list<int> config_idx_; | 66 std::list<int> config_idx_; |
64 | 67 |
65 // Number of frames sent so far. | 68 // Number of frames sent so far. |
66 int frame_count_; | 69 int frame_count_; |
67 | 70 |
68 bool has_pending_read_; | 71 bool has_pending_read_; |
69 | 72 |
70 DISALLOW_COPY_AND_ASSIGN(DemuxerStreamForTest); | 73 DISALLOW_COPY_AND_ASSIGN(DemuxerStreamForTest); |
71 }; | 74 }; |
72 | 75 |
73 } // namespace media | 76 } // namespace media |
74 } // namespace chromecast | 77 } // namespace chromecast |
75 | 78 |
76 #endif // CHROMECAST_MEDIA_CMA_BASE_DEMUXER_STREAM_FOR_TEST_H_ | 79 #endif // CHROMECAST_MEDIA_CMA_BASE_DEMUXER_STREAM_FOR_TEST_H_ |
OLD | NEW |