OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BASE_AUDIO_PULL_FIFO_H_ | 5 #ifndef MEDIA_BASE_AUDIO_PULL_FIFO_H_ |
6 #define MEDIA_BASE_AUDIO_PULL_FIFO_H_ | 6 #define MEDIA_BASE_AUDIO_PULL_FIFO_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/macros.h" |
9 #include "media/base/media_export.h" | 10 #include "media/base/media_export.h" |
10 | 11 |
11 namespace media { | 12 namespace media { |
12 class AudioBus; | 13 class AudioBus; |
13 | 14 |
14 // A FIFO (First In First Out) buffer to handle mismatches in buffer sizes | 15 // A FIFO (First In First Out) buffer to handle mismatches in buffer sizes |
15 // between a producer and consumer. The consumer will pull data from this FIFO. | 16 // between a producer and consumer. The consumer will pull data from this FIFO. |
16 // If data is already available in the FIFO, it is provided to the consumer. | 17 // If data is already available in the FIFO, it is provided to the consumer. |
17 // If insufficient data is available to satisfy the request, the FIFO will ask | 18 // If insufficient data is available to satisfy the request, the FIFO will ask |
18 // the producer for more data to fulfill a request. | 19 // the producer for more data to fulfill a request. |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 // Temporary audio bus to hold the data from the producer. | 52 // Temporary audio bus to hold the data from the producer. |
52 scoped_ptr<AudioBus> fifo_; | 53 scoped_ptr<AudioBus> fifo_; |
53 int fifo_index_; | 54 int fifo_index_; |
54 | 55 |
55 DISALLOW_COPY_AND_ASSIGN(AudioPullFifo); | 56 DISALLOW_COPY_AND_ASSIGN(AudioPullFifo); |
56 }; | 57 }; |
57 | 58 |
58 } // namespace media | 59 } // namespace media |
59 | 60 |
60 #endif // MEDIA_BASE_AUDIO_PULL_FIFO_H_ | 61 #endif // MEDIA_BASE_AUDIO_PULL_FIFO_H_ |
OLD | NEW |