From 66528d7e90fe9adc3916bb7d67a673485df3ca1c Mon Sep 17 00:00:00 2001 From: Romain Pokrzywka Date: Wed, 25 Aug 2021 19:05:27 -0500 Subject: [PATCH] Export DxgiDuplicatorController when building as shared lib This class is accessed by Electron for its desktop capture support, but it breaks with component builds on Windows because the symbols aren't exported by the dll. No behavior change at runtime, only modifies the generated .lib when building as a shared library (static builds are unchanged). Bug: None Change-Id: I5dc606846de990c1bf4d375ddbb1c73dfc512762 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/230200 Reviewed-by: Joe Downing Reviewed-by: Niels Moller Reviewed-by: Jamie Walch Commit-Queue: Jamie Walch Cr-Commit-Position: refs/heads/main@{#34858} --- modules/desktop_capture/win/dxgi_duplicator_controller.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/desktop_capture/win/dxgi_duplicator_controller.h b/modules/desktop_capture/win/dxgi_duplicator_controller.h index 38e8549fb8..43c1a79874 100644 --- a/modules/desktop_capture/win/dxgi_duplicator_controller.h +++ b/modules/desktop_capture/win/dxgi_duplicator_controller.h @@ -26,6 +26,7 @@ #include "modules/desktop_capture/win/dxgi_context.h" #include "modules/desktop_capture/win/dxgi_frame.h" #include "rtc_base/synchronization/mutex.h" +#include "rtc_base/system/rtc_export.h" namespace webrtc { @@ -40,7 +41,7 @@ namespace webrtc { // but a later Duplicate() returns false, this usually means the display mode is // changing. Consumers should retry after a while. (Typically 50 milliseconds, // but according to hardware performance, this time may vary.) -class DxgiDuplicatorController { +class RTC_EXPORT DxgiDuplicatorController { public: using Context = DxgiFrameContext;