OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "media/blink/websourcebuffer_impl.h" | 5 #include "media/blink/websourcebuffer_impl.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <cmath> | 9 #include <cmath> |
10 #include <limits> | 10 #include <limits> |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 | 176 |
177 void WebSourceBufferImpl::InitSegmentReceived( | 177 void WebSourceBufferImpl::InitSegmentReceived( |
178 std::unique_ptr<MediaTracks> tracks) { | 178 std::unique_ptr<MediaTracks> tracks) { |
179 DCHECK(tracks.get()); | 179 DCHECK(tracks.get()); |
180 DVLOG(1) << __FUNCTION__ << " tracks=" << tracks->tracks().size(); | 180 DVLOG(1) << __FUNCTION__ << " tracks=" << tracks->tracks().size(); |
181 | 181 |
182 std::vector<blink::WebSourceBufferClient::MediaTrackInfo> trackInfoVector; | 182 std::vector<blink::WebSourceBufferClient::MediaTrackInfo> trackInfoVector; |
183 for (const auto& track : tracks->tracks()) { | 183 for (const auto& track : tracks->tracks()) { |
184 blink::WebSourceBufferClient::MediaTrackInfo trackInfo; | 184 blink::WebSourceBufferClient::MediaTrackInfo trackInfo; |
185 trackInfo.trackType = mediaTrackTypeToBlink(track->type()); | 185 trackInfo.trackType = mediaTrackTypeToBlink(track->type()); |
186 trackInfo.byteStreamTrackId = blink::WebString::fromUTF8( | 186 trackInfo.id = blink::WebString::fromUTF8(track->id()); |
187 base::UintToString(track->bytestream_track_id())); | |
188 trackInfo.kind = blink::WebString::fromUTF8(track->kind()); | 187 trackInfo.kind = blink::WebString::fromUTF8(track->kind()); |
189 trackInfo.label = blink::WebString::fromUTF8(track->label()); | 188 trackInfo.label = blink::WebString::fromUTF8(track->label()); |
190 trackInfo.language = blink::WebString::fromUTF8(track->language()); | 189 trackInfo.language = blink::WebString::fromUTF8(track->language()); |
191 trackInfoVector.push_back(trackInfo); | 190 trackInfoVector.push_back(trackInfo); |
192 } | 191 } |
193 | 192 |
194 client_->initializationSegmentReceived(trackInfoVector); | 193 client_->initializationSegmentReceived(trackInfoVector); |
195 } | 194 } |
196 | 195 |
197 } // namespace media | 196 } // namespace media |
OLD | NEW |