| 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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 bool MediaStreamTrack::ended() const | 169 bool MediaStreamTrack::ended() const |
| 170 { | 170 { |
| 171 return !executionContext() || (m_readyState == MediaStreamSource::ReadyState
Ended); | 171 return !executionContext() || (m_readyState == MediaStreamSource::ReadyState
Ended); |
| 172 } | 172 } |
| 173 | 173 |
| 174 void MediaStreamTrack::sourceChangedState() | 174 void MediaStreamTrack::sourceChangedState() |
| 175 { | 175 { |
| 176 if (ended()) | 176 if (ended()) |
| 177 return; | 177 return; |
| 178 | 178 |
| 179 m_readyState = m_component->source()->readyState(); | 179 m_readyState = m_component->source()->getReadyState(); |
| 180 switch (m_readyState) { | 180 switch (m_readyState) { |
| 181 case MediaStreamSource::ReadyStateLive: | 181 case MediaStreamSource::ReadyStateLive: |
| 182 m_component->setMuted(false); | 182 m_component->setMuted(false); |
| 183 dispatchEvent(Event::create(EventTypeNames::unmute)); | 183 dispatchEvent(Event::create(EventTypeNames::unmute)); |
| 184 break; | 184 break; |
| 185 case MediaStreamSource::ReadyStateMuted: | 185 case MediaStreamSource::ReadyStateMuted: |
| 186 m_component->setMuted(true); | 186 m_component->setMuted(true); |
| 187 dispatchEvent(Event::create(EventTypeNames::mute)); | 187 dispatchEvent(Event::create(EventTypeNames::mute)); |
| 188 break; | 188 break; |
| 189 case MediaStreamSource::ReadyStateEnded: | 189 case MediaStreamSource::ReadyStateEnded: |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 | 251 |
| 252 DEFINE_TRACE(MediaStreamTrack) | 252 DEFINE_TRACE(MediaStreamTrack) |
| 253 { | 253 { |
| 254 visitor->trace(m_registeredMediaStreams); | 254 visitor->trace(m_registeredMediaStreams); |
| 255 visitor->trace(m_component); | 255 visitor->trace(m_component); |
| 256 RefCountedGarbageCollectedEventTargetWithInlineData<MediaStreamTrack>::trace
(visitor); | 256 RefCountedGarbageCollectedEventTargetWithInlineData<MediaStreamTrack>::trace
(visitor); |
| 257 ContextLifecycleObserver::trace(visitor); | 257 ContextLifecycleObserver::trace(visitor); |
| 258 } | 258 } |
| 259 | 259 |
| 260 } // namespace blink | 260 } // namespace blink |
| OLD | NEW |