| 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_DXGI_OUTPUT_DUPLICATOR_H_ | 11 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_OUTPUT_DUPLICATOR_H_ |
| 12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_OUTPUT_DUPLICATOR_H_ | 12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_OUTPUT_DUPLICATOR_H_ |
| 13 | 13 |
| 14 #include <comdef.h> | 14 #include <comdef.h> |
| 15 #include <wrl/client.h> | 15 #include <wrl/client.h> |
| 16 #include <DXGI.h> | 16 #include <DXGI.h> |
| 17 #include <DXGI1_2.h> | 17 #include <DXGI1_2.h> |
| 18 | 18 |
| 19 #include <memory> | 19 #include <memory> |
| 20 #include <vector> | 20 #include <vector> |
| 21 | 21 |
| 22 #include "webrtc/base/criticalsection.h" | 22 #include "webrtc/modules/desktop_capture/desktop_frame_rotation.h" |
| 23 #include "webrtc/base/thread_annotations.h" | |
| 24 #include "webrtc/modules/desktop_capture/desktop_geometry.h" | 23 #include "webrtc/modules/desktop_capture/desktop_geometry.h" |
| 25 #include "webrtc/modules/desktop_capture/desktop_region.h" | 24 #include "webrtc/modules/desktop_capture/desktop_region.h" |
| 26 #include "webrtc/modules/desktop_capture/desktop_frame_rotation.h" | |
| 27 #include "webrtc/modules/desktop_capture/shared_desktop_frame.h" | 25 #include "webrtc/modules/desktop_capture/shared_desktop_frame.h" |
| 28 #include "webrtc/modules/desktop_capture/win/d3d_device.h" | 26 #include "webrtc/modules/desktop_capture/win/d3d_device.h" |
| 29 #include "webrtc/modules/desktop_capture/win/dxgi_context.h" | 27 #include "webrtc/modules/desktop_capture/win/dxgi_context.h" |
| 30 #include "webrtc/modules/desktop_capture/win/dxgi_texture.h" | 28 #include "webrtc/modules/desktop_capture/win/dxgi_texture.h" |
| 29 #include "webrtc/rtc_base/criticalsection.h" |
| 30 #include "webrtc/rtc_base/thread_annotations.h" |
| 31 | 31 |
| 32 namespace webrtc { | 32 namespace webrtc { |
| 33 | 33 |
| 34 // Duplicates the content on one IDXGIOutput, i.e. one monitor attached to one | 34 // Duplicates the content on one IDXGIOutput, i.e. one monitor attached to one |
| 35 // video card. None of functions in this class is thread-safe. | 35 // video card. None of functions in this class is thread-safe. |
| 36 class DxgiOutputDuplicator { | 36 class DxgiOutputDuplicator { |
| 37 public: | 37 public: |
| 38 using Context = DxgiOutputContext; | 38 using Context = DxgiOutputContext; |
| 39 | 39 |
| 40 // Creates an instance of DxgiOutputDuplicator from a D3dDevice and one of its | 40 // Creates an instance of DxgiOutputDuplicator from a D3dDevice and one of its |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 // |last_frame_|. | 131 // |last_frame_|. |
| 132 std::unique_ptr<SharedDesktopFrame> last_frame_; | 132 std::unique_ptr<SharedDesktopFrame> last_frame_; |
| 133 DesktopVector last_frame_offset_; | 133 DesktopVector last_frame_offset_; |
| 134 | 134 |
| 135 int64_t num_frames_captured_ = 0; | 135 int64_t num_frames_captured_ = 0; |
| 136 }; | 136 }; |
| 137 | 137 |
| 138 } // namespace webrtc | 138 } // namespace webrtc |
| 139 | 139 |
| 140 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_OUTPUT_DUPLICATOR_H_ | 140 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_OUTPUT_DUPLICATOR_H_ |
| OLD | NEW |