Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 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 CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ | 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | |
|
Chris Rogers
2011/12/15 00:32:52
Do we really need to include this just to get "siz
enal1
2011/12/15 16:54:40
We need it because in line 125 we are using std::s
| |
| 9 #include <vector> | 10 #include <vector> |
| 10 | 11 |
| 11 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 12 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 13 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 14 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/message_loop_proxy.h" | 16 #include "base/message_loop_proxy.h" |
| 16 #include "base/time.h" | 17 #include "base/time.h" |
| 17 #include "content/common/content_export.h" | 18 #include "content/common/content_export.h" |
| 18 #include "content/renderer/media/audio_device.h" | 19 #include "content/renderer/media/audio_device.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 104 // webrtc::RefCountedModule implementation. | 105 // webrtc::RefCountedModule implementation. |
| 105 // The creator must call AddRef() after construction and use Release() | 106 // The creator must call AddRef() after construction and use Release() |
| 106 // to release the reference and delete this object. | 107 // to release the reference and delete this object. |
| 107 virtual int32_t AddRef() OVERRIDE; | 108 virtual int32_t AddRef() OVERRIDE; |
| 108 virtual int32_t Release() OVERRIDE; | 109 virtual int32_t Release() OVERRIDE; |
| 109 | 110 |
| 110 // We need this one to support runnable method tasks. | 111 // We need this one to support runnable method tasks. |
| 111 static bool ImplementsThreadSafeReferenceCounting() { return true; } | 112 static bool ImplementsThreadSafeReferenceCounting() { return true; } |
| 112 | 113 |
| 113 // AudioDevice::RenderCallback implementation. | 114 // AudioDevice::RenderCallback implementation. |
| 114 virtual void Render(const std::vector<float*>& audio_data, | 115 virtual size_t Render(const std::vector<float*>& audio_data, |
| 115 size_t number_of_frames, | 116 size_t number_of_frames, |
| 116 size_t audio_delay_milliseconds) OVERRIDE; | 117 size_t audio_delay_milliseconds) OVERRIDE; |
| 117 | 118 |
| 118 // AudioInputDevice::CaptureCallback implementation. | 119 // AudioInputDevice::CaptureCallback implementation. |
| 119 virtual void Capture(const std::vector<float*>& audio_data, | 120 virtual void Capture(const std::vector<float*>& audio_data, |
| 120 size_t number_of_frames, | 121 size_t number_of_frames, |
| 121 size_t audio_delay_milliseconds) OVERRIDE; | 122 size_t audio_delay_milliseconds) OVERRIDE; |
| 122 | 123 |
| 123 // AudioInputDevice::CaptureEventHandler implementation. | 124 // AudioInputDevice::CaptureEventHandler implementation. |
| 124 virtual void OnDeviceStarted(const std::string& device_id) OVERRIDE; | 125 virtual void OnDeviceStarted(const std::string& device_id) OVERRIDE; |
| 125 virtual void OnDeviceStopped() OVERRIDE; | 126 virtual void OnDeviceStopped() OVERRIDE; |
| 126 | 127 |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 327 int bytes_per_sample_; | 328 int bytes_per_sample_; |
| 328 | 329 |
| 329 bool initialized_; | 330 bool initialized_; |
| 330 bool playing_; | 331 bool playing_; |
| 331 bool recording_; | 332 bool recording_; |
| 332 | 333 |
| 333 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioDeviceImpl); | 334 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioDeviceImpl); |
| 334 }; | 335 }; |
| 335 | 336 |
| 336 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ | 337 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ |
| OLD | NEW |