| 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 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 #include "core/platform/mediastream/MediaStreamComponent.h" | 34 #include "core/platform/mediastream/MediaStreamComponent.h" |
| 35 | 35 |
| 36 #include "core/platform/UUID.h" | 36 #include "core/platform/UUID.h" |
| 37 #include "core/platform/mediastream/MediaStreamSource.h" | 37 #include "core/platform/mediastream/MediaStreamSource.h" |
| 38 | 38 |
| 39 namespace WebCore { | 39 namespace WebCore { |
| 40 | 40 |
| 41 PassRefPtr<MediaStreamComponent> MediaStreamComponent::create(PassRefPtr<MediaSt
reamSource> source) | 41 PassRefPtr<MediaStreamComponent> MediaStreamComponent::create(PassRefPtr<MediaSt
reamSource> source) |
| 42 { | 42 { |
| 43 return adoptRef(new MediaStreamComponent(createCanonicalUUIDString(), source
)); | 43 return adoptRef(new MediaStreamComponent(createCanonicalUUIDString(), 0, sou
rce)); |
| 44 } | 44 } |
| 45 | 45 |
| 46 PassRefPtr<MediaStreamComponent> MediaStreamComponent::create(const String& id,
PassRefPtr<MediaStreamSource> source) | 46 PassRefPtr<MediaStreamComponent> MediaStreamComponent::create(const String& id,
PassRefPtr<MediaStreamSource> source) |
| 47 { | 47 { |
| 48 return adoptRef(new MediaStreamComponent(id, source)); | 48 return adoptRef(new MediaStreamComponent(id, 0, source)); |
| 49 } | 49 } |
| 50 | 50 |
| 51 PassRefPtr<MediaStreamComponent> MediaStreamComponent::create(WebKit::WebMediaSt
ream stream, PassRefPtr<MediaStreamSource> source) | 51 PassRefPtr<MediaStreamComponent> MediaStreamComponent::create(MediaStreamDescrip
tor* stream, PassRefPtr<MediaStreamSource> source) |
| 52 { | 52 { |
| 53 return adoptRef(new MediaStreamComponent(createCanonicalUUIDString(), stream
, source)); | 53 return adoptRef(new MediaStreamComponent(createCanonicalUUIDString(), stream
, source)); |
| 54 } | 54 } |
| 55 | 55 |
| 56 MediaStreamComponent::MediaStreamComponent(const String& id, WebKit::WebMediaStr
eam stream, PassRefPtr<MediaStreamSource> source) | 56 MediaStreamComponent::MediaStreamComponent(const String& id, MediaStreamDescript
or* stream, PassRefPtr<MediaStreamSource> source) |
| 57 : m_stream(stream) | 57 : m_stream(stream) |
| 58 , m_source(source) | 58 , m_source(source) |
| 59 , m_id(id) | 59 , m_id(id) |
| 60 , m_enabled(true) | 60 , m_enabled(true) |
| 61 { | 61 { |
| 62 ASSERT(m_id.length()); | 62 ASSERT(m_id.length()); |
| 63 } | 63 } |
| 64 | 64 |
| 65 MediaStreamComponent::MediaStreamComponent(const String& id, PassRefPtr<MediaStr
eamSource> source) | |
| 66 : m_source(source) | |
| 67 , m_id(id) | |
| 68 , m_enabled(true) | |
| 69 { | |
| 70 ASSERT(m_id.length()); | |
| 71 } | |
| 72 | |
| 73 } // namespace WebCore | 65 } // namespace WebCore |
| 74 | 66 |
| OLD | NEW |