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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 // Since the input is free to change the resolution at any point in time | 90 // Since the input is free to change the resolution at any point in time |
91 // the supported formats are unknown. | 91 // the supported formats are unknown. |
92 media::VideoCaptureFormats formats; | 92 media::VideoCaptureFormats formats; |
93 callback.Run(formats); | 93 callback.Run(formats); |
94 } | 94 } |
95 | 95 |
96 void PpFrameWriter::StartSourceImpl( | 96 void PpFrameWriter::StartSourceImpl( |
97 const media::VideoCaptureParams& params, | 97 const media::VideoCaptureParams& params, |
98 const VideoCaptureDeliverFrameCB& frame_callback) { | 98 const VideoCaptureDeliverFrameCB& frame_callback) { |
99 DCHECK(CalledOnValidThread()); | 99 DCHECK(CalledOnValidThread()); |
100 DCHECK(!delegate_); | 100 DCHECK(!delegate_.get()); |
101 DVLOG(3) << "PpFrameWriter::StartSourceImpl()"; | 101 DVLOG(3) << "PpFrameWriter::StartSourceImpl()"; |
102 delegate_ = new FrameWriterDelegate(io_message_loop(), frame_callback); | 102 delegate_ = new FrameWriterDelegate(io_message_loop(), frame_callback); |
103 OnStartDone(MEDIA_DEVICE_OK); | 103 OnStartDone(MEDIA_DEVICE_OK); |
104 } | 104 } |
105 | 105 |
106 void PpFrameWriter::StopSourceImpl() { | 106 void PpFrameWriter::StopSourceImpl() { |
107 DCHECK(CalledOnValidThread()); | 107 DCHECK(CalledOnValidThread()); |
108 } | 108 } |
109 | 109 |
110 void PpFrameWriter::PutFrame(PPB_ImageData_Impl* image_data, | 110 void PpFrameWriter::PutFrame(PPB_ImageData_Impl* image_data, |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 | 227 |
228 stream.addTrack(MediaStreamVideoTrack::CreateVideoTrack( | 228 stream.addTrack(MediaStreamVideoTrack::CreateVideoTrack( |
229 writer, constraints, MediaStreamVideoSource::ConstraintsCallback(), | 229 writer, constraints, MediaStreamVideoSource::ConstraintsCallback(), |
230 track_enabled)); | 230 track_enabled)); |
231 | 231 |
232 *frame_writer = new PpFrameWriterProxy(writer->AsWeakPtr()); | 232 *frame_writer = new PpFrameWriterProxy(writer->AsWeakPtr()); |
233 return true; | 233 return true; |
234 } | 234 } |
235 | 235 |
236 } // namespace content | 236 } // namespace content |
OLD | NEW |