| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Ericsson AB. All rights reserved. | 2 * Copyright (C) 2011 Ericsson AB. All rights reserved. |
| 3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google Inc. 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 are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 MediaStreamComponent::MediaStreamComponent(const String& id, | 51 MediaStreamComponent::MediaStreamComponent(const String& id, |
| 52 MediaStreamSource* source) | 52 MediaStreamSource* source) |
| 53 : MediaStreamComponent(id, source, true, false) {} | 53 : MediaStreamComponent(id, source, true, false) {} |
| 54 | 54 |
| 55 MediaStreamComponent::MediaStreamComponent(const String& id, | 55 MediaStreamComponent::MediaStreamComponent(const String& id, |
| 56 MediaStreamSource* source, | 56 MediaStreamSource* source, |
| 57 bool enabled, | 57 bool enabled, |
| 58 bool muted) | 58 bool muted) |
| 59 : m_source(source), m_id(id), m_enabled(enabled), m_muted(muted) { | 59 : m_source(source), m_id(id), m_enabled(enabled), m_muted(muted) { |
| 60 DCHECK(m_id.length()); | 60 DCHECK(m_id.length()); |
| 61 ThreadState::current()->registerPreFinalizer(this); | |
| 62 } | 61 } |
| 63 | 62 |
| 64 MediaStreamComponent* MediaStreamComponent::clone() const { | 63 MediaStreamComponent* MediaStreamComponent::clone() const { |
| 65 MediaStreamComponent* clonedComponent = new MediaStreamComponent( | 64 MediaStreamComponent* clonedComponent = new MediaStreamComponent( |
| 66 createCanonicalUUIDString(), source(), m_enabled, m_muted); | 65 createCanonicalUUIDString(), source(), m_enabled, m_muted); |
| 67 // TODO(pbos): Clone |m_trackData| as well. | 66 // TODO(pbos): Clone |m_trackData| as well. |
| 68 // TODO(pbos): Move properties from MediaStreamTrack here so that they are | 67 // TODO(pbos): Move properties from MediaStreamTrack here so that they are |
| 69 // also cloned. Part of crbug:669212 since stopped is currently not carried | 68 // also cloned. Part of crbug:669212 since stopped is currently not carried |
| 70 // over, nor is ended(). | 69 // over, nor is ended(). |
| 71 return clonedComponent; | 70 return clonedComponent; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 webAudioData[i] = bus->channel(i)->mutableData(); | 106 webAudioData[i] = bus->channel(i)->mutableData(); |
| 108 | 107 |
| 109 m_webAudioSourceProvider->provideInput(webAudioData, framesToProcess); | 108 m_webAudioSourceProvider->provideInput(webAudioData, framesToProcess); |
| 110 } | 109 } |
| 111 | 110 |
| 112 DEFINE_TRACE(MediaStreamComponent) { | 111 DEFINE_TRACE(MediaStreamComponent) { |
| 113 visitor->trace(m_source); | 112 visitor->trace(m_source); |
| 114 } | 113 } |
| 115 | 114 |
| 116 } // namespace blink | 115 } // namespace blink |
| OLD | NEW |