| 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 "base/macros.h" |
| 10 #include "base/memory/scoped_ptr.h" |
| 10 #include "media/base/media_export.h" | 11 #include "media/base/media_export.h" |
| 11 | 12 |
| 12 namespace media { | 13 namespace media { |
| 13 class AudioBus; | 14 class AudioBus; |
| 14 | 15 |
| 15 // A FIFO (First In First Out) buffer to handle mismatches in buffer sizes | 16 // A FIFO (First In First Out) buffer to handle mismatches in buffer sizes |
| 16 // between a producer and consumer. The consumer will pull data from this FIFO. | 17 // between a producer and consumer. The consumer will pull data from this FIFO. |
| 17 // If data is already available in the FIFO, it is provided to the consumer. | 18 // If data is already available in the FIFO, it is provided to the consumer. |
| 18 // If insufficient data is available to satisfy the request, the FIFO will ask | 19 // If insufficient data is available to satisfy the request, the FIFO will ask |
| 19 // the producer for more data to fulfill a request. | 20 // the producer for more data to fulfill a request. |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // Temporary audio bus to hold the data from the producer. | 56 // Temporary audio bus to hold the data from the producer. |
| 56 scoped_ptr<AudioBus> fifo_; | 57 scoped_ptr<AudioBus> fifo_; |
| 57 int fifo_index_; | 58 int fifo_index_; |
| 58 | 59 |
| 59 DISALLOW_COPY_AND_ASSIGN(AudioPullFifo); | 60 DISALLOW_COPY_AND_ASSIGN(AudioPullFifo); |
| 60 }; | 61 }; |
| 61 | 62 |
| 62 } // namespace media | 63 } // namespace media |
| 63 | 64 |
| 64 #endif // MEDIA_BASE_AUDIO_PULL_FIFO_H_ | 65 #endif // MEDIA_BASE_AUDIO_PULL_FIFO_H_ |
| OLD | NEW |