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