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