| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 case MediaStreamSource::TypeVideo: | 80 case MediaStreamSource::TypeVideo: |
| 81 pos = m_videoComponents.find(component); | 81 pos = m_videoComponents.find(component); |
| 82 if (pos != kNotFound) | 82 if (pos != kNotFound) |
| 83 m_videoComponents.remove(pos); | 83 m_videoComponents.remove(pos); |
| 84 break; | 84 break; |
| 85 } | 85 } |
| 86 } | 86 } |
| 87 | 87 |
| 88 void MediaStreamDescriptor::addRemoteTrack(MediaStreamComponent* component) { | 88 void MediaStreamDescriptor::addRemoteTrack(MediaStreamComponent* component) { |
| 89 if (m_client) | 89 if (m_client) |
| 90 m_client->addRemoteTrack(component); | 90 m_client->addTrackByComponent(component); |
| 91 else | 91 else |
| 92 addComponent(component); | 92 addComponent(component); |
| 93 } | 93 } |
| 94 | 94 |
| 95 void MediaStreamDescriptor::removeRemoteTrack(MediaStreamComponent* component) { | 95 void MediaStreamDescriptor::removeRemoteTrack(MediaStreamComponent* component) { |
| 96 if (m_client) | 96 if (m_client) |
| 97 m_client->removeRemoteTrack(component); | 97 m_client->removeTrackByComponent(component); |
| 98 else | 98 else |
| 99 removeComponent(component); | 99 removeComponent(component); |
| 100 } | 100 } |
| 101 | 101 |
| 102 MediaStreamDescriptor::MediaStreamDescriptor( | 102 MediaStreamDescriptor::MediaStreamDescriptor( |
| 103 const String& id, | 103 const String& id, |
| 104 const MediaStreamSourceVector& audioSources, | 104 const MediaStreamSourceVector& audioSources, |
| 105 const MediaStreamSourceVector& videoSources) | 105 const MediaStreamSourceVector& videoSources) |
| 106 : m_client(nullptr), m_id(id), m_active(true) { | 106 : m_client(nullptr), m_id(id), m_active(true) { |
| 107 ASSERT(m_id.length()); | 107 ASSERT(m_id.length()); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 128 m_videoComponents.push_back((*iter)); | 128 m_videoComponents.push_back((*iter)); |
| 129 } | 129 } |
| 130 | 130 |
| 131 DEFINE_TRACE(MediaStreamDescriptor) { | 131 DEFINE_TRACE(MediaStreamDescriptor) { |
| 132 visitor->trace(m_audioComponents); | 132 visitor->trace(m_audioComponents); |
| 133 visitor->trace(m_videoComponents); | 133 visitor->trace(m_videoComponents); |
| 134 visitor->trace(m_client); | 134 visitor->trace(m_client); |
| 135 } | 135 } |
| 136 | 136 |
| 137 } // namespace blink | 137 } // namespace blink |
| OLD | NEW |