| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 break; | 68 break; |
| 69 } | 69 } |
| 70 } | 70 } |
| 71 | 71 |
| 72 void MediaStreamDescriptor::removeComponent(MediaStreamComponent* component) { | 72 void MediaStreamDescriptor::removeComponent(MediaStreamComponent* component) { |
| 73 size_t pos = kNotFound; | 73 size_t pos = kNotFound; |
| 74 switch (component->source()->type()) { | 74 switch (component->source()->type()) { |
| 75 case MediaStreamSource::TypeAudio: | 75 case MediaStreamSource::TypeAudio: |
| 76 pos = m_audioComponents.find(component); | 76 pos = m_audioComponents.find(component); |
| 77 if (pos != kNotFound) | 77 if (pos != kNotFound) |
| 78 m_audioComponents.remove(pos); | 78 m_audioComponents.erase(pos); |
| 79 break; | 79 break; |
| 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.erase(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->addTrackByComponent(component); | 90 m_client->addTrackByComponent(component); |
| 91 else | 91 else |
| 92 addComponent(component); | 92 addComponent(component); |
| 93 } | 93 } |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after 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 |