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