OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_MEDIA_STREAM_AUDIO_SOURCE_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_SOURCE_H_ |
6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_SOURCE_H_ | 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_SOURCE_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
10 #include "content/renderer/media/media_stream_source.h" | 10 #include "content/renderer/media/media_stream_source.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 virtual ~MediaStreamAudioSource(); | 25 virtual ~MediaStreamAudioSource(); |
26 | 26 |
27 void AddTrack(const blink::WebMediaStreamTrack& track, | 27 void AddTrack(const blink::WebMediaStreamTrack& track, |
28 const blink::WebMediaConstraints& constraints, | 28 const blink::WebMediaConstraints& constraints, |
29 const ConstraintsCallback& callback); | 29 const ConstraintsCallback& callback); |
30 | 30 |
31 void SetLocalAudioSource(webrtc::AudioSourceInterface* source) { | 31 void SetLocalAudioSource(webrtc::AudioSourceInterface* source) { |
32 local_audio_source_ = source; | 32 local_audio_source_ = source; |
33 } | 33 } |
34 | 34 |
35 void SetAudioCapturer(WebRtcAudioCapturer* capturer) { | 35 void SetAudioCapturer(const scoped_refptr<WebRtcAudioCapturer>& capturer) { |
36 DCHECK(!audio_capturer_.get()); | 36 DCHECK(!audio_capturer_.get()); |
37 audio_capturer_ = capturer; | 37 audio_capturer_ = capturer; |
38 } | 38 } |
39 | 39 |
40 const scoped_refptr<WebRtcAudioCapturer>& GetAudioCapturer() { | 40 const scoped_refptr<WebRtcAudioCapturer>& GetAudioCapturer() { |
41 return audio_capturer_; | 41 return audio_capturer_; |
42 } | 42 } |
43 | 43 |
44 webrtc::AudioSourceInterface* local_audio_source() { | 44 webrtc::AudioSourceInterface* local_audio_source() { |
45 return local_audio_source_.get(); | 45 return local_audio_source_.get(); |
(...skipping 11 matching lines...) Expand all Loading... |
57 scoped_refptr<webrtc::AudioSourceInterface> local_audio_source_; | 57 scoped_refptr<webrtc::AudioSourceInterface> local_audio_source_; |
58 | 58 |
59 scoped_refptr<WebRtcAudioCapturer> audio_capturer_; | 59 scoped_refptr<WebRtcAudioCapturer> audio_capturer_; |
60 | 60 |
61 DISALLOW_COPY_AND_ASSIGN(MediaStreamAudioSource); | 61 DISALLOW_COPY_AND_ASSIGN(MediaStreamAudioSource); |
62 }; | 62 }; |
63 | 63 |
64 } // namespace content | 64 } // namespace content |
65 | 65 |
66 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_SOURCE_H_ | 66 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_SOURCE_H_ |
OLD | NEW |