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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 return track; | 53 return track; |
54 } | 54 } |
55 | 55 |
56 MediaStreamTrack::MediaStreamTrack(ExecutionContext* context, | 56 MediaStreamTrack::MediaStreamTrack(ExecutionContext* context, |
57 MediaStreamComponent* component) | 57 MediaStreamComponent* component) |
58 : ActiveScriptWrappable(this), | 58 : ActiveScriptWrappable(this), |
59 ActiveDOMObject(context), | 59 ActiveDOMObject(context), |
60 m_readyState(MediaStreamSource::ReadyStateLive), | 60 m_readyState(MediaStreamSource::ReadyStateLive), |
61 m_isIteratingRegisteredMediaStreams(false), | 61 m_isIteratingRegisteredMediaStreams(false), |
62 m_stopped(false), | 62 m_stopped(false), |
63 m_component(component) | 63 m_component(component), |
64 // The source's constraints aren't yet initialized at creation time. | 64 // The source's constraints aren't yet initialized at creation time. |
65 , | |
66 m_constraints() { | 65 m_constraints() { |
67 m_component->source()->addObserver(this); | 66 m_component->source()->addObserver(this); |
68 } | 67 } |
69 | 68 |
70 MediaStreamTrack::~MediaStreamTrack() {} | 69 MediaStreamTrack::~MediaStreamTrack() {} |
71 | 70 |
72 String MediaStreamTrack::kind() const { | 71 String MediaStreamTrack::kind() const { |
73 DEFINE_STATIC_LOCAL(String, audioKind, ("audio")); | 72 DEFINE_STATIC_LOCAL(String, audioKind, ("audio")); |
74 DEFINE_STATIC_LOCAL(String, videoKind, ("video")); | 73 DEFINE_STATIC_LOCAL(String, videoKind, ("video")); |
75 | 74 |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 } | 274 } |
276 | 275 |
277 DEFINE_TRACE(MediaStreamTrack) { | 276 DEFINE_TRACE(MediaStreamTrack) { |
278 visitor->trace(m_registeredMediaStreams); | 277 visitor->trace(m_registeredMediaStreams); |
279 visitor->trace(m_component); | 278 visitor->trace(m_component); |
280 EventTargetWithInlineData::trace(visitor); | 279 EventTargetWithInlineData::trace(visitor); |
281 ActiveDOMObject::trace(visitor); | 280 ActiveDOMObject::trace(visitor); |
282 } | 281 } |
283 | 282 |
284 } // namespace blink | 283 } // namespace blink |
OLD | NEW |