| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/html_video_element_capturer_source.h" | 5 #include "content/renderer/media/html_video_element_capturer_source.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "base/thread_task_runner_handle.h" | 8 #include "base/thread_task_runner_handle.h" |
| 9 #include "base/trace_event/trace_event.h" | 9 #include "base/trace_event/trace_event.h" |
| 10 #include "content/public/renderer/render_thread.h" | 10 #include "content/public/renderer/render_thread.h" |
| 11 #include "content/renderer/media/media_stream_video_source.h" | 11 #include "content/renderer/media/media_stream_video_source.h" |
| 12 #include "content/renderer/media/webrtc_uma_histograms.h" | 12 #include "content/renderer/media/webrtc_uma_histograms.h" |
| 13 #include "media/base/limits.h" | 13 #include "media/base/limits.h" |
| 14 #include "media/blink/webmediaplayer_impl.h" | 14 #include "media/blink/webmediaplayer_impl.h" |
| 15 #include "skia/ext/platform_canvas.h" |
| 15 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" | 16 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" |
| 16 #include "third_party/WebKit/public/platform/WebRect.h" | 17 #include "third_party/WebKit/public/platform/WebRect.h" |
| 17 #include "third_party/WebKit/public/platform/WebSize.h" | 18 #include "third_party/WebKit/public/platform/WebSize.h" |
| 18 #include "third_party/libyuv/include/libyuv.h" | 19 #include "third_party/libyuv/include/libyuv.h" |
| 19 #include "third_party/skia/include/core/SkCanvas.h" | 20 #include "third_party/skia/include/core/SkCanvas.h" |
| 20 #include "third_party/skia/include/core/SkXfermode.h" | 21 #include "third_party/skia/include/core/SkXfermode.h" |
| 21 | 22 |
| 22 namespace { | 23 namespace { |
| 23 const float kMinFramesPerSecond = 1.0; | 24 const float kMinFramesPerSecond = 1.0; |
| 24 } // anonymous namespace | 25 } // anonymous namespace |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 next_capture_time_ = current_time; | 183 next_capture_time_ = current_time; |
| 183 } | 184 } |
| 184 // Schedule next capture. | 185 // Schedule next capture. |
| 185 base::MessageLoop::current()->PostDelayedTask( | 186 base::MessageLoop::current()->PostDelayedTask( |
| 186 FROM_HERE, base::Bind(&HtmlVideoElementCapturerSource::sendNewFrame, | 187 FROM_HERE, base::Bind(&HtmlVideoElementCapturerSource::sendNewFrame, |
| 187 weak_factory_.GetWeakPtr()), | 188 weak_factory_.GetWeakPtr()), |
| 188 next_capture_time_ - current_time); | 189 next_capture_time_ - current_time); |
| 189 } | 190 } |
| 190 | 191 |
| 191 } // namespace content | 192 } // namespace content |
| OLD | NEW |