Index: content/renderer/media/webrtc_audio_capturer.h |
diff --git a/content/renderer/media/webrtc_audio_capturer.h b/content/renderer/media/webrtc_audio_capturer.h |
index afb072f5f7ab8204e1863eff744ac7d889ce963b..31829023f43485214447caf9b6d6e1e4d973a84b 100644 |
--- a/content/renderer/media/webrtc_audio_capturer.h |
+++ b/content/renderer/media/webrtc_audio_capturer.h |
@@ -10,6 +10,7 @@ |
#include "base/callback.h" |
#include "base/memory/ref_counted.h" |
+#include "base/synchronization/condition_variable.h" |
tommi (sloooow) - chröme
2013/02/08 14:56:57
remove
phoglund_chromium
2013/02/08 16:10:38
Done.
|
#include "base/synchronization/lock.h" |
#include "base/threading/thread_checker.h" |
#include "content/renderer/media/webrtc_audio_device_impl.h" |
@@ -26,6 +27,7 @@ namespace content { |
class WebRtcAudioCapturerSink; |
class WebRtcLocalAudioRenderer; |
+class CaptureBuffer; |
tommi (sloooow) - chröme
2013/02/08 14:56:57
can we make this a private class inside WebRtcAudi
phoglund_chromium
2013/02/08 16:10:38
Done.
|
// This class manages the capture data flow by getting data from its |
// |source_|, and passing it to its |sink_|. |
@@ -165,11 +167,16 @@ class CONTENT_EXPORT WebRtcAudioCapturer |
WebRtcAudioCapturer(); |
+ // Reconfigures the capturer with a new buffer size and capture parameters. |
+ // Must be called without holding the lock. Returns true on success. |
+ bool Reconfigure(int sample_rate, media::AudioParameters::Format format, |
+ media::ChannelLayout channel_layout); |
+ |
// Used to DCHECK that we are called on the correct thread. |
base::ThreadChecker thread_checker_; |
// Protects |source_|, |sinks_|, |running_|, |on_device_stopped_cb_|, |
- // |loopback_fifo_| and |buffering_|. |
+ // |loopback_fifo_|, |params| and |buffering_|. |
tommi (sloooow) - chröme
2013/02/08 14:56:57
params_
phoglund_chromium
2013/02/08 16:10:38
Done.
|
base::Lock lock_; |
// A list of sinks that the audio data is fed to. |
@@ -183,7 +190,7 @@ class CONTENT_EXPORT WebRtcAudioCapturer |
// Buffers used for temporary storage during capture callbacks. |
// Allocated during initialization. |
- scoped_array<int16> buffer_; |
+ scoped_refptr<CaptureBuffer> buffer_; |
std::string device_id_; |
bool running_; |