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/browser/media/capture/desktop_capture_device.h" | 5 #include "content/browser/media/capture/desktop_capture_device.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <string.h> | 9 #include <string.h> |
10 #include <utility> | 10 #include <utility> |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "device/power_save_blocker/power_save_blocker.h" | 27 #include "device/power_save_blocker/power_save_blocker.h" |
28 #include "media/base/video_util.h" | 28 #include "media/base/video_util.h" |
29 #include "media/capture/content/capture_resolution_chooser.h" | 29 #include "media/capture/content/capture_resolution_chooser.h" |
30 #include "third_party/libyuv/include/libyuv/scale_argb.h" | 30 #include "third_party/libyuv/include/libyuv/scale_argb.h" |
31 #include "third_party/webrtc/modules/desktop_capture/cropping_window_capturer.h" | 31 #include "third_party/webrtc/modules/desktop_capture/cropping_window_capturer.h" |
32 #include "third_party/webrtc/modules/desktop_capture/desktop_and_cursor_composer
.h" | 32 #include "third_party/webrtc/modules/desktop_capture/desktop_and_cursor_composer
.h" |
33 #include "third_party/webrtc/modules/desktop_capture/desktop_capture_options.h" | 33 #include "third_party/webrtc/modules/desktop_capture/desktop_capture_options.h" |
34 #include "third_party/webrtc/modules/desktop_capture/desktop_capturer.h" | 34 #include "third_party/webrtc/modules/desktop_capture/desktop_capturer.h" |
35 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" | 35 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" |
36 #include "third_party/webrtc/modules/desktop_capture/mouse_cursor_monitor.h" | 36 #include "third_party/webrtc/modules/desktop_capture/mouse_cursor_monitor.h" |
37 #include "third_party/webrtc/modules/desktop_capture/screen_capturer.h" | |
38 | 37 |
39 namespace content { | 38 namespace content { |
40 | 39 |
41 namespace { | 40 namespace { |
42 | 41 |
43 // Maximum CPU time percentage of a single core that can be consumed for desktop | 42 // Maximum CPU time percentage of a single core that can be consumed for desktop |
44 // capturing. This means that on systems where screen scraping is slow we may | 43 // capturing. This means that on systems where screen scraping is slow we may |
45 // need to capture at frame rate lower than requested. This is necessary to keep | 44 // need to capture at frame rate lower than requested. This is necessary to keep |
46 // UI responsive. | 45 // UI responsive. |
47 const int kMaximumCpuConsumptionPercentage = 50; | 46 const int kMaximumCpuConsumptionPercentage = 50; |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 #else | 462 #else |
464 base::MessageLoop::Type thread_type = base::MessageLoop::TYPE_DEFAULT; | 463 base::MessageLoop::Type thread_type = base::MessageLoop::TYPE_DEFAULT; |
465 #endif | 464 #endif |
466 | 465 |
467 thread_.StartWithOptions(base::Thread::Options(thread_type, 0)); | 466 thread_.StartWithOptions(base::Thread::Options(thread_type, 0)); |
468 | 467 |
469 core_.reset(new Core(thread_.task_runner(), std::move(capturer), type)); | 468 core_.reset(new Core(thread_.task_runner(), std::move(capturer), type)); |
470 } | 469 } |
471 | 470 |
472 } // namespace content | 471 } // namespace content |
OLD | NEW |