| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2011 Ericsson AB. All rights reserved. | 3 * Copyright (C) 2011 Ericsson AB. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 bool MediaStreamTrack::ended() const | 172 bool MediaStreamTrack::ended() const |
| 173 { | 173 { |
| 174 return m_stopped || (m_readyState == MediaStreamSource::ReadyStateEnded); | 174 return m_stopped || (m_readyState == MediaStreamSource::ReadyStateEnded); |
| 175 } | 175 } |
| 176 | 176 |
| 177 void MediaStreamTrack::sourceChangedState() | 177 void MediaStreamTrack::sourceChangedState() |
| 178 { | 178 { |
| 179 if (ended()) | 179 if (ended()) |
| 180 return; | 180 return; |
| 181 | 181 |
| 182 m_readyState = m_component->source()->readyState(); | 182 m_readyState = m_component->source()->getReadyState(); |
| 183 switch (m_readyState) { | 183 switch (m_readyState) { |
| 184 case MediaStreamSource::ReadyStateLive: | 184 case MediaStreamSource::ReadyStateLive: |
| 185 m_component->setMuted(false); | 185 m_component->setMuted(false); |
| 186 dispatchEvent(Event::create(EventTypeNames::unmute)); | 186 dispatchEvent(Event::create(EventTypeNames::unmute)); |
| 187 break; | 187 break; |
| 188 case MediaStreamSource::ReadyStateMuted: | 188 case MediaStreamSource::ReadyStateMuted: |
| 189 m_component->setMuted(true); | 189 m_component->setMuted(true); |
| 190 dispatchEvent(Event::create(EventTypeNames::mute)); | 190 dispatchEvent(Event::create(EventTypeNames::mute)); |
| 191 break; | 191 break; |
| 192 case MediaStreamSource::ReadyStateEnded: | 192 case MediaStreamSource::ReadyStateEnded: |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 | 259 |
| 260 DEFINE_TRACE(MediaStreamTrack) | 260 DEFINE_TRACE(MediaStreamTrack) |
| 261 { | 261 { |
| 262 visitor->trace(m_registeredMediaStreams); | 262 visitor->trace(m_registeredMediaStreams); |
| 263 visitor->trace(m_component); | 263 visitor->trace(m_component); |
| 264 RefCountedGarbageCollectedEventTargetWithInlineData<MediaStreamTrack>::trace
(visitor); | 264 RefCountedGarbageCollectedEventTargetWithInlineData<MediaStreamTrack>::trace
(visitor); |
| 265 ActiveDOMObject::trace(visitor); | 265 ActiveDOMObject::trace(visitor); |
| 266 } | 266 } |
| 267 | 267 |
| 268 } // namespace blink | 268 } // namespace blink |
| OLD | NEW |