OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |