| 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) 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 2012 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 | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 : m_client(0) | 102 : m_client(0) |
| 103 , m_id(id) | 103 , m_id(id) |
| 104 , m_ended(false) | 104 , m_ended(false) |
| 105 { | 105 { |
| 106 ASSERT(m_id.length()); | 106 ASSERT(m_id.length()); |
| 107 for (size_t i = 0; i < audioSources.size(); i++) | 107 for (size_t i = 0; i < audioSources.size(); i++) |
| 108 m_audioComponents.append(MediaStreamComponent::create(this, audioSou
rces[i])); | 108 m_audioComponents.append(MediaStreamComponent::create(this, audioSou
rces[i])); |
| 109 | 109 |
| 110 for (size_t i = 0; i < videoSources.size(); i++) | 110 for (size_t i = 0; i < videoSources.size(); i++) |
| 111 m_videoComponents.append(MediaStreamComponent::create(this, videoSou
rces[i])); | 111 m_videoComponents.append(MediaStreamComponent::create(this, videoSou
rces[i])); |
| 112 | |
| 113 if (!audioSources.size() && !videoSources.size()) | |
| 114 m_ended = true; | |
| 115 } | 112 } |
| 116 | 113 |
| 117 MediaStreamDescriptor(const String& id, const MediaStreamComponentVector& au
dioComponents, const MediaStreamComponentVector& videoComponents) | 114 MediaStreamDescriptor(const String& id, const MediaStreamComponentVector& au
dioComponents, const MediaStreamComponentVector& videoComponents) |
| 118 : m_client(0) | 115 : m_client(0) |
| 119 , m_id(id) | 116 , m_id(id) |
| 120 , m_ended(false) | 117 , m_ended(false) |
| 121 { | 118 { |
| 122 ASSERT(m_id.length()); | 119 ASSERT(m_id.length()); |
| 123 for (MediaStreamComponentVector::const_iterator iter = audioComponents.b
egin(); iter != audioComponents.end(); ++iter) { | 120 for (MediaStreamComponentVector::const_iterator iter = audioComponents.b
egin(); iter != audioComponents.end(); ++iter) { |
| 124 (*iter)->setStream(this); | 121 (*iter)->setStream(this); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 139 RefPtr<ExtraData> m_extraData; | 136 RefPtr<ExtraData> m_extraData; |
| 140 }; | 137 }; |
| 141 | 138 |
| 142 typedef Vector<RefPtr<MediaStreamDescriptor> > MediaStreamDescriptorVector; | 139 typedef Vector<RefPtr<MediaStreamDescriptor> > MediaStreamDescriptorVector; |
| 143 | 140 |
| 144 } // namespace WebCore | 141 } // namespace WebCore |
| 145 | 142 |
| 146 #endif // ENABLE(MEDIA_STREAM) | 143 #endif // ENABLE(MEDIA_STREAM) |
| 147 | 144 |
| 148 #endif // MediaStreamDescriptor_h | 145 #endif // MediaStreamDescriptor_h |
| OLD | NEW |