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 <joedow@chromium.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Commit-Queue: Jamie Walch <jamiewalch@chromium.org>
Cr-Commit-Position: refs/heads/main@{#34858}
This commit is contained in:
Romain Pokrzywka
2021-08-25 19:05:27 -05:00
committed by WebRTC LUCI CQ
parent 09fb787f9a
commit 66528d7e90

View File

@ -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;