| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 ExtraDataContainer(PassOwnPtr<WebMediaStream::ExtraData> extraData) : m_extr
aData(extraData) { } | 46 ExtraDataContainer(PassOwnPtr<WebMediaStream::ExtraData> extraData) : m_extr
aData(extraData) { } |
| 47 | 47 |
| 48 WebMediaStream::ExtraData* extraData() { return m_extraData.get(); } | 48 WebMediaStream::ExtraData* extraData() { return m_extraData.get(); } |
| 49 | 49 |
| 50 private: | 50 private: |
| 51 OwnPtr<WebMediaStream::ExtraData> m_extraData; | 51 OwnPtr<WebMediaStream::ExtraData> m_extraData; |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 } // namespace | 54 } // namespace |
| 55 | 55 |
| 56 WebMediaStream::WebMediaStream(const PassRefPtr<MediaStreamDescriptor>& mediaStr
eamDescriptor) | |
| 57 : m_private(mediaStreamDescriptor) | |
| 58 { | |
| 59 } | |
| 60 | |
| 61 WebMediaStream::WebMediaStream(MediaStreamDescriptor* mediaStreamDescriptor) | 56 WebMediaStream::WebMediaStream(MediaStreamDescriptor* mediaStreamDescriptor) |
| 62 : m_private(mediaStreamDescriptor) | 57 : m_private(mediaStreamDescriptor) |
| 63 { | 58 { |
| 64 } | 59 } |
| 65 | 60 |
| 66 void WebMediaStream::reset() | 61 void WebMediaStream::reset() |
| 67 { | 62 { |
| 68 m_private.reset(); | 63 m_private.reset(); |
| 69 } | 64 } |
| 70 | 65 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 ASSERT(!isNull()); | 104 ASSERT(!isNull()); |
| 110 m_private->addRemoteTrack(track); | 105 m_private->addRemoteTrack(track); |
| 111 } | 106 } |
| 112 | 107 |
| 113 void WebMediaStream::removeTrack(const WebMediaStreamTrack& track) | 108 void WebMediaStream::removeTrack(const WebMediaStreamTrack& track) |
| 114 { | 109 { |
| 115 ASSERT(!isNull()); | 110 ASSERT(!isNull()); |
| 116 m_private->removeRemoteTrack(track); | 111 m_private->removeRemoteTrack(track); |
| 117 } | 112 } |
| 118 | 113 |
| 119 WebMediaStream& WebMediaStream::operator=(const PassRefPtr<MediaStreamDescriptor
>& mediaStreamDescriptor) | 114 WebMediaStream& WebMediaStream::operator=(MediaStreamDescriptor* mediaStreamDesc
riptor) |
| 120 { | 115 { |
| 121 m_private = mediaStreamDescriptor; | 116 m_private = mediaStreamDescriptor; |
| 122 return *this; | 117 return *this; |
| 123 } | 118 } |
| 124 | 119 |
| 125 WebMediaStream::operator PassRefPtr<MediaStreamDescriptor>() const | |
| 126 { | |
| 127 return m_private.get(); | |
| 128 } | |
| 129 | |
| 130 WebMediaStream::operator MediaStreamDescriptor*() const | 120 WebMediaStream::operator MediaStreamDescriptor*() const |
| 131 { | 121 { |
| 132 return m_private.get(); | 122 return m_private.get(); |
| 133 } | 123 } |
| 134 | 124 |
| 135 void WebMediaStream::initialize(const WebVector<WebMediaStreamTrack>& audioTrack
s, const WebVector<WebMediaStreamTrack>& videoTracks) | 125 void WebMediaStream::initialize(const WebVector<WebMediaStreamTrack>& audioTrack
s, const WebVector<WebMediaStreamTrack>& videoTracks) |
| 136 { | 126 { |
| 137 initialize(createCanonicalUUIDString(), audioTracks, videoTracks); | 127 initialize(createCanonicalUUIDString(), audioTracks, videoTracks); |
| 138 } | 128 } |
| 139 | 129 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 150 } | 140 } |
| 151 m_private = MediaStreamDescriptor::create(label, audio, video); | 141 m_private = MediaStreamDescriptor::create(label, audio, video); |
| 152 } | 142 } |
| 153 | 143 |
| 154 void WebMediaStream::assign(const WebMediaStream& other) | 144 void WebMediaStream::assign(const WebMediaStream& other) |
| 155 { | 145 { |
| 156 m_private = other.m_private; | 146 m_private = other.m_private; |
| 157 } | 147 } |
| 158 | 148 |
| 159 } // namespace blink | 149 } // namespace blink |
| OLD | NEW |