OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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_CAPTURER_SINK_OWNER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_SINK_OWNER_H_ |
6 #define CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_SINK_OWNER_H_ | 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_SINK_OWNER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 : public base::RefCountedThreadSafe<WebRtcAudioCapturerSinkOwner>, | 21 : public base::RefCountedThreadSafe<WebRtcAudioCapturerSinkOwner>, |
22 public WebRtcAudioCapturerSink { | 22 public WebRtcAudioCapturerSink { |
23 public: | 23 public: |
24 explicit WebRtcAudioCapturerSinkOwner(WebRtcAudioCapturerSink* sink); | 24 explicit WebRtcAudioCapturerSinkOwner(WebRtcAudioCapturerSink* sink); |
25 | 25 |
26 // WebRtcAudioCapturerSink implementation. | 26 // WebRtcAudioCapturerSink implementation. |
27 virtual void CaptureData(const int16* audio_data, | 27 virtual void CaptureData(const int16* audio_data, |
28 int number_of_channels, | 28 int number_of_channels, |
29 int number_of_frames, | 29 int number_of_frames, |
30 int audio_delay_milliseconds, | 30 int audio_delay_milliseconds, |
31 double volume) OVERRIDE; | 31 double volume, |
| 32 bool key_pressed) OVERRIDE; |
32 virtual void SetCaptureFormat(const media::AudioParameters& params) OVERRIDE; | 33 virtual void SetCaptureFormat(const media::AudioParameters& params) OVERRIDE; |
33 | 34 |
34 bool IsEqual(const WebRtcAudioCapturerSink* other) const; | 35 bool IsEqual(const WebRtcAudioCapturerSink* other) const; |
35 void Reset(); | 36 void Reset(); |
36 | 37 |
37 // Wrapper which allows to use std::find_if() when adding and removing | 38 // Wrapper which allows to use std::find_if() when adding and removing |
38 // sinks to/from the list. | 39 // sinks to/from the list. |
39 struct WrapsSink { | 40 struct WrapsSink { |
40 WrapsSink(WebRtcAudioCapturerSink* sink) : sink_(sink) {} | 41 WrapsSink(WebRtcAudioCapturerSink* sink) : sink_(sink) {} |
41 bool operator()( | 42 bool operator()( |
(...skipping 10 matching lines...) Expand all Loading... |
52 friend class base::RefCountedThreadSafe<WebRtcAudioCapturerSinkOwner>; | 53 friend class base::RefCountedThreadSafe<WebRtcAudioCapturerSinkOwner>; |
53 WebRtcAudioCapturerSink* delegate_; | 54 WebRtcAudioCapturerSink* delegate_; |
54 mutable base::Lock lock_; | 55 mutable base::Lock lock_; |
55 | 56 |
56 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioCapturerSinkOwner); | 57 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioCapturerSinkOwner); |
57 }; | 58 }; |
58 | 59 |
59 } // namespace content | 60 } // namespace content |
60 | 61 |
61 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_SINK_OWNER_H_ | 62 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_SINK_OWNER_H_ |
OLD | NEW |