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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 io_message_loop_->PostTask( | 60 io_message_loop_->PostTask( |
61 FROM_HERE, | 61 FROM_HERE, |
62 base::Bind(&FrameWriterDelegate::DeliverFrameOnIO, | 62 base::Bind(&FrameWriterDelegate::DeliverFrameOnIO, |
63 this, frame, format)); | 63 this, frame, format)); |
64 } | 64 } |
65 | 65 |
66 void PpFrameWriter::FrameWriterDelegate::DeliverFrameOnIO( | 66 void PpFrameWriter::FrameWriterDelegate::DeliverFrameOnIO( |
67 const scoped_refptr<media::VideoFrame>& frame, | 67 const scoped_refptr<media::VideoFrame>& frame, |
68 const media::VideoCaptureFormat& format) { | 68 const media::VideoCaptureFormat& format) { |
69 DCHECK(io_message_loop_->BelongsToCurrentThread()); | 69 DCHECK(io_message_loop_->BelongsToCurrentThread()); |
70 new_frame_callback_.Run(frame, format); | 70 // The local time when this frame is generated is unknown so give a null |
| 71 // value to |estimated_capture_time|. |
| 72 new_frame_callback_.Run(frame, format, base::TimeTicks()); |
71 } | 73 } |
72 | 74 |
73 PpFrameWriter::PpFrameWriter() { | 75 PpFrameWriter::PpFrameWriter() { |
74 DVLOG(3) << "PpFrameWriter ctor"; | 76 DVLOG(3) << "PpFrameWriter ctor"; |
75 } | 77 } |
76 | 78 |
77 PpFrameWriter::~PpFrameWriter() { | 79 PpFrameWriter::~PpFrameWriter() { |
78 DVLOG(3) << "PpFrameWriter dtor"; | 80 DVLOG(3) << "PpFrameWriter dtor"; |
79 } | 81 } |
80 | 82 |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 | 226 |
225 stream.addTrack(MediaStreamVideoTrack::CreateVideoTrack( | 227 stream.addTrack(MediaStreamVideoTrack::CreateVideoTrack( |
226 writer, constraints, MediaStreamVideoSource::ConstraintsCallback(), | 228 writer, constraints, MediaStreamVideoSource::ConstraintsCallback(), |
227 track_enabled)); | 229 track_enabled)); |
228 | 230 |
229 *frame_writer = new PpFrameWriterProxy(writer->AsWeakPtr()); | 231 *frame_writer = new PpFrameWriterProxy(writer->AsWeakPtr()); |
230 return true; | 232 return true; |
231 } | 233 } |
232 | 234 |
233 } // namespace content | 235 } // namespace content |
OLD | NEW |