Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Unified Diff: Source/WebCore/platform/mediastream/MediaStreamDescriptor.h

Issue 12326102: Merge 142773 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1410/
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/platform/mediastream/MediaStreamComponent.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/platform/mediastream/MediaStreamDescriptor.h
===================================================================
--- Source/WebCore/platform/mediastream/MediaStreamDescriptor.h (revision 143918)
+++ Source/WebCore/platform/mediastream/MediaStreamDescriptor.h (working copy)
@@ -61,6 +61,11 @@
return adoptRef(new MediaStreamDescriptor(id, audioSources, videoSources));
}
+ static PassRefPtr<MediaStreamDescriptor> create(const String& id, const MediaStreamComponentVector& audioComponents, const MediaStreamComponentVector& videoComponents)
+ {
+ return adoptRef(new MediaStreamDescriptor(id, audioComponents, videoComponents));
+ }
+
MediaStreamDescriptorClient* client() const { return m_client; }
void setClient(MediaStreamDescriptorClient* client) { m_client = client; }
@@ -98,6 +103,7 @@
, m_id(id)
, m_ended(false)
{
+ ASSERT(m_id.length());
for (size_t i = 0; i < audioSources.size(); i++)
m_audioComponents.append(MediaStreamComponent::create(this, audioSources[i]));
@@ -105,6 +111,22 @@
m_videoComponents.append(MediaStreamComponent::create(this, videoSources[i]));
}
+ MediaStreamDescriptor(const String& id, const MediaStreamComponentVector& audioComponents, const MediaStreamComponentVector& videoComponents)
+ : m_client(0)
+ , m_id(id)
+ , m_ended(false)
+ {
+ ASSERT(m_id.length());
+ for (MediaStreamComponentVector::const_iterator iter = audioComponents.begin(); iter != audioComponents.end(); ++iter) {
+ (*iter)->setStream(this);
+ m_audioComponents.append((*iter));
+ }
+ for (MediaStreamComponentVector::const_iterator iter = videoComponents.begin(); iter != videoComponents.end(); ++iter) {
+ (*iter)->setStream(this);
+ m_videoComponents.append((*iter));
+ }
+ }
+
MediaStreamDescriptorClient* m_client;
String m_id;
Vector<RefPtr<MediaStreamComponent> > m_audioComponents;
« no previous file with comments | « Source/WebCore/platform/mediastream/MediaStreamComponent.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698