| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 client_->RemoveTrackByComponent(component); | 97 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& audio_sources, | 104 const MediaStreamSourceVector& audio_sources, |
| 105 const MediaStreamSourceVector& video_sources) | 105 const MediaStreamSourceVector& video_sources) |
| 106 : client_(nullptr), id_(id), active_(true) { | 106 : client_(nullptr), id_(id), active_(true) { |
| 107 ASSERT(id_.length()); | 107 DCHECK(id_.length()); |
| 108 for (size_t i = 0; i < audio_sources.size(); i++) | 108 for (size_t i = 0; i < audio_sources.size(); i++) |
| 109 audio_components_.push_back(MediaStreamComponent::Create(audio_sources[i])); | 109 audio_components_.push_back(MediaStreamComponent::Create(audio_sources[i])); |
| 110 | 110 |
| 111 for (size_t i = 0; i < video_sources.size(); i++) | 111 for (size_t i = 0; i < video_sources.size(); i++) |
| 112 video_components_.push_back(MediaStreamComponent::Create(video_sources[i])); | 112 video_components_.push_back(MediaStreamComponent::Create(video_sources[i])); |
| 113 } | 113 } |
| 114 | 114 |
| 115 MediaStreamDescriptor::MediaStreamDescriptor( | 115 MediaStreamDescriptor::MediaStreamDescriptor( |
| 116 const String& id, | 116 const String& id, |
| 117 const MediaStreamComponentVector& audio_components, | 117 const MediaStreamComponentVector& audio_components, |
| 118 const MediaStreamComponentVector& video_components) | 118 const MediaStreamComponentVector& video_components) |
| 119 : client_(nullptr), id_(id), active_(true) { | 119 : client_(nullptr), id_(id), active_(true) { |
| 120 ASSERT(id_.length()); | 120 DCHECK(id_.length()); |
| 121 for (MediaStreamComponentVector::const_iterator iter = | 121 for (MediaStreamComponentVector::const_iterator iter = |
| 122 audio_components.begin(); | 122 audio_components.begin(); |
| 123 iter != audio_components.end(); ++iter) | 123 iter != audio_components.end(); ++iter) |
| 124 audio_components_.push_back((*iter)); | 124 audio_components_.push_back((*iter)); |
| 125 for (MediaStreamComponentVector::const_iterator iter = | 125 for (MediaStreamComponentVector::const_iterator iter = |
| 126 video_components.begin(); | 126 video_components.begin(); |
| 127 iter != video_components.end(); ++iter) | 127 iter != video_components.end(); ++iter) |
| 128 video_components_.push_back((*iter)); | 128 video_components_.push_back((*iter)); |
| 129 } | 129 } |
| 130 | 130 |
| 131 DEFINE_TRACE(MediaStreamDescriptor) { | 131 DEFINE_TRACE(MediaStreamDescriptor) { |
| 132 visitor->Trace(audio_components_); | 132 visitor->Trace(audio_components_); |
| 133 visitor->Trace(video_components_); | 133 visitor->Trace(video_components_); |
| 134 visitor->Trace(client_); | 134 visitor->Trace(client_); |
| 135 } | 135 } |
| 136 | 136 |
| 137 } // namespace blink | 137 } // namespace blink |
| OLD | NEW |