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

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

Issue 1904253002: Convert //media/blink from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/websourcebuffer_impl.h ('k') | no next file » | 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 return blink::WebMediaPlayer::AudioTrack; 166 return blink::WebMediaPlayer::AudioTrack;
167 case MediaTrack::Text: 167 case MediaTrack::Text:
168 return blink::WebMediaPlayer::TextTrack; 168 return blink::WebMediaPlayer::TextTrack;
169 case MediaTrack::Video: 169 case MediaTrack::Video:
170 return blink::WebMediaPlayer::VideoTrack; 170 return blink::WebMediaPlayer::VideoTrack;
171 } 171 }
172 NOTREACHED(); 172 NOTREACHED();
173 return blink::WebMediaPlayer::AudioTrack; 173 return blink::WebMediaPlayer::AudioTrack;
174 } 174 }
175 175
176 void WebSourceBufferImpl::InitSegmentReceived(scoped_ptr<MediaTracks> tracks) { 176 void WebSourceBufferImpl::InitSegmentReceived(
177 std::unique_ptr<MediaTracks> tracks) {
177 DCHECK(tracks.get()); 178 DCHECK(tracks.get());
178 DVLOG(1) << __FUNCTION__ << " tracks=" << tracks->tracks().size(); 179 DVLOG(1) << __FUNCTION__ << " tracks=" << tracks->tracks().size();
179 180
180 std::vector<blink::WebSourceBufferClient::MediaTrackInfo> trackInfoVector; 181 std::vector<blink::WebSourceBufferClient::MediaTrackInfo> trackInfoVector;
181 for (const auto& track : tracks->tracks()) { 182 for (const auto& track : tracks->tracks()) {
182 blink::WebSourceBufferClient::MediaTrackInfo trackInfo; 183 blink::WebSourceBufferClient::MediaTrackInfo trackInfo;
183 trackInfo.trackType = mediaTrackTypeToBlink(track->type()); 184 trackInfo.trackType = mediaTrackTypeToBlink(track->type());
184 trackInfo.byteStreamTrackId = blink::WebString::fromUTF8(track->id()); 185 trackInfo.byteStreamTrackId = blink::WebString::fromUTF8(track->id());
185 trackInfo.kind = blink::WebString::fromUTF8(track->kind()); 186 trackInfo.kind = blink::WebString::fromUTF8(track->kind());
186 trackInfo.label = blink::WebString::fromUTF8(track->label()); 187 trackInfo.label = blink::WebString::fromUTF8(track->label());
187 trackInfo.language = blink::WebString::fromUTF8(track->language()); 188 trackInfo.language = blink::WebString::fromUTF8(track->language());
188 trackInfoVector.push_back(trackInfo); 189 trackInfoVector.push_back(trackInfo);
189 } 190 }
190 191
191 client_->initializationSegmentReceived(trackInfoVector); 192 client_->initializationSegmentReceived(trackInfoVector);
192 } 193 }
193 194
194 } // namespace media 195 } // namespace media
OLDNEW
« no previous file with comments | « media/blink/websourcebuffer_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698