| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 |
| 11 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_DIRECTX_H_ | 11 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_DIRECTX_H_ |
| 12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_DIRECTX_H_ | 12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_DIRECTX_H_ |
| 13 | 13 |
| 14 #include <D3DCommon.h> | 14 #include <D3DCommon.h> |
| 15 | 15 |
| 16 #include <memory> | 16 #include <memory> |
| 17 #include <vector> | 17 #include <vector> |
| 18 | 18 |
| 19 #include "webrtc/modules/desktop_capture/desktop_capturer.h" | 19 #include "webrtc/modules/desktop_capture/desktop_capturer.h" |
| 20 #include "webrtc/modules/desktop_capture/desktop_capture_options.h" | 20 #include "webrtc/modules/desktop_capture/desktop_capture_options.h" |
| 21 #include "webrtc/modules/desktop_capture/desktop_region.h" | 21 #include "webrtc/modules/desktop_capture/desktop_region.h" |
| 22 #include "webrtc/modules/desktop_capture/resolution_change_detector.h" |
| 22 #include "webrtc/modules/desktop_capture/screen_capture_frame_queue.h" | 23 #include "webrtc/modules/desktop_capture/screen_capture_frame_queue.h" |
| 23 #include "webrtc/modules/desktop_capture/shared_desktop_frame.h" | 24 #include "webrtc/modules/desktop_capture/shared_desktop_frame.h" |
| 24 #include "webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.h" | 25 #include "webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.h" |
| 25 | 26 |
| 26 namespace webrtc { | 27 namespace webrtc { |
| 27 | 28 |
| 28 // ScreenCapturerWinDirectx captures 32bit RGBA using DirectX. | 29 // ScreenCapturerWinDirectx captures 32bit RGBA using DirectX. |
| 29 class ScreenCapturerWinDirectx : public DesktopCapturer { | 30 class ScreenCapturerWinDirectx : public DesktopCapturer { |
| 30 public: | 31 public: |
| 31 using D3dInfo = DxgiDuplicatorController::D3dInfo; | 32 using D3dInfo = DxgiDuplicatorController::D3dInfo; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 54 bool GetSourceList(SourceList* sources) override; | 55 bool GetSourceList(SourceList* sources) override; |
| 55 bool SelectSource(SourceId id) override; | 56 bool SelectSource(SourceId id) override; |
| 56 | 57 |
| 57 private: | 58 private: |
| 58 // Returns desktop size of selected screen. | 59 // Returns desktop size of selected screen. |
| 59 DesktopSize SelectedDesktopSize() const; | 60 DesktopSize SelectedDesktopSize() const; |
| 60 | 61 |
| 61 ScreenCaptureFrameQueue<SharedDesktopFrame> frames_; | 62 ScreenCaptureFrameQueue<SharedDesktopFrame> frames_; |
| 62 std::unique_ptr<SharedMemoryFactory> shared_memory_factory_; | 63 std::unique_ptr<SharedMemoryFactory> shared_memory_factory_; |
| 63 Callback* callback_ = nullptr; | 64 Callback* callback_ = nullptr; |
| 64 | |
| 65 DxgiDuplicatorController::Context context_; | 65 DxgiDuplicatorController::Context context_; |
| 66 | |
| 67 SourceId current_screen_id_ = kFullDesktopScreenId; | 66 SourceId current_screen_id_ = kFullDesktopScreenId; |
| 67 ResolutionChangeDetector resolution_change_detector_; |
| 68 | 68 |
| 69 RTC_DISALLOW_COPY_AND_ASSIGN(ScreenCapturerWinDirectx); | 69 RTC_DISALLOW_COPY_AND_ASSIGN(ScreenCapturerWinDirectx); |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 } // namespace webrtc | 72 } // namespace webrtc |
| 73 | 73 |
| 74 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_DIRECTX_H_ | 74 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_DIRECTX_H_ |
| OLD | NEW |