OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 MEDIA_FILTERS_FAKE_DEMUXER_STREAM_H_ | 5 #ifndef MEDIA_FILTERS_FAKE_DEMUXER_STREAM_H_ |
6 #define MEDIA_FILTERS_FAKE_DEMUXER_STREAM_H_ | 6 #define MEDIA_FILTERS_FAKE_DEMUXER_STREAM_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "media/base/audio_decoder_config.h" | 10 #include "media/base/audio_decoder_config.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 public: | 21 public: |
22 // Constructs an object that outputs |num_configs| different configs in | 22 // Constructs an object that outputs |num_configs| different configs in |
23 // sequence with |num_frames_in_one_config| buffers for each config. The | 23 // sequence with |num_frames_in_one_config| buffers for each config. The |
24 // output buffers are encrypted if |is_encrypted| is true. | 24 // output buffers are encrypted if |is_encrypted| is true. |
25 FakeDemuxerStream(int num_configs, | 25 FakeDemuxerStream(int num_configs, |
26 int num_buffers_in_one_config, | 26 int num_buffers_in_one_config, |
27 bool is_encrypted); | 27 bool is_encrypted); |
28 virtual ~FakeDemuxerStream(); | 28 virtual ~FakeDemuxerStream(); |
29 | 29 |
30 // DemuxerStream implementation. | 30 // DemuxerStream implementation. |
31 virtual void Read(const ReadCB& read_cb) OVERRIDE; | 31 virtual void Read(const ReadCB& read_cb) override; |
32 virtual AudioDecoderConfig audio_decoder_config() OVERRIDE; | 32 virtual AudioDecoderConfig audio_decoder_config() override; |
33 virtual VideoDecoderConfig video_decoder_config() OVERRIDE; | 33 virtual VideoDecoderConfig video_decoder_config() override; |
34 virtual Type type() OVERRIDE; | 34 virtual Type type() override; |
35 virtual bool SupportsConfigChanges() OVERRIDE; | 35 virtual bool SupportsConfigChanges() override; |
36 virtual VideoRotation video_rotation() OVERRIDE; | 36 virtual VideoRotation video_rotation() override; |
37 | 37 |
38 void Initialize(); | 38 void Initialize(); |
39 | 39 |
40 int num_buffers_returned() const { return num_buffers_returned_; } | 40 int num_buffers_returned() const { return num_buffers_returned_; } |
41 | 41 |
42 // Upon the next read, holds the read callback until SatisfyRead() or Reset() | 42 // Upon the next read, holds the read callback until SatisfyRead() or Reset() |
43 // is called. | 43 // is called. |
44 void HoldNextRead(); | 44 void HoldNextRead(); |
45 | 45 |
46 // Upon the next config change read, holds the read callback until | 46 // Upon the next config change read, holds the read callback until |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 // Zero-based number indicating which read operation should be held. -1 means | 98 // Zero-based number indicating which read operation should be held. -1 means |
99 // no read shall be held. | 99 // no read shall be held. |
100 int read_to_hold_; | 100 int read_to_hold_; |
101 | 101 |
102 DISALLOW_COPY_AND_ASSIGN(FakeDemuxerStream); | 102 DISALLOW_COPY_AND_ASSIGN(FakeDemuxerStream); |
103 }; | 103 }; |
104 | 104 |
105 } // namespace media | 105 } // namespace media |
106 | 106 |
107 #endif // MEDIA_FILTERS_FAKE_DEMUXER_STREAM_H_ | 107 #endif // MEDIA_FILTERS_FAKE_DEMUXER_STREAM_H_ |
OLD | NEW |