1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "content/renderer/media/webrtc_audio_capturer_sink_owner.h"
9 WebRtcAudioCapturerSinkOwner::WebRtcAudioCapturerSinkOwner(
10 WebRtcAudioCapturerSink* sink)
14 int WebRtcAudioCapturerSinkOwner::CaptureData(const std::vector<int>& channels,
15 const int16* audio_data,
17 int number_of_channels,
19 int audio_delay_milliseconds,
21 bool need_audio_processing,
23 base::AutoLock lock(lock_);
25 return delegate_->CaptureData(channels,
30 audio_delay_milliseconds,
32 need_audio_processing,
39 void WebRtcAudioCapturerSinkOwner::SetCaptureFormat(
40 const media::AudioParameters& params) {
41 base::AutoLock lock(lock_);
43 delegate_->SetCaptureFormat(params);
46 bool WebRtcAudioCapturerSinkOwner::IsEqual(
47 const WebRtcAudioCapturerSink* other) const {
48 base::AutoLock lock(lock_);
49 return (other == delegate_);
52 void WebRtcAudioCapturerSinkOwner::Reset() {
53 base::AutoLock lock(lock_);
57 } // namespace content