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 // Low-latency audio capturing unit utilizing audio input stream provided | 5 // Low-latency audio capturing unit utilizing audio input stream provided |
6 // by browser process through IPC. | 6 // by browser process through IPC. |
7 // | 7 // |
8 // Relationship of classes: | 8 // Relationship of classes: |
9 // | 9 // |
10 // AudioInputController AudioInputDevice | 10 // AudioInputController AudioInputDevice |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 // | 60 // |
61 // Implementation notes: | 61 // Implementation notes: |
62 // | 62 // |
63 // - Start() is asynchronous/non-blocking. | 63 // - Start() is asynchronous/non-blocking. |
64 // - Stop() is synchronous/blocking. | 64 // - Stop() is synchronous/blocking. |
65 // - SetDevice() is asynchronous/non-blocking. | 65 // - SetDevice() is asynchronous/non-blocking. |
66 // - The user must call Stop() before deleting the class instance. | 66 // - The user must call Stop() before deleting the class instance. |
67 | 67 |
68 #ifndef CONTENT_RENDERER_MEDIA_AUDIO_INPUT_DEVICE_H_ | 68 #ifndef CONTENT_RENDERER_MEDIA_AUDIO_INPUT_DEVICE_H_ |
69 #define CONTENT_RENDERER_MEDIA_AUDIO_INPUT_DEVICE_H_ | 69 #define CONTENT_RENDERER_MEDIA_AUDIO_INPUT_DEVICE_H_ |
70 #pragma once | |
71 | 70 |
72 #include <string> | 71 #include <string> |
73 #include <vector> | 72 #include <vector> |
74 | 73 |
75 #include "base/basictypes.h" | 74 #include "base/basictypes.h" |
76 #include "base/compiler_specific.h" | 75 #include "base/compiler_specific.h" |
77 #include "base/memory/scoped_ptr.h" | 76 #include "base/memory/scoped_ptr.h" |
78 #include "base/shared_memory.h" | 77 #include "base/shared_memory.h" |
79 #include "content/common/content_export.h" | 78 #include "content/common/content_export.h" |
80 #include "content/renderer/media/audio_device_thread.h" | 79 #include "content/renderer/media/audio_device_thread.h" |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 // In order to avoid a race between OnStreamCreated and Stop(), we use this | 220 // In order to avoid a race between OnStreamCreated and Stop(), we use this |
222 // guard to control stopping and starting the audio thread. | 221 // guard to control stopping and starting the audio thread. |
223 base::Lock audio_thread_lock_; | 222 base::Lock audio_thread_lock_; |
224 AudioDeviceThread audio_thread_; | 223 AudioDeviceThread audio_thread_; |
225 scoped_ptr<AudioInputDevice::AudioThreadCallback> audio_callback_; | 224 scoped_ptr<AudioInputDevice::AudioThreadCallback> audio_callback_; |
226 | 225 |
227 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioInputDevice); | 226 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioInputDevice); |
228 }; | 227 }; |
229 | 228 |
230 #endif // CONTENT_RENDERER_MEDIA_AUDIO_INPUT_DEVICE_H_ | 229 #endif // CONTENT_RENDERER_MEDIA_AUDIO_INPUT_DEVICE_H_ |
OLD | NEW |