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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 for (const auto& track : tracks->tracks()) { | 182 for (const auto& track : tracks->tracks()) { |
183 blink::WebSourceBufferClient::MediaTrackInfo trackInfo; | 183 blink::WebSourceBufferClient::MediaTrackInfo trackInfo; |
184 trackInfo.trackType = mediaTrackTypeToBlink(track->type()); | 184 trackInfo.trackType = mediaTrackTypeToBlink(track->type()); |
185 trackInfo.byteStreamTrackId = blink::WebString::fromUTF8(track->id()); | 185 trackInfo.byteStreamTrackId = blink::WebString::fromUTF8(track->id()); |
186 trackInfo.kind = blink::WebString::fromUTF8(track->kind()); | 186 trackInfo.kind = blink::WebString::fromUTF8(track->kind()); |
187 trackInfo.label = blink::WebString::fromUTF8(track->label()); | 187 trackInfo.label = blink::WebString::fromUTF8(track->label()); |
188 trackInfo.language = blink::WebString::fromUTF8(track->language()); | 188 trackInfo.language = blink::WebString::fromUTF8(track->language()); |
189 trackInfoVector.push_back(trackInfo); | 189 trackInfoVector.push_back(trackInfo); |
190 } | 190 } |
191 | 191 |
192 client_->initializationSegmentReceived(trackInfoVector); | 192 blink::WebVector<blink::WebMediaPlayer::TrackId> blinkTrackIds = |
| 193 client_->initializationSegmentReceived(trackInfoVector); |
| 194 |
| 195 std::vector<blink::WebMediaPlayer::TrackId> blinkTrackIdsVector; |
| 196 for (const auto& id : blinkTrackIds) |
| 197 blinkTrackIdsVector.push_back(id); |
| 198 |
| 199 demuxer_->OnTrackIdsAssigned(*tracks.get(), blinkTrackIdsVector); |
193 } | 200 } |
194 | 201 |
195 } // namespace media | 202 } // namespace media |
OLD | NEW |