Reland "Export symbols needed by the Chromium component build (part 1)."
This reverts commit 16fe3f290a524a136f71660a114d0b03ef501f10.
Reason for revert:
After discussing this problem with nisse@ and yvesg@, we decided to modify
how RTC_EXPORT works and avoid to depend on the macro COMPONENT_BUILD.
RTC_EXPORT will instead depend on a macro WEBRTC_COMPONENT_BUILD (which
can be set as a GN argument which defaults to false).
When all the symbols needed by Chromium will be marked with RTC_EXPORT we
will flip the GN arg in Chromium, setting to to `component_build` and from
that moment, Chromium will depend on a WebRTC shared library when
`component_build=true`.
Original change's description:
> Revert "Export symbols needed by the Chromium component build (part 1)."
>
> This reverts commit 99eea42fc1fe0be0ebed13c5eba7e1e42059bc5a.
>
> Reason for revert:
> lld-link: error: undefined symbol: "__declspec(dllimport) bool __cdecl cricket::UnwrapTurnPacket(unsigned char const *, unsigned int, unsigned int *, unsigned int *)" (__imp_?UnwrapTurnPacket@cricket@@YA_NPBEIPAI1@Z)
> >>> referenced by obj/services/network/network_service/socket_manager.obj:("virtual void __thiscall network::P2PSocketManager::DumpPacket(class base::span<unsigned char const, 4294967295>, bool)" (?DumpPacket@P2PSocketManager@network@@EAEXV?$span@$$CBE$0PPPPPPPP@@base@@_N@Z))
> lld-link: error: undefined symbol: "__declspec(dllimport) bool __cdecl cricket::ValidateRtpHeader(unsigned char const *, unsigned int, unsigned int *)" (__imp_?ValidateRtpHeader@cricket@@YA_NPBEIPAI@Z)
> >>> referenced by obj/services/network/network_service/socket_manager.obj:("virtual void __thiscall network::P2PSocketManager::DumpPacket(class base::span<unsigned char const, 4294967295>, bool)" (?DumpPacket@P2PSocketManager@network@@EAEXV?$span@$$CBE$0PPPPPPPP@@base@@_N@Z))
> lld-link: error: undefined symbol: "__declspec(dllimport) bool __cdecl cricket::ApplyPacketOptions(unsigned char *, unsigned int, struct rtc::PacketTimeUpdateParams const &, unsigned __int64)" (__imp_?ApplyPacketOptions@cricket@@YA_NPAEIABUPacketTimeUpdateParams@rtc@@_K@Z)
> >>> referenced by obj/services/network/network_service/socket_tcp.obj:("virtual void __thiscall network::P2PSocketTcp::DoSend(class net::IPEndPoint const &, class std::vector<signed char, class std::allocator<signed char>> const &, struct rtc::PacketOptions const &, struct net::NetworkTrafficAnnotationTag)" (?DoSend@P2PSocketTcp@network@@MAEXABVIPEndPoint@net@@ABV?$vector@CV?$allocator@C@std@@@std@@ABUPacketOptions@rtc@@UNetworkTrafficAnnotationTag@4@@Z))
> >>> referenced by obj/services/network/network_service/socket_tcp.obj:("virtual void __thiscall network::P2PSocketStunTcp::DoSend(class net::IPEndPoint const &, class std::vector<signed char, class std::allocator<signed char>> const &, struct rtc::PacketOptions const &, struct net::NetworkTrafficAnnotationTag)" (?DoSend@P2PSocketStunTcp@network@@MAEXABVIPEndPoint@net@@ABV?$vector@CV?$allocator@C@std@@@std@@ABUPacketOptions@rtc@@UNetworkTrafficAnnotationTag@4@@Z))
> lld-link: error: undefined symbol: "__declspec(dllimport) bool __cdecl cricket::ApplyPacketOptions(unsigned char *, unsigned int, struct rtc::PacketTimeUpdateParams const &, unsigned __int64)" (__imp_?ApplyPacketOptions@cricket@@YA_NPAEIABUPacketTimeUpdateParams@rtc@@_K@Z)
> >>> referenced by obj/services/network/network_service/socket_udp.obj:("bool __thiscall network::P2PSocketUdp::DoSend(struct network::P2PSocketUdp::PendingPacket const &)" (?DoSend@P2PSocketUdp@network@@AAE_NABUPendingPacket@12@@Z))
>
> Original change's description:
> > Reland "Reland "Export symbols needed by the Chromium component build (part 1).""
> >
> > This reverts commit b49520bfc08f5c5832dda1d642125f0bb898f974.
> >
> > Reason for revert: Problem fixed in https://chromium-review.googlesource.com/c/chromium/src/+/1261398.
> >
> > Original change's description:
> > > Revert "Reland "Export symbols needed by the Chromium component build (part 1).""
> > >
> > > This reverts commit 588f4642d1a29f7beaf28265dbd08728191b4c52.
> > >
> > > Reason for revert: Breaks WebRTC Chromium FYI Win Builder (dbg).
> > > lld-link: error: undefined symbol: "__declspec(dllimport) __thiscall webrtc::Config::Config(void)" (__imp_??0Config@webrtc@@QAE@XZ)
> > > [...]
> > >
> > > Original change's description:
> > > > Reland "Export symbols needed by the Chromium component build (part 1)."
> > > >
> > > > This reverts commit 2ea9af227517556136fd629dd2663c0d75d77c7b.
> > > >
> > > > Reason for revert: The problem will be fixed by
> > > > https://chromium-review.googlesource.com/c/chromium/src/+/1261122.
> > > >
> > > > Original change's description:
> > > > > Revert "Export symbols needed by the Chromium component build (part 1)."
> > > > >
> > > > > This reverts commit 9e24dcff167c4eb3555bf0ce6eaba090c10fbe53.
> > > > >
> > > > > Reason for revert: Breaks chromium.webrtc.fyi bots.
> > > > >
> > > > > Original change's description:
> > > > > > Export symbols needed by the Chromium component build (part 1).
> > > > > >
> > > > > > This CL uses RTC_EXPORT (defined in rtc_base/system/rtc_export.h)
> > > > > > to mark WebRTC symbols as visible from a shared library, this doesn't
> > > > > > mean these symbols are part of the public API (please continue to refer
> > > > > > to [1] for info about what is considered public WebRTC API).
> > > > > >
> > > > > > [1] - https://webrtc.googlesource.com/src/+/HEAD/native-api.md
> > > > > >
> > > > > > Bug: webrtc:9419
> > > > > > Change-Id: I802abd32874d42d3aa5ecd3c8022e7cf5e043d99
> > > > > > Reviewed-on: https://webrtc-review.googlesource.com/c/103505
> > > > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > > Reviewed-by: Niels Moller <nisse@webrtc.org>
> > > > > > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> > > > > > Cr-Commit-Position: refs/heads/master@{#24969}
> > > > >
> > > > > TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
> > > > >
> > > > > Change-Id: I01f6e18f0d2c0f0309cdaa6c943c3927e1f1f49f
> > > > > No-Presubmit: true
> > > > > No-Tree-Checks: true
> > > > > No-Try: true
> > > > > Bug: webrtc:9419
> > > > > Reviewed-on: https://webrtc-review.googlesource.com/c/103720
> > > > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > Cr-Commit-Position: refs/heads/master@{#24974}
> > > >
> > > > TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
> > > >
> > > > Change-Id: I83bbc7f550fc23e823c4d055e0a6f60c828960dd
> > > > No-Presubmit: true
> > > > No-Tree-Checks: true
> > > > No-Try: true
> > > > Bug: webrtc:9419
> > > > Reviewed-on: https://webrtc-review.googlesource.com/c/103740
> > > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > Cr-Commit-Position: refs/heads/master@{#24980}
> > >
> > > TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
> > >
> > > Change-Id: I4b7cfe492f2c8eeda5c8ac52520e0cfc95ade9b0
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Bug: webrtc:9419
> > > Reviewed-on: https://webrtc-review.googlesource.com/c/103801
> > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > Cr-Commit-Position: refs/heads/master@{#24983}
> >
> > TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
> >
> > # Not skipping CQ checks because original CL landed > 1 day ago.
> >
> > Bug: webrtc:9419
> > Change-Id: Id986a0a03cdc2818690337784396882af067f7fa
> > Reviewed-on: https://webrtc-review.googlesource.com/c/104602
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Reviewed-by: Niels Moller <nisse@webrtc.org>
> > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#25049}
>
> TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
>
> Change-Id: I6f58b9c90defccdb160307783fb55271ab424fa1
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:9419
> Reviewed-on: https://webrtc-review.googlesource.com/c/104623
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25050}
TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org
Change-Id: I4d01ed96ae40a8f9ca42c466be5c87653d75d7c1
Bug: webrtc:9419
Reviewed-on: https://webrtc-review.googlesource.com/c/104641
Reviewed-by: Yves Gerey <yvesg@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25108}
diff --git a/api/audio/BUILD.gn b/api/audio/BUILD.gn
index 43dc420..1ab6812 100644
--- a/api/audio/BUILD.gn
+++ b/api/audio/BUILD.gn
@@ -42,6 +42,7 @@
deps = [
"../../rtc_base:rtc_base_approved",
"../../rtc_base:safe_minmax",
+ "../../rtc_base/system:rtc_export",
]
}
@@ -55,6 +56,7 @@
":aec3_config",
"../../rtc_base:rtc_base_approved",
"../../rtc_base:rtc_json",
+ "../../rtc_base/system:rtc_export",
"//third_party/abseil-cpp/absl/strings:strings",
]
}
@@ -72,6 +74,7 @@
":echo_control",
"../../modules/audio_processing/aec3",
"../../rtc_base:rtc_base_approved",
+ "../../rtc_base/system:rtc_export",
"//third_party/abseil-cpp/absl/memory",
]
}
diff --git a/api/audio/echo_canceller3_config.h b/api/audio/echo_canceller3_config.h
index 64e3383..f180a44 100644
--- a/api/audio/echo_canceller3_config.h
+++ b/api/audio/echo_canceller3_config.h
@@ -13,10 +13,12 @@
#include <stddef.h> // size_t
+#include "rtc_base/system/rtc_export.h"
+
namespace webrtc {
// Configuration struct for EchoCanceller3
-struct EchoCanceller3Config {
+struct RTC_EXPORT EchoCanceller3Config {
// Checks and updates the parameters in a config to lie within reasonable
// ranges. Returns true if and only of the config did not need to be changed.
static bool Validate(EchoCanceller3Config* config);
diff --git a/api/audio/echo_canceller3_factory.h b/api/audio/echo_canceller3_factory.h
index f6db116..9052d99 100644
--- a/api/audio/echo_canceller3_factory.h
+++ b/api/audio/echo_canceller3_factory.h
@@ -15,10 +15,11 @@
#include "api/audio/echo_canceller3_config.h"
#include "api/audio/echo_control.h"
+#include "rtc_base/system/rtc_export.h"
namespace webrtc {
-class EchoCanceller3Factory : public EchoControlFactory {
+class RTC_EXPORT EchoCanceller3Factory : public EchoControlFactory {
public:
// Factory producing EchoCanceller3 instances with the default configuration.
EchoCanceller3Factory();
diff --git a/api/audio_codecs/L16/BUILD.gn b/api/audio_codecs/L16/BUILD.gn
index 9724805..e362067 100644
--- a/api/audio_codecs/L16/BUILD.gn
+++ b/api/audio_codecs/L16/BUILD.gn
@@ -25,6 +25,7 @@
"../../../modules/audio_coding:pcm16b",
"../../../rtc_base:rtc_base_approved",
"../../../rtc_base:safe_minmax",
+ "../../../rtc_base/system:rtc_export",
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/types:optional",
]
diff --git a/api/audio_codecs/L16/audio_encoder_L16.h b/api/audio_codecs/L16/audio_encoder_L16.h
index 340e3af..eef4da6 100644
--- a/api/audio_codecs/L16/audio_encoder_L16.h
+++ b/api/audio_codecs/L16/audio_encoder_L16.h
@@ -18,6 +18,7 @@
#include "api/audio_codecs/audio_codec_pair_id.h"
#include "api/audio_codecs/audio_encoder.h"
#include "api/audio_codecs/audio_format.h"
+#include "rtc_base/system/rtc_export.h"
namespace webrtc {
@@ -25,7 +26,7 @@
// CreateAudioEncoderFactory<...>().
//
// NOTE: This struct is still under development and may change without notice.
-struct AudioEncoderL16 {
+struct RTC_EXPORT AudioEncoderL16 {
struct Config {
bool IsOk() const {
return (sample_rate_hz == 8000 || sample_rate_hz == 16000 ||
diff --git a/api/audio_codecs/g711/BUILD.gn b/api/audio_codecs/g711/BUILD.gn
index 169172a..860ba3d 100644
--- a/api/audio_codecs/g711/BUILD.gn
+++ b/api/audio_codecs/g711/BUILD.gn
@@ -25,6 +25,7 @@
"../../../modules/audio_coding:g711",
"../../../rtc_base:rtc_base_approved",
"../../../rtc_base:safe_minmax",
+ "../../../rtc_base/system:rtc_export",
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/types:optional",
]
diff --git a/api/audio_codecs/g711/audio_encoder_g711.h b/api/audio_codecs/g711/audio_encoder_g711.h
index 6b6eb5f..8dbc881 100644
--- a/api/audio_codecs/g711/audio_encoder_g711.h
+++ b/api/audio_codecs/g711/audio_encoder_g711.h
@@ -18,6 +18,7 @@
#include "api/audio_codecs/audio_codec_pair_id.h"
#include "api/audio_codecs/audio_encoder.h"
#include "api/audio_codecs/audio_format.h"
+#include "rtc_base/system/rtc_export.h"
namespace webrtc {
@@ -25,7 +26,7 @@
// CreateAudioEncoderFactory<...>().
//
// NOTE: This struct is still under development and may change without notice.
-struct AudioEncoderG711 {
+struct RTC_EXPORT AudioEncoderG711 {
struct Config {
enum class Type { kPcmU, kPcmA };
bool IsOk() const {
diff --git a/api/audio_codecs/g722/BUILD.gn b/api/audio_codecs/g722/BUILD.gn
index 50b1396..d69596b 100644
--- a/api/audio_codecs/g722/BUILD.gn
+++ b/api/audio_codecs/g722/BUILD.gn
@@ -33,6 +33,7 @@
"../../../modules/audio_coding:g722",
"../../../rtc_base:rtc_base_approved",
"../../../rtc_base:safe_minmax",
+ "../../../rtc_base/system:rtc_export",
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/types:optional",
]
diff --git a/api/audio_codecs/g722/audio_encoder_g722.h b/api/audio_codecs/g722/audio_encoder_g722.h
index b97fe1b..3029e11 100644
--- a/api/audio_codecs/g722/audio_encoder_g722.h
+++ b/api/audio_codecs/g722/audio_encoder_g722.h
@@ -19,6 +19,7 @@
#include "api/audio_codecs/audio_encoder.h"
#include "api/audio_codecs/audio_format.h"
#include "api/audio_codecs/g722/audio_encoder_g722_config.h"
+#include "rtc_base/system/rtc_export.h"
namespace webrtc {
@@ -26,7 +27,7 @@
// CreateAudioEncoderFactory<...>().
//
// NOTE: This struct is still under development and may change without notice.
-struct AudioEncoderG722 {
+struct RTC_EXPORT AudioEncoderG722 {
using Config = AudioEncoderG722Config;
static absl::optional<AudioEncoderG722Config> SdpToConfig(
const SdpAudioFormat& audio_format);
diff --git a/api/audio_codecs/isac/BUILD.gn b/api/audio_codecs/isac/BUILD.gn
index ed9d962..e1bed07 100644
--- a/api/audio_codecs/isac/BUILD.gn
+++ b/api/audio_codecs/isac/BUILD.gn
@@ -131,6 +131,7 @@
"../../..:webrtc_common",
"../../../modules/audio_coding:isac",
"../../../rtc_base:rtc_base_approved",
+ "../../../rtc_base/system:rtc_export",
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/types:optional",
]
diff --git a/api/audio_codecs/isac/audio_decoder_isac_float.h b/api/audio_codecs/isac/audio_decoder_isac_float.h
index cc13963..b0793e4 100644
--- a/api/audio_codecs/isac/audio_decoder_isac_float.h
+++ b/api/audio_codecs/isac/audio_decoder_isac_float.h
@@ -18,6 +18,7 @@
#include "api/audio_codecs/audio_codec_pair_id.h"
#include "api/audio_codecs/audio_decoder.h"
#include "api/audio_codecs/audio_format.h"
+#include "rtc_base/system/rtc_export.h"
namespace webrtc {
@@ -25,7 +26,7 @@
// parameter to CreateAudioDecoderFactory<...>().
//
// NOTE: This struct is still under development and may change without notice.
-struct AudioDecoderIsacFloat {
+struct RTC_EXPORT AudioDecoderIsacFloat {
struct Config {
bool IsOk() const {
return sample_rate_hz == 16000 || sample_rate_hz == 32000;
diff --git a/api/audio_codecs/opus/BUILD.gn b/api/audio_codecs/opus/BUILD.gn
index 800abbe..9c9bf33 100644
--- a/api/audio_codecs/opus/BUILD.gn
+++ b/api/audio_codecs/opus/BUILD.gn
@@ -44,6 +44,7 @@
"..:audio_codecs_api",
"../../../modules/audio_coding:webrtc_opus",
"../../../rtc_base:rtc_base_approved",
+ "../../../rtc_base/system:rtc_export",
"//third_party/abseil-cpp/absl/types:optional",
]
}
@@ -60,6 +61,7 @@
"../../..:webrtc_common",
"../../../modules/audio_coding:webrtc_opus",
"../../../rtc_base:rtc_base_approved",
+ "../../../rtc_base/system:rtc_export",
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/types:optional",
]
diff --git a/api/audio_codecs/opus/audio_decoder_opus.h b/api/audio_codecs/opus/audio_decoder_opus.h
index de26026..0fc720b 100644
--- a/api/audio_codecs/opus/audio_decoder_opus.h
+++ b/api/audio_codecs/opus/audio_decoder_opus.h
@@ -18,6 +18,7 @@
#include "api/audio_codecs/audio_codec_pair_id.h"
#include "api/audio_codecs/audio_decoder.h"
#include "api/audio_codecs/audio_format.h"
+#include "rtc_base/system/rtc_export.h"
namespace webrtc {
@@ -25,7 +26,7 @@
// CreateAudioDecoderFactory<...>().
//
// NOTE: This struct is still under development and may change without notice.
-struct AudioDecoderOpus {
+struct RTC_EXPORT AudioDecoderOpus {
struct Config {
int num_channels;
};
diff --git a/api/audio_codecs/opus/audio_encoder_opus.h b/api/audio_codecs/opus/audio_encoder_opus.h
index 20aaaf7..bb4aa27 100644
--- a/api/audio_codecs/opus/audio_encoder_opus.h
+++ b/api/audio_codecs/opus/audio_encoder_opus.h
@@ -19,6 +19,7 @@
#include "api/audio_codecs/audio_encoder.h"
#include "api/audio_codecs/audio_format.h"
#include "api/audio_codecs/opus/audio_encoder_opus_config.h"
+#include "rtc_base/system/rtc_export.h"
namespace webrtc {
@@ -26,7 +27,7 @@
// CreateAudioEncoderFactory<...>().
//
// NOTE: This struct is still under development and may change without notice.
-struct AudioEncoderOpus {
+struct RTC_EXPORT AudioEncoderOpus {
using Config = AudioEncoderOpusConfig;
static absl::optional<AudioEncoderOpusConfig> SdpToConfig(
const SdpAudioFormat& audio_format);
diff --git a/media/BUILD.gn b/media/BUILD.gn
index 858b272..cc203c6 100644
--- a/media/BUILD.gn
+++ b/media/BUILD.gn
@@ -136,6 +136,7 @@
"../modules/audio_processing:audio_processing_statistics",
"../rtc_base:rtc_base",
"../rtc_base:rtc_base_approved",
+ "../rtc_base/system:rtc_export",
"../rtc_base/third_party/sigslot",
"//third_party/abseil-cpp/absl/types:optional",
]
diff --git a/media/base/rtputils.h b/media/base/rtputils.h
index 0fd9a59..c5fe14f 100644
--- a/media/base/rtputils.h
+++ b/media/base/rtputils.h
@@ -12,6 +12,7 @@
#define MEDIA_BASE_RTPUTILS_H_
#include "rtc_base/byteorder.h"
+#include "rtc_base/system/rtc_export.h"
namespace rtc {
struct PacketTimeUpdateParams;
@@ -68,9 +69,9 @@
const char* RtpRtcpStringLiteral(bool rtcp);
// Verifies that a packet has a valid RTP header.
-bool ValidateRtpHeader(const uint8_t* rtp,
- size_t length,
- size_t* header_length);
+bool RTC_EXPORT ValidateRtpHeader(const uint8_t* rtp,
+ size_t length,
+ size_t* header_length);
// Helper method which updates the absolute send time extension if present.
bool UpdateRtpAbsSendTimeExtension(uint8_t* rtp,
@@ -80,10 +81,11 @@
// Applies specified |options| to the packet. It updates the absolute send time
// extension header if it is present present then updates HMAC.
-bool ApplyPacketOptions(uint8_t* data,
- size_t length,
- const rtc::PacketTimeUpdateParams& packet_time_params,
- uint64_t time_us);
+bool RTC_EXPORT
+ApplyPacketOptions(uint8_t* data,
+ size_t length,
+ const rtc::PacketTimeUpdateParams& packet_time_params,
+ uint64_t time_us);
} // namespace cricket
diff --git a/media/base/turnutils.h b/media/base/turnutils.h
index 13ed26b..7aa0651 100644
--- a/media/base/turnutils.h
+++ b/media/base/turnutils.h
@@ -14,16 +14,18 @@
#include <cstddef>
#include <cstdint>
+#include "rtc_base/system/rtc_export.h"
+
namespace cricket {
struct PacketOptions;
// Finds data location within a TURN Channel Message or TURN Send Indication
// message.
-bool UnwrapTurnPacket(const uint8_t* packet,
- size_t packet_size,
- size_t* content_position,
- size_t* content_size);
+bool RTC_EXPORT UnwrapTurnPacket(const uint8_t* packet,
+ size_t packet_size,
+ size_t* content_position,
+ size_t* content_size);
} // namespace cricket
diff --git a/modules/audio_processing/BUILD.gn b/modules/audio_processing/BUILD.gn
index a51b6a0..dd1569e 100644
--- a/modules/audio_processing/BUILD.gn
+++ b/modules/audio_processing/BUILD.gn
@@ -115,6 +115,7 @@
"../../rtc_base:safe_minmax",
"../../rtc_base:sanitizer",
"../../rtc_base/system:arch",
+ "../../rtc_base/system:rtc_export",
"../../system_wrappers:cpu_features_api",
"../../system_wrappers:field_trial",
"../../system_wrappers:metrics",
@@ -162,6 +163,7 @@
"include/audio_processing_statistics.h",
]
deps = [
+ "../../rtc_base/system:rtc_export",
"//third_party/abseil-cpp/absl/types:optional",
]
}
diff --git a/modules/audio_processing/aec_dump/BUILD.gn b/modules/audio_processing/aec_dump/BUILD.gn
index e5fee3e..5b55526 100644
--- a/modules/audio_processing/aec_dump/BUILD.gn
+++ b/modules/audio_processing/aec_dump/BUILD.gn
@@ -17,6 +17,7 @@
deps = [
"../",
"../../../rtc_base:rtc_base_approved",
+ "../../../rtc_base/system:rtc_export",
]
}
diff --git a/modules/audio_processing/aec_dump/aec_dump_factory.h b/modules/audio_processing/aec_dump/aec_dump_factory.h
index e3f00f6..1e55d59 100644
--- a/modules/audio_processing/aec_dump/aec_dump_factory.h
+++ b/modules/audio_processing/aec_dump/aec_dump_factory.h
@@ -16,6 +16,7 @@
#include "modules/audio_processing/include/aec_dump.h"
#include "rtc_base/platform_file.h"
+#include "rtc_base/system/rtc_export.h"
namespace rtc {
class TaskQueue;
@@ -23,7 +24,7 @@
namespace webrtc {
-class AecDumpFactory {
+class RTC_EXPORT AecDumpFactory {
public:
// The |worker_queue| may not be null and must outlive the created
// AecDump instance. |max_log_size_bytes == -1| means the log size
diff --git a/modules/audio_processing/include/audio_processing.h b/modules/audio_processing/include/audio_processing.h
index 26880e3..8af0cb2 100644
--- a/modules/audio_processing/include/audio_processing.h
+++ b/modules/audio_processing/include/audio_processing.h
@@ -34,6 +34,7 @@
#include "rtc_base/platform_file.h"
#include "rtc_base/refcount.h"
#include "rtc_base/scoped_ref_ptr.h"
+#include "rtc_base/system/rtc_export.h"
namespace webrtc {
@@ -551,7 +552,7 @@
float minimum_ = 0.0f; // Long-term minimum.
};
- struct AudioProcessingStatistics {
+ struct RTC_EXPORT AudioProcessingStatistics {
AudioProcessingStatistics();
AudioProcessingStatistics(const AudioProcessingStatistics& other);
~AudioProcessingStatistics();
@@ -648,7 +649,7 @@
static const int kChunkSizeMs = 10;
};
-class AudioProcessingBuilder {
+class RTC_EXPORT AudioProcessingBuilder {
public:
AudioProcessingBuilder();
~AudioProcessingBuilder();
diff --git a/modules/audio_processing/include/audio_processing_statistics.h b/modules/audio_processing/include/audio_processing_statistics.h
index 237d23c..2318bad 100644
--- a/modules/audio_processing/include/audio_processing_statistics.h
+++ b/modules/audio_processing/include/audio_processing_statistics.h
@@ -12,11 +12,12 @@
#define MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_PROCESSING_STATISTICS_H_
#include "absl/types/optional.h"
+#include "rtc_base/system/rtc_export.h"
namespace webrtc {
// This version of the stats uses Optionals, it will replace the regular
// AudioProcessingStatistics struct.
-struct AudioProcessingStats {
+struct RTC_EXPORT AudioProcessingStats {
AudioProcessingStats();
AudioProcessingStats(const AudioProcessingStats& other);
~AudioProcessingStats();
diff --git a/modules/audio_processing/include/config.h b/modules/audio_processing/include/config.h
index 398aab6..e77d3fd 100644
--- a/modules/audio_processing/include/config.h
+++ b/modules/audio_processing/include/config.h
@@ -14,6 +14,7 @@
#include <map>
#include "rtc_base/constructormagic.h"
+#include "rtc_base/system/rtc_export.h"
namespace webrtc {
@@ -57,7 +58,7 @@
// config.Set<Algo1_CostFunction>(new SqrCost());
//
// Note: This class is thread-compatible (like STL containers).
-class Config {
+class RTC_EXPORT Config {
public:
// Returns the option if set or a default constructed one.
// Callers that access options too often are encouraged to cache the result.
diff --git a/modules/audio_processing/typing_detection.h b/modules/audio_processing/typing_detection.h
index 70fd9033..d8fb359 100644
--- a/modules/audio_processing/typing_detection.h
+++ b/modules/audio_processing/typing_detection.h
@@ -11,9 +11,11 @@
#ifndef MODULES_AUDIO_PROCESSING_TYPING_DETECTION_H_
#define MODULES_AUDIO_PROCESSING_TYPING_DETECTION_H_
+#include "rtc_base/system/rtc_export.h"
+
namespace webrtc {
-class TypingDetection {
+class RTC_EXPORT TypingDetection {
public:
TypingDetection();
virtual ~TypingDetection();
diff --git a/modules/desktop_capture/BUILD.gn b/modules/desktop_capture/BUILD.gn
index 74de174..207f1d4 100644
--- a/modules/desktop_capture/BUILD.gn
+++ b/modules/desktop_capture/BUILD.gn
@@ -30,6 +30,7 @@
deps = [
"../..:webrtc_common",
"../../rtc_base:checks",
+ "../../rtc_base/system:rtc_export",
"//third_party/abseil-cpp/absl/memory",
]
@@ -376,6 +377,7 @@
"../../rtc_base:rtc_base", # TODO(kjellander): Cleanup in bugs.webrtc.org/3806.
"../../rtc_base/synchronization:rw_lock_wrapper",
"../../rtc_base/system:arch",
+ "../../rtc_base/system:rtc_export",
"../../system_wrappers",
"../../system_wrappers:cpu_features_api",
"../../system_wrappers:metrics",
diff --git a/modules/desktop_capture/cropped_desktop_frame.h b/modules/desktop_capture/cropped_desktop_frame.h
index 59dced4..6782398 100644
--- a/modules/desktop_capture/cropped_desktop_frame.h
+++ b/modules/desktop_capture/cropped_desktop_frame.h
@@ -12,6 +12,7 @@
#define MODULES_DESKTOP_CAPTURE_CROPPED_DESKTOP_FRAME_H_
#include "modules/desktop_capture/desktop_frame.h"
+#include "rtc_base/system/rtc_export.h"
namespace webrtc {
@@ -20,9 +21,9 @@
// |frame| should not be nullptr. |rect| is in |frame| coordinate, i.e.
// |frame|->top_left() does not impact the area of |rect|.
// Returns nullptr frame if |rect| is not contained by the bounds of |frame|.
-std::unique_ptr<DesktopFrame> CreateCroppedDesktopFrame(
- std::unique_ptr<DesktopFrame> frame,
- const DesktopRect& rect);
+std::unique_ptr<DesktopFrame> RTC_EXPORT
+CreateCroppedDesktopFrame(std::unique_ptr<DesktopFrame> frame,
+ const DesktopRect& rect);
} // namespace webrtc
diff --git a/modules/desktop_capture/cropping_window_capturer.h b/modules/desktop_capture/cropping_window_capturer.h
index c889801..224198f 100644
--- a/modules/desktop_capture/cropping_window_capturer.h
+++ b/modules/desktop_capture/cropping_window_capturer.h
@@ -15,14 +15,15 @@
#include "modules/desktop_capture/desktop_capture_options.h"
#include "modules/desktop_capture/desktop_capturer.h"
+#include "rtc_base/system/rtc_export.h"
namespace webrtc {
// WindowCapturer implementation that uses a screen capturer to capture the
// whole screen and crops the video frame to the window area when the captured
// window is on top.
-class CroppingWindowCapturer : public DesktopCapturer,
- public DesktopCapturer::Callback {
+class RTC_EXPORT CroppingWindowCapturer : public DesktopCapturer,
+ public DesktopCapturer::Callback {
public:
static std::unique_ptr<DesktopCapturer> CreateCapturer(
const DesktopCaptureOptions& options);
diff --git a/modules/desktop_capture/desktop_and_cursor_composer.h b/modules/desktop_capture/desktop_and_cursor_composer.h
index 7dff710..fa5d15c 100644
--- a/modules/desktop_capture/desktop_and_cursor_composer.h
+++ b/modules/desktop_capture/desktop_and_cursor_composer.h
@@ -17,14 +17,16 @@
#include "modules/desktop_capture/desktop_capturer.h"
#include "modules/desktop_capture/mouse_cursor_monitor.h"
#include "rtc_base/constructormagic.h"
+#include "rtc_base/system/rtc_export.h"
namespace webrtc {
// A wrapper for DesktopCapturer that also captures mouse using specified
// MouseCursorMonitor and renders it on the generated streams.
-class DesktopAndCursorComposer : public DesktopCapturer,
- public DesktopCapturer::Callback,
- public MouseCursorMonitor::Callback {
+class RTC_EXPORT DesktopAndCursorComposer
+ : public DesktopCapturer,
+ public DesktopCapturer::Callback,
+ public MouseCursorMonitor::Callback {
public:
// Creates a new blender that captures mouse cursor using
// MouseCursorMonitor::Create(options) and renders it into the frames
diff --git a/modules/desktop_capture/desktop_capture_options.h b/modules/desktop_capture/desktop_capture_options.h
index 60aa05c..44ba79d 100644
--- a/modules/desktop_capture/desktop_capture_options.h
+++ b/modules/desktop_capture/desktop_capture_options.h
@@ -12,6 +12,7 @@
#include "rtc_base/constructormagic.h"
#include "rtc_base/scoped_ref_ptr.h"
+#include "rtc_base/system/rtc_export.h"
#if defined(USE_X11)
#include "modules/desktop_capture/x11/shared_x_display.h"
@@ -26,7 +27,7 @@
// An object that stores initialization parameters for screen and window
// capturers.
-class DesktopCaptureOptions {
+class RTC_EXPORT DesktopCaptureOptions {
public:
// Returns instance of DesktopCaptureOptions with default parameters. On Linux
// also initializes X window connection. x_display() will be set to null if
diff --git a/modules/desktop_capture/desktop_capturer.h b/modules/desktop_capture/desktop_capturer.h
index 47196cf..effe0df 100644
--- a/modules/desktop_capture/desktop_capturer.h
+++ b/modules/desktop_capture/desktop_capturer.h
@@ -22,6 +22,7 @@
#include "modules/desktop_capture/desktop_capture_types.h"
#include "modules/desktop_capture/desktop_frame.h"
#include "modules/desktop_capture/shared_memory.h"
+#include "rtc_base/system/rtc_export.h"
namespace webrtc {
@@ -29,7 +30,7 @@
class DesktopFrame;
// Abstract interface for screen and window capturers.
-class DesktopCapturer {
+class RTC_EXPORT DesktopCapturer {
public:
enum class Result {
// The frame was captured successfully.
diff --git a/modules/desktop_capture/desktop_frame.h b/modules/desktop_capture/desktop_frame.h
index 6f7edfc..29b84b7 100644
--- a/modules/desktop_capture/desktop_frame.h
+++ b/modules/desktop_capture/desktop_frame.h
@@ -18,13 +18,14 @@
#include "modules/desktop_capture/desktop_region.h"
#include "modules/desktop_capture/shared_memory.h"
#include "rtc_base/constructormagic.h"
+#include "rtc_base/system/rtc_export.h"
namespace webrtc {
const int kStandardDPI = 96;
// DesktopFrame represents a video frame captured from the screen.
-class DesktopFrame {
+class RTC_EXPORT DesktopFrame {
public:
// DesktopFrame objects always hold RGBA data.
static const int kBytesPerPixel = 4;
@@ -135,7 +136,7 @@
};
// A DesktopFrame that stores data in the heap.
-class BasicDesktopFrame : public DesktopFrame {
+class RTC_EXPORT BasicDesktopFrame : public DesktopFrame {
public:
explicit BasicDesktopFrame(DesktopSize size);
diff --git a/modules/desktop_capture/fake_desktop_capturer.h b/modules/desktop_capture/fake_desktop_capturer.h
index 82c053c..fd867e3 100644
--- a/modules/desktop_capture/fake_desktop_capturer.h
+++ b/modules/desktop_capture/fake_desktop_capturer.h
@@ -17,6 +17,7 @@
#include "modules/desktop_capture/desktop_capturer.h"
#include "modules/desktop_capture/desktop_frame_generator.h"
#include "modules/desktop_capture/shared_memory.h"
+#include "rtc_base/system/rtc_export.h"
namespace webrtc {
@@ -31,7 +32,7 @@
// Double buffering is guaranteed by the FrameGenerator. FrameGenerator
// implements in desktop_frame_generator.h guarantee double buffering, they
// creates a new instance of DesktopFrame each time.
-class FakeDesktopCapturer : public DesktopCapturer {
+class RTC_EXPORT FakeDesktopCapturer : public DesktopCapturer {
public:
FakeDesktopCapturer();
~FakeDesktopCapturer() override;
diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn
index 72dd756..f7f5bb8 100644
--- a/rtc_base/BUILD.gn
+++ b/rtc_base/BUILD.gn
@@ -507,6 +507,7 @@
deps = [
":macromagic",
":ptr_util",
+ "system:rtc_export",
"//third_party/abseil-cpp/absl/memory",
]
}
diff --git a/rtc_base/task_queue.h b/rtc_base/task_queue.h
index b8b307c..888e203 100644
--- a/rtc_base/task_queue.h
+++ b/rtc_base/task_queue.h
@@ -18,6 +18,7 @@
#include "absl/memory/memory.h"
#include "rtc_base/constructormagic.h"
#include "rtc_base/scoped_ref_ptr.h"
+#include "rtc_base/system/rtc_export.h"
#include "rtc_base/thread_annotations.h"
namespace rtc {
@@ -150,7 +151,7 @@
// TaskQueue itself has been deleted or it may happen synchronously while the
// TaskQueue instance is being deleted. This may vary from one OS to the next
// so assumptions about lifetimes of pending tasks should not be made.
-class RTC_LOCKABLE TaskQueue {
+class RTC_LOCKABLE RTC_EXPORT TaskQueue {
public:
// TaskQueue priority levels. On some platforms these will map to thread
// priorities, on others such as Mac and iOS, GCD queue priorities.