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

Side by Side Diff: content/renderer/media/pepper_to_video_track_adapter.cc

Issue 1915793002: Remove a |readonly| member of MediaStreamTrack (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove a |readonly| argument in unittest files Created 4 years, 7 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "content/renderer/media/pepper_to_video_track_adapter.h" 5 #include "content/renderer/media/pepper_to_video_track_adapter.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 base::Base64Encode(base::RandBytesAsString(64), &track_id); 251 base::Base64Encode(base::RandBytesAsString(64), &track_id);
252 252
253 PpFrameWriter* writer = new PpFrameWriter(); 253 PpFrameWriter* writer = new PpFrameWriter();
254 254
255 // Create a new webkit video track. 255 // Create a new webkit video track.
256 blink::WebMediaStreamSource webkit_source; 256 blink::WebMediaStreamSource webkit_source;
257 blink::WebMediaStreamSource::Type type = 257 blink::WebMediaStreamSource::Type type =
258 blink::WebMediaStreamSource::TypeVideo; 258 blink::WebMediaStreamSource::TypeVideo;
259 blink::WebString webkit_track_id = base::UTF8ToUTF16(track_id); 259 blink::WebString webkit_track_id = base::UTF8ToUTF16(track_id);
260 webkit_source.initialize(webkit_track_id, type, webkit_track_id, 260 webkit_source.initialize(webkit_track_id, type, webkit_track_id,
261 false /* remote */, true /* readonly */); 261 false /* remote */);
262 webkit_source.setExtraData(writer); 262 webkit_source.setExtraData(writer);
263 263
264 blink::WebMediaConstraints constraints; 264 blink::WebMediaConstraints constraints;
265 constraints.initialize(); 265 constraints.initialize();
266 bool track_enabled = true; 266 bool track_enabled = true;
267 267
268 stream.addTrack(MediaStreamVideoTrack::CreateVideoTrack( 268 stream.addTrack(MediaStreamVideoTrack::CreateVideoTrack(
269 writer, constraints, MediaStreamVideoSource::ConstraintsCallback(), 269 writer, constraints, MediaStreamVideoSource::ConstraintsCallback(),
270 track_enabled)); 270 track_enabled));
271 271
272 *frame_writer = new PpFrameWriterProxy(writer->AsWeakPtr()); 272 *frame_writer = new PpFrameWriterProxy(writer->AsWeakPtr());
273 return true; 273 return true;
274 } 274 }
275 275
276 } // namespace content 276 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/mock_media_stream_registry.cc ('k') | content/renderer/media/remote_media_stream_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698