Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(420)

Side by Side Diff: content/renderer/media/webrtc_audio_capturer_sink_owner.h

Issue 37793005: move the APM to chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added a switch, it uses the APM in WebRtc if the switch is off, otherwise use the APM in Chrome. Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 <vector> 8 #include <vector>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/synchronization/lock.h" 11 #include "base/synchronization/lock.h"
12 #include "content/renderer/media/webrtc_audio_device_impl.h" 12 #include "content/renderer/media/webrtc_audio_device_impl.h"
13 #include "media/audio/audio_parameters.h" 13 #include "media/audio/audio_parameters.h"
14 14
15 namespace content { 15 namespace content {
16 16
17 class WebRtcAudioCapturerSink;
18
19 // Reference counted container of WebRtcAudioCapturerSink delegates. 17 // Reference counted container of WebRtcAudioCapturerSink delegates.
20 class WebRtcAudioCapturerSinkOwner 18 class WebRtcAudioCapturerSinkOwner
21 : public base::RefCountedThreadSafe<WebRtcAudioCapturerSinkOwner>, 19 : public base::RefCountedThreadSafe<WebRtcAudioCapturerSinkOwner>,
22 public WebRtcAudioCapturerSink { 20 public WebRtcAudioCapturerSink {
23 public: 21 public:
24 explicit WebRtcAudioCapturerSinkOwner(WebRtcAudioCapturerSink* sink); 22 explicit WebRtcAudioCapturerSinkOwner(WebRtcAudioCapturerSink* sink);
25 23
26 // WebRtcAudioCapturerSink implementation. 24 // WebRtcAudioCapturerSink implementation.
27 virtual int CaptureData(const std::vector<int>& channels, 25 virtual int CaptureData(const std::vector<int>& channels,
28 const int16* audio_data, 26 const int16* audio_data,
(...skipping 28 matching lines...) Expand all
57 friend class base::RefCountedThreadSafe<WebRtcAudioCapturerSinkOwner>; 55 friend class base::RefCountedThreadSafe<WebRtcAudioCapturerSinkOwner>;
58 WebRtcAudioCapturerSink* delegate_; 56 WebRtcAudioCapturerSink* delegate_;
59 mutable base::Lock lock_; 57 mutable base::Lock lock_;
60 58
61 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioCapturerSinkOwner); 59 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioCapturerSinkOwner);
62 }; 60 };
63 61
64 } // namespace content 62 } // namespace content
65 63
66 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_SINK_OWNER_H_ 64 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_SINK_OWNER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698