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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 ASSERT(!m_private.isNull() && consumer); | 215 ASSERT(!m_private.isNull() && consumer); |
216 | 216 |
217 m_private->addAudioConsumer(ConsumerWrapper::create(consumer)); | 217 m_private->addAudioConsumer(ConsumerWrapper::create(consumer)); |
218 } | 218 } |
219 | 219 |
220 bool WebMediaStreamSource::removeAudioConsumer(WebAudioDestinationConsumer* cons
umer) | 220 bool WebMediaStreamSource::removeAudioConsumer(WebAudioDestinationConsumer* cons
umer) |
221 { | 221 { |
222 ASSERT(isMainThread()); | 222 ASSERT(isMainThread()); |
223 ASSERT(!m_private.isNull() && consumer); | 223 ASSERT(!m_private.isNull() && consumer); |
224 | 224 |
225 const HeapHashSet<Member<AudioDestinationConsumer> >& consumers = m_private-
>audioConsumers(); | 225 const HeapHashSet<Member<AudioDestinationConsumer>>& consumers = m_private->
audioConsumers(); |
226 for (HeapHashSet<Member<AudioDestinationConsumer> >::const_iterator it = con
sumers.begin(); it != consumers.end(); ++it) { | 226 for (HeapHashSet<Member<AudioDestinationConsumer>>::const_iterator it = cons
umers.begin(); it != consumers.end(); ++it) { |
227 ConsumerWrapper* wrapper = static_cast<ConsumerWrapper*>(it->get()); | 227 ConsumerWrapper* wrapper = static_cast<ConsumerWrapper*>(it->get()); |
228 if (wrapper->consumer() == consumer) { | 228 if (wrapper->consumer() == consumer) { |
229 m_private->removeAudioConsumer(wrapper); | 229 m_private->removeAudioConsumer(wrapper); |
230 return true; | 230 return true; |
231 } | 231 } |
232 } | 232 } |
233 return false; | 233 return false; |
234 } | 234 } |
235 | 235 |
236 } // namespace blink | 236 } // namespace blink |
OLD | NEW |