Index: webrtc/modules/desktop_capture/win/screen_capturer_win_directx.h |
diff --git a/webrtc/modules/desktop_capture/win/screen_capturer_win_directx.h b/webrtc/modules/desktop_capture/win/screen_capturer_win_directx.h |
index 59f457c5b4dcdd15ec6813983d1540f76b62efd5..5389ee101ccd23725c19844974f138af8aa98138 100644 |
--- a/webrtc/modules/desktop_capture/win/screen_capturer_win_directx.h |
+++ b/webrtc/modules/desktop_capture/win/screen_capturer_win_directx.h |
@@ -30,9 +30,19 @@ class ScreenCapturerWinDirectx : public DesktopCapturer { |
public: |
using D3dInfo = DxgiDuplicatorController::D3dInfo; |
- // Whether the system supports DirectX based capturing. |
+ // Deprecated: use "IsAvailable()" instead. |
static bool IsSupported(); |
+ // Deprecated: use "GetD3dInfo()" instead. |
+ static bool RetrieveD3dInfo(D3dInfo* info); |
+ |
+ explicit ScreenCapturerWinDirectx(); |
+ |
+ ~ScreenCapturerWinDirectx() override; |
+ |
+ // Whether the system supports DirectX based capturing. |
+ bool IsAvailable() const; |
+ |
// Returns a most recent D3dInfo composed by |
// DxgiDuplicatorController::Initialize() function. This function implicitly |
// calls DxgiDuplicatorController::Initialize() if it has not been |
@@ -41,12 +51,9 @@ class ScreenCapturerWinDirectx : public DesktopCapturer { |
// The D3dInfo may change based on hardware configuration even without |
// restarting the hardware and software. Refer to https://goo.gl/OOCppq. So |
// consumers should not cache the result returned by this function. |
- static bool RetrieveD3dInfo(D3dInfo* info); |
- |
- explicit ScreenCapturerWinDirectx(const DesktopCaptureOptions& options); |
- |
- ~ScreenCapturerWinDirectx() override; |
+ bool GetD3dInfo(D3dInfo* info) const; |
+ // DesktopCapturer implementation. |
void Start(Callback* callback) override; |
void SetSharedMemoryFactory( |
std::unique_ptr<SharedMemoryFactory> shared_memory_factory) override; |
@@ -55,6 +62,7 @@ class ScreenCapturerWinDirectx : public DesktopCapturer { |
bool SelectSource(SourceId id) override; |
private: |
+ const DxgiDuplicatorController::Reference controller_; |
ScreenCaptureFrameQueue<DxgiFrame> frames_; |
std::unique_ptr<SharedMemoryFactory> shared_memory_factory_; |
Callback* callback_ = nullptr; |