| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 callback.Run(formats); | 92 callback.Run(formats); |
| 93 } | 93 } |
| 94 | 94 |
| 95 void PpFrameWriter::StartSourceImpl( | 95 void PpFrameWriter::StartSourceImpl( |
| 96 const media::VideoCaptureParams& params, | 96 const media::VideoCaptureParams& params, |
| 97 const VideoCaptureDeliverFrameCB& frame_callback) { | 97 const VideoCaptureDeliverFrameCB& frame_callback) { |
| 98 DCHECK(CalledOnValidThread()); | 98 DCHECK(CalledOnValidThread()); |
| 99 DCHECK(!delegate_); | 99 DCHECK(!delegate_); |
| 100 DVLOG(3) << "PpFrameWriter::StartSourceImpl()"; | 100 DVLOG(3) << "PpFrameWriter::StartSourceImpl()"; |
| 101 delegate_ = new FrameWriterDelegate(io_message_loop(), frame_callback); | 101 delegate_ = new FrameWriterDelegate(io_message_loop(), frame_callback); |
| 102 OnStartDone(true); | 102 OnStartDone(MEDIA_DEVICE_OK); |
| 103 } | 103 } |
| 104 | 104 |
| 105 void PpFrameWriter::StopSourceImpl() { | 105 void PpFrameWriter::StopSourceImpl() { |
| 106 DCHECK(CalledOnValidThread()); | 106 DCHECK(CalledOnValidThread()); |
| 107 } | 107 } |
| 108 | 108 |
| 109 void PpFrameWriter::PutFrame(PPB_ImageData_Impl* image_data, | 109 void PpFrameWriter::PutFrame(PPB_ImageData_Impl* image_data, |
| 110 int64 time_stamp_ns) { | 110 int64 time_stamp_ns) { |
| 111 DCHECK(CalledOnValidThread()); | 111 DCHECK(CalledOnValidThread()); |
| 112 DVLOG(3) << "PpFrameWriter::PutFrame()"; | 112 DVLOG(3) << "PpFrameWriter::PutFrame()"; |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 | 226 |
| 227 stream.addTrack(MediaStreamVideoTrack::CreateVideoTrack( | 227 stream.addTrack(MediaStreamVideoTrack::CreateVideoTrack( |
| 228 writer, constraints, MediaStreamVideoSource::ConstraintsCallback(), | 228 writer, constraints, MediaStreamVideoSource::ConstraintsCallback(), |
| 229 track_enabled)); | 229 track_enabled)); |
| 230 | 230 |
| 231 *frame_writer = new PpFrameWriterProxy(writer->AsWeakPtr()); | 231 *frame_writer = new PpFrameWriterProxy(writer->AsWeakPtr()); |
| 232 return true; | 232 return true; |
| 233 } | 233 } |
| 234 | 234 |
| 235 } // namespace content | 235 } // namespace content |
| OLD | NEW |