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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 | 106 |
107 void WebMediaStream::videoTracks(WebVector<WebMediaStreamTrack>& webTracks) cons
t | 107 void WebMediaStream::videoTracks(WebVector<WebMediaStreamTrack>& webTracks) cons
t |
108 { | 108 { |
109 size_t numberOfTracks = m_private->numberOfVideoComponents(); | 109 size_t numberOfTracks = m_private->numberOfVideoComponents(); |
110 WebVector<WebMediaStreamTrack> result(numberOfTracks); | 110 WebVector<WebMediaStreamTrack> result(numberOfTracks); |
111 for (size_t i = 0; i < numberOfTracks; ++i) | 111 for (size_t i = 0; i < numberOfTracks; ++i) |
112 result[i] = m_private->videoComponent(i); | 112 result[i] = m_private->videoComponent(i); |
113 webTracks.swap(result); | 113 webTracks.swap(result); |
114 } | 114 } |
115 | 115 |
| 116 void WebMediaStream::addTrack(const WebMediaStreamTrack& track) |
| 117 { |
| 118 ASSERT(!isNull()); |
| 119 m_private->addRemoteTrack(track); |
| 120 } |
| 121 |
| 122 void WebMediaStream::removeTrack(const WebMediaStreamTrack& track) |
| 123 { |
| 124 ASSERT(!isNull()); |
| 125 m_private->removeRemoteTrack(track); |
| 126 } |
| 127 |
116 WebMediaStream& WebMediaStream::operator=(const PassRefPtr<WebCore::MediaStreamD
escriptor>& mediaStreamDescriptor) | 128 WebMediaStream& WebMediaStream::operator=(const PassRefPtr<WebCore::MediaStreamD
escriptor>& mediaStreamDescriptor) |
117 { | 129 { |
118 m_private = mediaStreamDescriptor; | 130 m_private = mediaStreamDescriptor; |
119 return *this; | 131 return *this; |
120 } | 132 } |
121 | 133 |
122 WebMediaStream::operator PassRefPtr<WebCore::MediaStreamDescriptor>() const | 134 WebMediaStream::operator PassRefPtr<WebCore::MediaStreamDescriptor>() const |
123 { | 135 { |
124 return m_private.get(); | 136 return m_private.get(); |
125 } | 137 } |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 } | 175 } |
164 | 176 |
165 void WebMediaStream::assign(const WebMediaStream& other) | 177 void WebMediaStream::assign(const WebMediaStream& other) |
166 { | 178 { |
167 m_private = other.m_private; | 179 m_private = other.m_private; |
168 } | 180 } |
169 | 181 |
170 } // namespace WebKit | 182 } // namespace WebKit |
171 | 183 |
172 #endif // ENABLE(MEDIA_STREAM) | 184 #endif // ENABLE(MEDIA_STREAM) |
OLD | NEW |