Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: media/blink/websourcebuffer_impl.cc

Issue 2050043002: Generate and assign media track ids in demuxers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@use-streamparser-trackid
Patch Set: rebase to ToT Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/blink/webmediaplayer_impl_unittest.cc ('k') | media/filters/chunk_demuxer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « media/blink/webmediaplayer_impl_unittest.cc ('k') | media/filters/chunk_demuxer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698