OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 13 matching lines...) Expand all Loading... |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #include "public/platform/WebMediaStreamSource.h" | 31 #include "public/platform/WebMediaStreamSource.h" |
32 | 32 |
33 #include <memory> | 33 #include <memory> |
| 34 #include <utility> |
| 35 |
34 #include "platform/audio/AudioBus.h" | 36 #include "platform/audio/AudioBus.h" |
35 #include "platform/mediastream/MediaStreamSource.h" | 37 #include "platform/mediastream/MediaStreamSource.h" |
36 #include "platform/wtf/PtrUtil.h" | 38 #include "platform/wtf/PtrUtil.h" |
37 #include "platform/wtf/Vector.h" | 39 #include "platform/wtf/Vector.h" |
38 #include "public/platform/WebAudioDestinationConsumer.h" | 40 #include "public/platform/WebAudioDestinationConsumer.h" |
39 #include "public/platform/WebMediaConstraints.h" | 41 #include "public/platform/WebMediaConstraints.h" |
40 #include "public/platform/WebString.h" | 42 #include "public/platform/WebString.h" |
41 | 43 |
42 namespace blink { | 44 namespace blink { |
43 | 45 |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 void WebMediaStreamSource::SetExtraData(ExtraData* extra_data) { | 147 void WebMediaStreamSource::SetExtraData(ExtraData* extra_data) { |
146 DCHECK(!private_.IsNull()); | 148 DCHECK(!private_.IsNull()); |
147 | 149 |
148 if (extra_data) | 150 if (extra_data) |
149 extra_data->SetOwner(private_.Get()); | 151 extra_data->SetOwner(private_.Get()); |
150 | 152 |
151 private_->SetExtraData( | 153 private_->SetExtraData( |
152 WTF::WrapUnique(new ExtraDataContainer(WTF::WrapUnique(extra_data)))); | 154 WTF::WrapUnique(new ExtraDataContainer(WTF::WrapUnique(extra_data)))); |
153 } | 155 } |
154 | 156 |
| 157 void WebMediaStreamSource::SetEchoCancellation(bool echo_cancellation) { |
| 158 DCHECK(!private_.IsNull()); |
| 159 private_->SetEchoCancellation(echo_cancellation); |
| 160 } |
| 161 |
155 WebMediaConstraints WebMediaStreamSource::Constraints() { | 162 WebMediaConstraints WebMediaStreamSource::Constraints() { |
156 DCHECK(!private_.IsNull()); | 163 DCHECK(!private_.IsNull()); |
157 return private_->Constraints(); | 164 return private_->Constraints(); |
158 } | 165 } |
159 | 166 |
160 bool WebMediaStreamSource::RequiresAudioConsumer() const { | 167 bool WebMediaStreamSource::RequiresAudioConsumer() const { |
161 DCHECK(!private_.IsNull()); | 168 DCHECK(!private_.IsNull()); |
162 return private_->RequiresAudioConsumer(); | 169 return private_->RequiresAudioConsumer(); |
163 } | 170 } |
164 | 171 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 ConsumerWrapper* wrapper = static_cast<ConsumerWrapper*>(it); | 226 ConsumerWrapper* wrapper = static_cast<ConsumerWrapper*>(it); |
220 if (wrapper->Consumer() == consumer) { | 227 if (wrapper->Consumer() == consumer) { |
221 private_->RemoveAudioConsumer(wrapper); | 228 private_->RemoveAudioConsumer(wrapper); |
222 return true; | 229 return true; |
223 } | 230 } |
224 } | 231 } |
225 return false; | 232 return false; |
226 } | 233 } |
227 | 234 |
228 } // namespace blink | 235 } // namespace blink |
OLD | NEW |