OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_SOURCE_EXTRA_DATA_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_SOURCE_EXTRA_DATA_H_ |
6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_SOURCE_EXTRA_DATA_H_ | 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_SOURCE_EXTRA_DATA_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/common/media/media_stream_options.h" | 10 #include "content/common/media/media_stream_options.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 | 26 |
27 // Return device information about the camera or microphone. | 27 // Return device information about the camera or microphone. |
28 const StreamDeviceInfo& device_info() const { | 28 const StreamDeviceInfo& device_info() const { |
29 return device_info_; | 29 return device_info_; |
30 } | 30 } |
31 | 31 |
32 void SetVideoSource(webrtc::VideoSourceInterface* source) { | 32 void SetVideoSource(webrtc::VideoSourceInterface* source) { |
33 video_source_ = source; | 33 video_source_ = source; |
34 } | 34 } |
35 | 35 |
| 36 void SetLocalAudioSource(webrtc::AudioSourceInterface* source) { |
| 37 local_audio_source_ = source; |
| 38 } |
| 39 |
36 webrtc::VideoSourceInterface* video_source() { return video_source_; } | 40 webrtc::VideoSourceInterface* video_source() { return video_source_; } |
37 media::AudioCapturerSource* audio_source() { return audio_source_; } | 41 media::AudioCapturerSource* audio_source() { return audio_source_; } |
| 42 webrtc::AudioSourceInterface* local_audio_source() { |
| 43 return local_audio_source_; |
| 44 } |
38 | 45 |
39 private: | 46 private: |
40 StreamDeviceInfo device_info_; | 47 StreamDeviceInfo device_info_; |
41 scoped_refptr<webrtc::VideoSourceInterface> video_source_; | 48 scoped_refptr<webrtc::VideoSourceInterface> video_source_; |
42 scoped_refptr<media::AudioCapturerSource> audio_source_; | 49 scoped_refptr<media::AudioCapturerSource> audio_source_; |
43 | 50 |
| 51 // This member holds an instance of webrtc::LocalAudioSource. This is used |
| 52 // as a container for audio options. |
| 53 // TODO(hclam): This should be merged with |audio_source_| such that it |
| 54 // carries audio options. |
| 55 scoped_refptr<webrtc::AudioSourceInterface> local_audio_source_; |
| 56 |
44 DISALLOW_COPY_AND_ASSIGN(MediaStreamSourceExtraData); | 57 DISALLOW_COPY_AND_ASSIGN(MediaStreamSourceExtraData); |
45 }; | 58 }; |
46 | 59 |
47 } // namespace content | 60 } // namespace content |
48 | 61 |
49 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_SOURCE_EXTRA_DATA_H_ | 62 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_SOURCE_EXTRA_DATA_H_ |
OLD | NEW |