Index: Source/WebCore/platform/mediastream/MediaStreamComponent.h |
=================================================================== |
--- Source/WebCore/platform/mediastream/MediaStreamComponent.h (revision 143918) |
+++ Source/WebCore/platform/mediastream/MediaStreamComponent.h (working copy) |
@@ -44,12 +44,17 @@ |
public: |
static PassRefPtr<MediaStreamComponent> create(PassRefPtr<MediaStreamSource> source) |
{ |
- return adoptRef(new MediaStreamComponent(0, source)); |
+ return adoptRef(new MediaStreamComponent(createCanonicalUUIDString(), 0, source)); |
} |
+ static PassRefPtr<MediaStreamComponent> create(const String& id, PassRefPtr<MediaStreamSource> source) |
+ { |
+ return adoptRef(new MediaStreamComponent(id, 0, source)); |
+ } |
+ |
static PassRefPtr<MediaStreamComponent> create(MediaStreamDescriptor* stream, PassRefPtr<MediaStreamSource> source) |
{ |
- return adoptRef(new MediaStreamComponent(stream, source)); |
+ return adoptRef(new MediaStreamComponent(createCanonicalUUIDString(), stream, source)); |
} |
MediaStreamDescriptor* stream() const { return m_stream; } |
@@ -62,12 +67,13 @@ |
void setEnabled(bool enabled) { m_enabled = enabled; } |
private: |
- MediaStreamComponent(MediaStreamDescriptor* stream, PassRefPtr<MediaStreamSource> source) |
+ MediaStreamComponent(const String& id, MediaStreamDescriptor* stream, PassRefPtr<MediaStreamSource> source) |
: m_stream(stream) |
, m_source(source) |
- , m_id(createCanonicalUUIDString()) |
+ , m_id(id) |
, m_enabled(true) |
{ |
+ ASSERT(m_id.length()); |
} |
MediaStreamDescriptor* m_stream; |
@@ -76,6 +82,8 @@ |
bool m_enabled; |
}; |
+typedef Vector<RefPtr<MediaStreamComponent> > MediaStreamComponentVector; |
+ |
} // namespace WebCore |
#endif // ENABLE(MEDIA_STREAM) |