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..453a0b0308103daccc690512adbef43e5e643f55 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" |
#include "base/synchronization/lock.h" |
#include "base/threading/thread_checker.h" |
#include "content/renderer/media/webrtc_audio_device_impl.h" |
@@ -165,13 +166,22 @@ 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/07 14:57:47
params_
|
base::Lock lock_; |
+ // Keeps us from reconfiguring the buffer while the buffer is being used. |
+ base::ConditionVariable buffer_in_use_cv_; |
+ bool buffer_in_use_; |
+ |
// A list of sinks that the audio data is fed to. |
SinkList sinks_; |