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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 if (m_client) | 94 if (m_client) |
95 m_client->removeRemoteTrack(component); | 95 m_client->removeRemoteTrack(component); |
96 else | 96 else |
97 removeComponent(component); | 97 removeComponent(component); |
98 } | 98 } |
99 | 99 |
100 MediaStreamDescriptor::MediaStreamDescriptor(const String& id, const MediaStream
SourceVector& audioSources, const MediaStreamSourceVector& videoSources) | 100 MediaStreamDescriptor::MediaStreamDescriptor(const String& id, const MediaStream
SourceVector& audioSources, const MediaStreamSourceVector& videoSources) |
101 : m_client(nullptr) | 101 : m_client(nullptr) |
102 , m_id(id) | 102 , m_id(id) |
103 , m_active(true) | 103 , m_active(true) |
104 , m_ended(false) | |
105 { | 104 { |
106 ASSERT(m_id.length()); | 105 ASSERT(m_id.length()); |
107 for (size_t i = 0; i < audioSources.size(); i++) | 106 for (size_t i = 0; i < audioSources.size(); i++) |
108 m_audioComponents.append(MediaStreamComponent::create(audioSources[i])); | 107 m_audioComponents.append(MediaStreamComponent::create(audioSources[i])); |
109 | 108 |
110 for (size_t i = 0; i < videoSources.size(); i++) | 109 for (size_t i = 0; i < videoSources.size(); i++) |
111 m_videoComponents.append(MediaStreamComponent::create(videoSources[i])); | 110 m_videoComponents.append(MediaStreamComponent::create(videoSources[i])); |
112 } | 111 } |
113 | 112 |
114 MediaStreamDescriptor::MediaStreamDescriptor(const String& id, const MediaStream
ComponentVector& audioComponents, const MediaStreamComponentVector& videoCompone
nts) | 113 MediaStreamDescriptor::MediaStreamDescriptor(const String& id, const MediaStream
ComponentVector& audioComponents, const MediaStreamComponentVector& videoCompone
nts) |
115 : m_client(nullptr) | 114 : m_client(nullptr) |
116 , m_id(id) | 115 , m_id(id) |
117 , m_active(true) | 116 , m_active(true) |
118 , m_ended(false) | |
119 { | 117 { |
120 ASSERT(m_id.length()); | 118 ASSERT(m_id.length()); |
121 for (MediaStreamComponentVector::const_iterator iter = audioComponents.begin
(); iter != audioComponents.end(); ++iter) | 119 for (MediaStreamComponentVector::const_iterator iter = audioComponents.begin
(); iter != audioComponents.end(); ++iter) |
122 m_audioComponents.append((*iter)); | 120 m_audioComponents.append((*iter)); |
123 for (MediaStreamComponentVector::const_iterator iter = videoComponents.begin
(); iter != videoComponents.end(); ++iter) | 121 for (MediaStreamComponentVector::const_iterator iter = videoComponents.begin
(); iter != videoComponents.end(); ++iter) |
124 m_videoComponents.append((*iter)); | 122 m_videoComponents.append((*iter)); |
125 } | 123 } |
126 | 124 |
127 DEFINE_TRACE(MediaStreamDescriptor) | 125 DEFINE_TRACE(MediaStreamDescriptor) |
128 { | 126 { |
129 visitor->trace(m_audioComponents); | 127 visitor->trace(m_audioComponents); |
130 visitor->trace(m_videoComponents); | 128 visitor->trace(m_videoComponents); |
131 visitor->trace(m_client); | 129 visitor->trace(m_client); |
132 } | 130 } |
133 | 131 |
134 } // namespace blink | 132 } // namespace blink |
OLD | NEW |