OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_AUDIO_AUDIO_BUFFERS_STATE_H_ | 5 #ifndef MEDIA_AUDIO_AUDIO_BUFFERS_STATE_H_ |
6 #define MEDIA_AUDIO_AUDIO_BUFFERS_STATE_H_ | 6 #define MEDIA_AUDIO_AUDIO_BUFFERS_STATE_H_ |
7 | 7 |
8 #include "base/time.h" | 8 #include "base/time.h" |
| 9 #include "media/base/media_export.h" |
9 | 10 |
10 // AudioBuffersState struct stores current state of audio buffers along with | 11 // AudioBuffersState struct stores current state of audio buffers along with |
11 // the timestamp of the moment this state corresponds to. It is used for audio | 12 // the timestamp of the moment this state corresponds to. It is used for audio |
12 // synchronization. | 13 // synchronization. |
13 struct AudioBuffersState { | 14 struct MEDIA_EXPORT AudioBuffersState { |
14 AudioBuffersState(); | 15 AudioBuffersState(); |
15 AudioBuffersState(int pending_bytes, int hardware_delay_bytes); | 16 AudioBuffersState(int pending_bytes, int hardware_delay_bytes); |
16 | 17 |
17 int total_bytes(); | 18 int total_bytes(); |
18 | 19 |
19 // Number of bytes we currently have in our software buffer. | 20 // Number of bytes we currently have in our software buffer. |
20 int pending_bytes; | 21 int pending_bytes; |
21 | 22 |
22 // Number of bytes that have been written to the device, but haven't | 23 // Number of bytes that have been written to the device, but haven't |
23 // been played yet. | 24 // been played yet. |
24 int hardware_delay_bytes; | 25 int hardware_delay_bytes; |
25 | 26 |
26 // Timestamp of the moment when the buffers state was captured. It is used | 27 // Timestamp of the moment when the buffers state was captured. It is used |
27 // to account for the time it takes to deliver AudioBuffersState from | 28 // to account for the time it takes to deliver AudioBuffersState from |
28 // the browser process to the renderer. | 29 // the browser process to the renderer. |
29 base::Time timestamp; | 30 base::Time timestamp; |
30 }; | 31 }; |
31 | 32 |
32 | 33 |
33 #endif // MEDIA_AUDIO_AUDIO_BUFFERS_STATE_H_ | 34 #endif // MEDIA_AUDIO_AUDIO_BUFFERS_STATE_H_ |
OLD | NEW |