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