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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 | 57 |
58 bool IsFrameUnpackedOrInverted(webrtc::DesktopFrame* frame) { | 58 bool IsFrameUnpackedOrInverted(webrtc::DesktopFrame* frame) { |
59 return frame->stride() != | 59 return frame->stride() != |
60 frame->size().width() * webrtc::DesktopFrame::kBytesPerPixel; | 60 frame->size().width() * webrtc::DesktopFrame::kBytesPerPixel; |
61 } | 61 } |
62 | 62 |
63 } // namespace | 63 } // namespace |
64 | 64 |
65 #if defined(OS_WIN) | 65 #if defined(OS_WIN) |
66 const base::Feature kDirectXCapturer{"DirectXCapturer", | 66 const base::Feature kDirectXCapturer{"DirectXCapturer", |
67 base::FEATURE_DISABLED_BY_DEFAULT}; | 67 base::FEATURE_ENABLED_BY_DEFAULT}; |
68 #endif | 68 #endif |
69 | 69 |
70 class DesktopCaptureDevice::Core : public webrtc::DesktopCapturer::Callback { | 70 class DesktopCaptureDevice::Core : public webrtc::DesktopCapturer::Callback { |
71 public: | 71 public: |
72 Core(scoped_refptr<base::SingleThreadTaskRunner> task_runner, | 72 Core(scoped_refptr<base::SingleThreadTaskRunner> task_runner, |
73 std::unique_ptr<webrtc::DesktopCapturer> capturer, | 73 std::unique_ptr<webrtc::DesktopCapturer> capturer, |
74 DesktopMediaID::Type type); | 74 DesktopMediaID::Type type); |
75 ~Core() override; | 75 ~Core() override; |
76 | 76 |
77 // Implementation of VideoCaptureDevice methods. | 77 // Implementation of VideoCaptureDevice methods. |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 #else | 462 #else |
463 base::MessageLoop::Type thread_type = base::MessageLoop::TYPE_DEFAULT; | 463 base::MessageLoop::Type thread_type = base::MessageLoop::TYPE_DEFAULT; |
464 #endif | 464 #endif |
465 | 465 |
466 thread_.StartWithOptions(base::Thread::Options(thread_type, 0)); | 466 thread_.StartWithOptions(base::Thread::Options(thread_type, 0)); |
467 | 467 |
468 core_.reset(new Core(thread_.task_runner(), std::move(capturer), type)); | 468 core_.reset(new Core(thread_.task_runner(), std::move(capturer), type)); |
469 } | 469 } |
470 | 470 |
471 } // namespace content | 471 } // namespace content |
OLD | NEW |