| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 15 matching lines...) Expand all Loading... |
| 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 "platform/mediastream/MediaStreamSource.h" | 31 #include "platform/mediastream/MediaStreamSource.h" |
| 32 | 32 |
| 33 | 33 |
| 34 namespace blink { | 34 namespace blink { |
| 35 | 35 |
| 36 MediaStreamSource* MediaStreamSource::create(const String& id, StreamType type,
const String& name, bool remote, bool readonly, ReadyState readyState, bool requ
iresConsumer) | 36 MediaStreamSource* MediaStreamSource::create(const String& id, StreamType type,
const String& name, bool remote, ReadyState readyState, bool requiresConsumer) |
| 37 { | 37 { |
| 38 return new MediaStreamSource(id, type, name, remote, readonly, readyState, r
equiresConsumer); | 38 return new MediaStreamSource(id, type, name, remote, readyState, requiresCon
sumer); |
| 39 } | 39 } |
| 40 | 40 |
| 41 MediaStreamSource::MediaStreamSource(const String& id, StreamType type, const St
ring& name, bool remote, bool readonly, ReadyState readyState, bool requiresCons
umer) | 41 MediaStreamSource::MediaStreamSource(const String& id, StreamType type, const St
ring& name, bool remote, ReadyState readyState, bool requiresConsumer) |
| 42 : m_id(id) | 42 : m_id(id) |
| 43 , m_type(type) | 43 , m_type(type) |
| 44 , m_name(name) | 44 , m_name(name) |
| 45 , m_remote(remote) | 45 , m_remote(remote) |
| 46 , m_readonly(readonly) | |
| 47 , m_readyState(readyState) | 46 , m_readyState(readyState) |
| 48 , m_requiresConsumer(requiresConsumer) | 47 , m_requiresConsumer(requiresConsumer) |
| 49 { | 48 { |
| 50 } | 49 } |
| 51 | 50 |
| 52 void MediaStreamSource::setReadyState(ReadyState readyState) | 51 void MediaStreamSource::setReadyState(ReadyState readyState) |
| 53 { | 52 { |
| 54 if (m_readyState != ReadyStateEnded && m_readyState != readyState) { | 53 if (m_readyState != ReadyStateEnded && m_readyState != readyState) { |
| 55 m_readyState = readyState; | 54 m_readyState = readyState; |
| 56 | 55 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 (*it)->consumeAudio(bus, numberOfFrames); | 101 (*it)->consumeAudio(bus, numberOfFrames); |
| 103 } | 102 } |
| 104 | 103 |
| 105 DEFINE_TRACE(MediaStreamSource) | 104 DEFINE_TRACE(MediaStreamSource) |
| 106 { | 105 { |
| 107 visitor->trace(m_observers); | 106 visitor->trace(m_observers); |
| 108 visitor->trace(m_audioConsumers); | 107 visitor->trace(m_audioConsumers); |
| 109 } | 108 } |
| 110 | 109 |
| 111 } // namespace blink | 110 } // namespace blink |
| OLD | NEW |