| 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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 void WebSourceBufferImpl::InitSegmentReceived( | 178 void WebSourceBufferImpl::InitSegmentReceived( |
| 179 std::unique_ptr<MediaTracks> tracks) { | 179 std::unique_ptr<MediaTracks> tracks) { |
| 180 DCHECK(tracks.get()); | 180 DCHECK(tracks.get()); |
| 181 DVLOG(1) << __FUNCTION__ << " tracks=" << tracks->tracks().size(); | 181 DVLOG(1) << __FUNCTION__ << " tracks=" << tracks->tracks().size(); |
| 182 | 182 |
| 183 std::vector<blink::WebSourceBufferClient::MediaTrackInfo> trackInfoVector; | 183 std::vector<blink::WebSourceBufferClient::MediaTrackInfo> trackInfoVector; |
| 184 for (const auto& track : tracks->tracks()) { | 184 for (const auto& track : tracks->tracks()) { |
| 185 blink::WebSourceBufferClient::MediaTrackInfo trackInfo; | 185 blink::WebSourceBufferClient::MediaTrackInfo trackInfo; |
| 186 trackInfo.trackType = mediaTrackTypeToBlink(track->type()); | 186 trackInfo.trackType = mediaTrackTypeToBlink(track->type()); |
| 187 trackInfo.id = blink::WebString::fromUTF8(track->id()); | 187 trackInfo.id = blink::WebString::fromUTF8(track->id()); |
| 188 trackInfo.byteStreamTrackID = blink::WebString::fromUTF8( |
| 189 base::UintToString(track->bytestream_track_id())); |
| 188 trackInfo.kind = blink::WebString::fromUTF8(track->kind()); | 190 trackInfo.kind = blink::WebString::fromUTF8(track->kind()); |
| 189 trackInfo.label = blink::WebString::fromUTF8(track->label()); | 191 trackInfo.label = blink::WebString::fromUTF8(track->label()); |
| 190 trackInfo.language = blink::WebString::fromUTF8(track->language()); | 192 trackInfo.language = blink::WebString::fromUTF8(track->language()); |
| 191 trackInfoVector.push_back(trackInfo); | 193 trackInfoVector.push_back(trackInfo); |
| 192 } | 194 } |
| 193 | 195 |
| 194 client_->initializationSegmentReceived(trackInfoVector); | 196 client_->initializationSegmentReceived(trackInfoVector); |
| 195 } | 197 } |
| 196 | 198 |
| 197 } // namespace media | 199 } // namespace media |
| OLD | NEW |