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

Side by Side Diff: content/renderer/media/webrtc/video_destination_handler.cc

Issue 1124263004: New resolution change policies for desktop and tab capture. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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/webrtc/video_destination_handler.h" 5 #include "content/renderer/media/webrtc/video_destination_handler.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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 DCHECK(CalledOnValidThread()); 84 DCHECK(CalledOnValidThread());
85 DVLOG(3) << "PpFrameWriter::GetCurrentSupportedFormats()"; 85 DVLOG(3) << "PpFrameWriter::GetCurrentSupportedFormats()";
86 // Since the input is free to change the resolution at any point in time 86 // Since the input is free to change the resolution at any point in time
87 // the supported formats are unknown. 87 // the supported formats are unknown.
88 media::VideoCaptureFormats formats; 88 media::VideoCaptureFormats formats;
89 callback.Run(formats); 89 callback.Run(formats);
90 } 90 }
91 91
92 void PpFrameWriter::StartSourceImpl( 92 void PpFrameWriter::StartSourceImpl(
93 const media::VideoCaptureFormat& format, 93 const media::VideoCaptureFormat& format,
94 const blink::WebMediaConstraints& constraints,
94 const VideoCaptureDeliverFrameCB& frame_callback) { 95 const VideoCaptureDeliverFrameCB& frame_callback) {
95 DCHECK(CalledOnValidThread()); 96 DCHECK(CalledOnValidThread());
96 DCHECK(!delegate_.get()); 97 DCHECK(!delegate_.get());
97 DVLOG(3) << "PpFrameWriter::StartSourceImpl()"; 98 DVLOG(3) << "PpFrameWriter::StartSourceImpl()";
98 delegate_ = new FrameWriterDelegate(io_message_loop(), frame_callback); 99 delegate_ = new FrameWriterDelegate(io_message_loop(), frame_callback);
99 OnStartDone(MEDIA_DEVICE_OK); 100 OnStartDone(MEDIA_DEVICE_OK);
100 } 101 }
101 102
102 void PpFrameWriter::StopSourceImpl() { 103 void PpFrameWriter::StopSourceImpl() {
103 DCHECK(CalledOnValidThread()); 104 DCHECK(CalledOnValidThread());
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 228
228 stream.addTrack(MediaStreamVideoTrack::CreateVideoTrack( 229 stream.addTrack(MediaStreamVideoTrack::CreateVideoTrack(
229 writer, constraints, MediaStreamVideoSource::ConstraintsCallback(), 230 writer, constraints, MediaStreamVideoSource::ConstraintsCallback(),
230 track_enabled)); 231 track_enabled));
231 232
232 *frame_writer = new PpFrameWriterProxy(writer->AsWeakPtr()); 233 *frame_writer = new PpFrameWriterProxy(writer->AsWeakPtr());
233 return true; 234 return true;
234 } 235 }
235 236
236 } // namespace content 237 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698