Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1670)

Side by Side Diff: webrtc/modules/desktop_capture/win/screen_capturer_win_directx.h

Issue 2314323002: Wrap ScreenCapturer with ScreenCapturerDifferWrapper (Closed)
Patch Set: Resolve review comments Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
(...skipping 10 matching lines...) Expand all
21 #include "webrtc/modules/desktop_capture/screen_capture_frame_queue.h" 21 #include "webrtc/modules/desktop_capture/screen_capture_frame_queue.h"
22 #include "webrtc/modules/desktop_capture/shared_desktop_frame.h" 22 #include "webrtc/modules/desktop_capture/shared_desktop_frame.h"
23 #include "webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.h" 23 #include "webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.h"
24 24
25 namespace webrtc { 25 namespace webrtc {
26 26
27 // ScreenCapturerWinDirectx captures 32bit RGBA using DirectX. This 27 // ScreenCapturerWinDirectx captures 32bit RGBA using DirectX. This
28 // implementation won't work when ScreenCaptureFrameQueue.kQueueLength is not 2. 28 // implementation won't work when ScreenCaptureFrameQueue.kQueueLength is not 2.
29 class ScreenCapturerWinDirectx : public ScreenCapturer { 29 class ScreenCapturerWinDirectx : public ScreenCapturer {
30 public: 30 public:
31 // Whether the system support DirectX based capturing. 31 // Whether the system supports DirectX based capturing.
32 static bool IsSupported(); 32 static bool IsSupported();
33 33
34 explicit ScreenCapturerWinDirectx(const DesktopCaptureOptions& options); 34 explicit ScreenCapturerWinDirectx(const DesktopCaptureOptions& options);
35
35 virtual ~ScreenCapturerWinDirectx(); 36 virtual ~ScreenCapturerWinDirectx();
36 37
37 void Start(Callback* callback) override; 38 void Start(Callback* callback) override;
38 void SetSharedMemoryFactory( 39 void SetSharedMemoryFactory(
39 std::unique_ptr<SharedMemoryFactory> shared_memory_factory) override; 40 std::unique_ptr<SharedMemoryFactory> shared_memory_factory) override;
40 void Capture(const DesktopRegion& region) override; 41 void Capture(const DesktopRegion& region) override;
41 bool GetScreenList(ScreenList* screens) override; 42 bool GetScreenList(ScreenList* screens) override;
42 bool SelectScreen(ScreenId id) override; 43 bool SelectScreen(ScreenId id) override;
43 44
44 private: 45 private:
45 // Returns desktop size of selected screen. 46 // Returns desktop size of selected screen.
46 DesktopSize SelectedDesktopSize() const; 47 DesktopSize SelectedDesktopSize() const;
47 48
48 ScreenCaptureFrameQueue<SharedDesktopFrame> frames_; 49 ScreenCaptureFrameQueue<SharedDesktopFrame> frames_;
49 std::unique_ptr<SharedMemoryFactory> shared_memory_factory_; 50 std::unique_ptr<SharedMemoryFactory> shared_memory_factory_;
50 Callback* callback_ = nullptr; 51 Callback* callback_ = nullptr;
51 52
52 DxgiDuplicatorController::Context context_; 53 DxgiDuplicatorController::Context context_;
53 54
54 ScreenId current_screen_id = kFullDesktopScreenId; 55 ScreenId current_screen_id = kFullDesktopScreenId;
55 56
56 RTC_DISALLOW_COPY_AND_ASSIGN(ScreenCapturerWinDirectx); 57 RTC_DISALLOW_COPY_AND_ASSIGN(ScreenCapturerWinDirectx);
57 }; 58 };
58 59
59 } // namespace webrtc 60 } // namespace webrtc
60 61
61 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_DIRECTX_H_ 62 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_DIRECTX_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698