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_dependency_factory.h" | 10 #include "content/renderer/media/media_stream_dependency_factory.h" |
11 #include "content/renderer/media/media_stream_source.h" | 11 #include "content/renderer/media/media_stream_source.h" |
12 #include "content/renderer/media/webrtc_audio_capturer.h" | 12 #include "content/renderer/media/webrtc_audio_capturer.h" |
13 #include "third_party/libjingle/source/talk/app/webrtc/mediastreaminterface.h" | 13 #include "third_party/libjingle/source/talk/app/webrtc/mediastreaminterface.h" |
14 | 14 |
15 namespace content { | 15 namespace content { |
16 | 16 |
17 class CONTENT_EXPORT MediaStreamAudioSource | 17 class CONTENT_EXPORT MediaStreamAudioSource |
18 : NON_EXPORTED_BASE(public MediaStreamSource) { | 18 : NON_EXPORTED_BASE(public MediaStreamSource) { |
19 public: | 19 public: |
20 MediaStreamAudioSource(int render_view_id, | 20 MediaStreamAudioSource(int render_view_id, |
21 const StreamDeviceInfo& device_info, | 21 const StreamDeviceInfo& device_info, |
22 const SourceStoppedCallback& stop_callback, | 22 const SourceStoppedCallback& stop_callback, |
23 MediaStreamDependencyFactory* factory); | 23 MediaStreamDependencyFactory* factory); |
24 MediaStreamAudioSource(); | 24 MediaStreamAudioSource(); |
25 virtual ~MediaStreamAudioSource(); | 25 virtual ~MediaStreamAudioSource(); |
26 | 26 |
27 virtual void AddTrack(const blink::WebMediaStreamTrack& track, | 27 virtual void AddTrack(const blink::WebMediaStreamTrack& track, |
no longer working on chromium
2014/03/02 10:57:36
can we remove virtual since it it not overriding a
perkj_chrome
2014/03/04 10:44:51
Done.
| |
28 const blink::WebMediaConstraints& constraints, | 28 const blink::WebMediaConstraints& constraints, |
29 const ConstraintsCallback& callback) OVERRIDE; | 29 const ConstraintsCallback& callback); |
Ronghua Wu (Left Chromium)
2014/03/04 01:04:11
why remove OVERRIDE but not virtual?
perkj_chrome
2014/03/04 10:44:51
Done.
| |
30 virtual void RemoveTrack(const blink::WebMediaStreamTrack& track) OVERRIDE; | |
31 | 30 |
32 void SetLocalAudioSource(webrtc::AudioSourceInterface* source) { | 31 void SetLocalAudioSource(webrtc::AudioSourceInterface* source) { |
33 local_audio_source_ = source; | 32 local_audio_source_ = source; |
34 } | 33 } |
35 | 34 |
36 void SetAudioCapturer(WebRtcAudioCapturer* capturer) { | 35 void SetAudioCapturer(WebRtcAudioCapturer* capturer) { |
37 DCHECK(!audio_capturer_); | 36 DCHECK(!audio_capturer_); |
38 audio_capturer_ = capturer; | 37 audio_capturer_ = capturer; |
39 } | 38 } |
40 | 39 |
(...skipping 17 matching lines...) Expand all Loading... | |
58 scoped_refptr<WebRtcAudioCapturer> audio_capturer_; | 57 scoped_refptr<WebRtcAudioCapturer> audio_capturer_; |
59 | 58 |
60 MediaStreamDependencyFactory* factory_; | 59 MediaStreamDependencyFactory* factory_; |
61 | 60 |
62 DISALLOW_COPY_AND_ASSIGN(MediaStreamAudioSource); | 61 DISALLOW_COPY_AND_ASSIGN(MediaStreamAudioSource); |
63 }; | 62 }; |
64 | 63 |
65 } // namespace content | 64 } // namespace content |
66 | 65 |
67 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_SOURCE_H_ | 66 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_SOURCE_H_ |
OLD | NEW |