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

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

Issue 1678523003: Implement InitSegmentReceived algorithm in blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@blink-sb-audiotrack
Patch Set: Don't check track ids in tests Created 4 years, 5 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 | « no previous file | third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-avtracks.html » ('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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-avtracks.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698