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

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

Issue 2339193002: Wip - cl for implemening VideoTrackSource::ApplyConstraints(constraints, VideoTrack) and adopt safe…
Patch Set: Created 4 years, 3 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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 255
256 // Create a new webkit video track. 256 // Create a new webkit video track.
257 blink::WebMediaStreamSource webkit_source; 257 blink::WebMediaStreamSource webkit_source;
258 blink::WebMediaStreamSource::Type type = 258 blink::WebMediaStreamSource::Type type =
259 blink::WebMediaStreamSource::TypeVideo; 259 blink::WebMediaStreamSource::TypeVideo;
260 blink::WebString webkit_track_id = base::UTF8ToUTF16(track_id); 260 blink::WebString webkit_track_id = base::UTF8ToUTF16(track_id);
261 webkit_source.initialize(webkit_track_id, type, webkit_track_id, 261 webkit_source.initialize(webkit_track_id, type, webkit_track_id,
262 false /* remote */); 262 false /* remote */);
263 webkit_source.setExtraData(writer); 263 webkit_source.setExtraData(writer);
264 264
265 blink::WebMediaConstraints constraints; 265 stream.addTrack(MediaStreamVideoTrack::CreateVideoTrack(writer));
266 constraints.initialize();
267 bool track_enabled = true;
268
269 stream.addTrack(MediaStreamVideoTrack::CreateVideoTrack(
270 writer, constraints, MediaStreamVideoSource::ConstraintsCallback(),
271 track_enabled));
272 266
273 *frame_writer = new PpFrameWriterProxy(writer->AsWeakPtr()); 267 *frame_writer = new PpFrameWriterProxy(writer->AsWeakPtr());
274 return true; 268 return true;
275 } 269 }
276 270
277 } // namespace content 271 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_video_track.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