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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
42 void HoldNextRead(); | 42 void HoldNextRead(); |
43 | 43 |
44 // Upon the next config change read, holds the read callback until | 44 // Upon the next config change read, holds the read callback until |
45 // SatisfyRead() or Reset() is called. If there is no config change any more, | 45 // SatisfyRead() or Reset() is called. If there is no config change any more, |
46 // no read will be held. | 46 // no read will be held. |
47 void HoldNextConfigChangeRead(); | 47 void HoldNextConfigChangeRead(); |
48 | 48 |
49 // Satisfies the pending read with the next scheduled status and buffer. | 49 // Satisfies the pending read with the next scheduled status and buffer. |
50 void SatisfyRead(); | 50 void SatisfyRead(); |
51 | 51 |
52 // Satisfies pending read request and then holds the following read. | |
53 void SatisfyAndHoldRead(); | |
xhwang
2014/04/25 00:36:03
SatisfyAndHoldNextRead()?
Sergey Ulanov
2014/04/26 00:59:29
Renamed to SatisfyReadAndHoldNext()
| |
54 | |
52 // Satisfies the pending read (if any) with kAborted and NULL. This call | 55 // Satisfies the pending read (if any) with kAborted and NULL. This call |
53 // always clears |hold_next_read_|. | 56 // always clears |hold_next_read_|. |
54 void Reset(); | 57 void Reset(); |
55 | 58 |
56 private: | 59 private: |
57 void UpdateVideoDecoderConfig(); | 60 void UpdateVideoDecoderConfig(); |
58 void DoRead(); | 61 void DoRead(); |
59 | 62 |
60 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 63 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
61 | 64 |
(...skipping 19 matching lines...) Expand all Loading... | |
81 // Zero-based number indicating which read operation should be held. -1 means | 84 // Zero-based number indicating which read operation should be held. -1 means |
82 // no read shall be held. | 85 // no read shall be held. |
83 int read_to_hold_; | 86 int read_to_hold_; |
84 | 87 |
85 DISALLOW_COPY_AND_ASSIGN(FakeDemuxerStream); | 88 DISALLOW_COPY_AND_ASSIGN(FakeDemuxerStream); |
86 }; | 89 }; |
87 | 90 |
88 } // namespace media | 91 } // namespace media |
89 | 92 |
90 #endif // MEDIA_FILTERS_FAKE_DEMUXER_STREAM_H_ | 93 #endif // MEDIA_FILTERS_FAKE_DEMUXER_STREAM_H_ |
OLD | NEW |