OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 29 matching lines...) Expand all Loading... |
40 clock_->TimeInMilliseconds()), | 40 clock_->TimeInMilliseconds()), |
41 overuse_detector_(overuse_detector) {} | 41 overuse_detector_(overuse_detector) {} |
42 | 42 |
43 VideoCaptureInput::~VideoCaptureInput() { | 43 VideoCaptureInput::~VideoCaptureInput() { |
44 } | 44 } |
45 | 45 |
46 void VideoCaptureInput::IncomingCapturedFrame(const VideoFrame& video_frame) { | 46 void VideoCaptureInput::IncomingCapturedFrame(const VideoFrame& video_frame) { |
47 // TODO(pbos): Remove local rendering, it should be handled by the client code | 47 // TODO(pbos): Remove local rendering, it should be handled by the client code |
48 // if required. | 48 // if required. |
49 if (local_renderer_) | 49 if (local_renderer_) |
50 local_renderer_->RenderFrame(video_frame, 0); | 50 local_renderer_->OnFrame(video_frame); |
51 | 51 |
52 stats_proxy_->OnIncomingFrame(video_frame.width(), video_frame.height()); | 52 stats_proxy_->OnIncomingFrame(video_frame.width(), video_frame.height()); |
53 | 53 |
54 VideoFrame incoming_frame = video_frame; | 54 VideoFrame incoming_frame = video_frame; |
55 | 55 |
56 // Local time in webrtc time base. | 56 // Local time in webrtc time base. |
57 int64_t current_time = clock_->TimeInMilliseconds(); | 57 int64_t current_time = clock_->TimeInMilliseconds(); |
58 incoming_frame.set_render_time_ms(current_time); | 58 incoming_frame.set_render_time_ms(current_time); |
59 | 59 |
60 // Capture time may come from clock with an offset and drift from clock_. | 60 // Capture time may come from clock with an offset and drift from clock_. |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 if (captured_frame_.IsZeroSize()) | 99 if (captured_frame_.IsZeroSize()) |
100 return false; | 100 return false; |
101 | 101 |
102 *video_frame = captured_frame_; | 102 *video_frame = captured_frame_; |
103 captured_frame_.Reset(); | 103 captured_frame_.Reset(); |
104 return true; | 104 return true; |
105 } | 105 } |
106 | 106 |
107 } // namespace internal | 107 } // namespace internal |
108 } // namespace webrtc | 108 } // namespace webrtc |
OLD | NEW |