diff --git a/api/audio_codecs/BUILD.gn b/api/audio_codecs/BUILD.gn index a7060a229a..29c8fe2dda 100644 --- a/api/audio_codecs/BUILD.gn +++ b/api/audio_codecs/BUILD.gn @@ -35,6 +35,7 @@ rtc_source_set("audio_codecs_api") { "../../rtc_base:deprecation", "../../rtc_base:rtc_base_approved", "../../rtc_base:sanitizer", + "../../rtc_base/system:rtc_export", "//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/types:optional", ] diff --git a/api/audio_codecs/audio_format.h b/api/audio_codecs/audio_format.h index 7748812051..6638ea3556 100644 --- a/api/audio_codecs/audio_format.h +++ b/api/audio_codecs/audio_format.h @@ -16,11 +16,12 @@ #include "absl/strings/string_view.h" #include "rtc_base/checks.h" +#include "rtc_base/system/rtc_export.h" namespace webrtc { // SDP specification for a single audio codec. -struct SdpAudioFormat { +struct RTC_EXPORT SdpAudioFormat { using Parameters = std::map; SdpAudioFormat(const SdpAudioFormat&); diff --git a/api/jsep.h b/api/jsep.h index 03ce6d7e6a..1c50455d04 100644 --- a/api/jsep.h +++ b/api/jsep.h @@ -207,7 +207,8 @@ std::unique_ptr CreateSessionDescription( std::unique_ptr description); // CreateOffer and CreateAnswer callback interface. -class CreateSessionDescriptionObserver : public rtc::RefCountInterface { +class RTC_EXPORT CreateSessionDescriptionObserver + : public rtc::RefCountInterface { public: // This callback transfers the ownership of the |desc|. // TODO(deadbeef): Make this take an std::unique_ptr<> to avoid confusion @@ -228,7 +229,7 @@ class CreateSessionDescriptionObserver : public rtc::RefCountInterface { }; // SetLocalDescription and SetRemoteDescription callback interface. -class SetSessionDescriptionObserver : public rtc::RefCountInterface { +class RTC_EXPORT SetSessionDescriptionObserver : public rtc::RefCountInterface { public: virtual void OnSuccess() = 0; // See description in CreateSessionDescriptionObserver for OnFailure. diff --git a/api/peerconnectioninterface.h b/api/peerconnectioninterface.h index a8063b101e..021be7d366 100644 --- a/api/peerconnectioninterface.h +++ b/api/peerconnectioninterface.h @@ -294,7 +294,7 @@ class PeerConnectionInterface : public rtc::RefCountInterface { // organization of the implementation, which isn't stable. So we // need getters and setters at least for fields which applications // are interested in. - struct RTCConfiguration { + struct RTC_EXPORT RTCConfiguration { // This struct is subject to reorganization, both for naming // consistency, and to group settings to match where they are used // in the implementation. To do that, we need getter and setter diff --git a/api/rtpparameters.h b/api/rtpparameters.h index 377fb78954..4d99acf80d 100644 --- a/api/rtpparameters.h +++ b/api/rtpparameters.h @@ -17,6 +17,7 @@ #include "absl/types/optional.h" #include "api/mediatypes.h" +#include "rtc_base/system/rtc_export.h" namespace webrtc { @@ -616,7 +617,7 @@ struct RtcpParameters final { bool operator!=(const RtcpParameters& o) const { return !(*this == o); } }; -struct RtpParameters { +struct RTC_EXPORT RtpParameters { RtpParameters(); RtpParameters(const RtpParameters&); ~RtpParameters(); diff --git a/api/video/BUILD.gn b/api/video/BUILD.gn index 3f71007768..be69580884 100644 --- a/api/video/BUILD.gn +++ b/api/video/BUILD.gn @@ -31,6 +31,7 @@ rtc_source_set("video_frame") { deps = [ "../../rtc_base:checks", "../../rtc_base:rtc_base_approved", + "../../rtc_base/system:rtc_export", "//third_party/abseil-cpp/absl/types:optional", ] } @@ -76,6 +77,7 @@ rtc_source_set("encoded_image") { "../..:webrtc_common", "../../rtc_base:checks", "../../rtc_base:rtc_base_approved", + "../../rtc_base/system:rtc_export", "//third_party/abseil-cpp/absl/types:optional", ] } diff --git a/api/video/encoded_image.h b/api/video/encoded_image.h index ed58d96952..bda9121ed7 100644 --- a/api/video/encoded_image.h +++ b/api/video/encoded_image.h @@ -16,12 +16,13 @@ #include "api/video/video_rotation.h" #include "api/video/video_timing.h" #include "common_types.h" // NOLINT(build/include) +#include "rtc_base/system/rtc_export.h" namespace webrtc { // TODO(bug.webrtc.org/9378): This is a legacy api class, which is slowly being // cleaned up. Direct use of its members is strongly discouraged. -class EncodedImage { +class RTC_EXPORT EncodedImage { public: static const size_t kBufferPaddingBytesH264; diff --git a/api/video/video_frame.h b/api/video/video_frame.h index dcb533e29f..b62ef53330 100644 --- a/api/video/video_frame.h +++ b/api/video/video_frame.h @@ -17,10 +17,11 @@ #include "api/video/color_space.h" #include "api/video/video_frame_buffer.h" #include "api/video/video_rotation.h" +#include "rtc_base/system/rtc_export.h" namespace webrtc { -class VideoFrame { +class RTC_EXPORT VideoFrame { public: // Preferred way of building VideoFrame objects. class Builder { diff --git a/api/video/video_source_interface.h b/api/video/video_source_interface.h index 4ee4719455..2bf73704bf 100644 --- a/api/video/video_source_interface.h +++ b/api/video/video_source_interface.h @@ -15,12 +15,13 @@ #include "absl/types/optional.h" #include "api/video/video_sink_interface.h" +#include "rtc_base/system/rtc_export.h" namespace rtc { // VideoSinkWants is used for notifying the source of properties a video frame // should have when it is delivered to a certain sink. -struct VideoSinkWants { +struct RTC_EXPORT VideoSinkWants { VideoSinkWants(); VideoSinkWants(const VideoSinkWants&); ~VideoSinkWants(); diff --git a/api/video_codecs/BUILD.gn b/api/video_codecs/BUILD.gn index 3e072981c7..129336be58 100644 --- a/api/video_codecs/BUILD.gn +++ b/api/video_codecs/BUILD.gn @@ -59,6 +59,7 @@ rtc_static_library("builtin_video_decoder_factory") { ":video_codecs_api", "../../media:rtc_internal_video_codecs", "../../rtc_base:ptr_util", + "../../rtc_base/system:rtc_export", "//third_party/abseil-cpp/absl/memory", ] } @@ -79,6 +80,7 @@ rtc_static_library("builtin_video_encoder_factory") { "../../media:rtc_internal_video_codecs", "../../media:rtc_media_base", "../../rtc_base:ptr_util", + "../../rtc_base/system:rtc_export", "//third_party/abseil-cpp/absl/memory", ] } diff --git a/api/video_codecs/builtin_video_decoder_factory.h b/api/video_codecs/builtin_video_decoder_factory.h index 1f8e75c9ae..d516077d99 100644 --- a/api/video_codecs/builtin_video_decoder_factory.h +++ b/api/video_codecs/builtin_video_decoder_factory.h @@ -14,11 +14,13 @@ #include #include "api/video_codecs/video_decoder_factory.h" +#include "rtc_base/system/rtc_export.h" namespace webrtc { // Creates a new factory that can create the built-in types of video decoders. -std::unique_ptr CreateBuiltinVideoDecoderFactory(); +RTC_EXPORT std::unique_ptr +CreateBuiltinVideoDecoderFactory(); } // namespace webrtc diff --git a/api/video_codecs/builtin_video_encoder_factory.h b/api/video_codecs/builtin_video_encoder_factory.h index 6a6618fb32..2c4537205c 100644 --- a/api/video_codecs/builtin_video_encoder_factory.h +++ b/api/video_codecs/builtin_video_encoder_factory.h @@ -14,12 +14,14 @@ #include #include "api/video_codecs/video_encoder_factory.h" +#include "rtc_base/system/rtc_export.h" namespace webrtc { // Creates a new factory that can create the built-in types of video encoders. // The factory has simulcast support for VP8. -std::unique_ptr CreateBuiltinVideoEncoderFactory(); +RTC_EXPORT std::unique_ptr +CreateBuiltinVideoEncoderFactory(); } // namespace webrtc diff --git a/api/video_codecs/sdp_video_format.h b/api/video_codecs/sdp_video_format.h index c25b857fde..edb78191c7 100644 --- a/api/video_codecs/sdp_video_format.h +++ b/api/video_codecs/sdp_video_format.h @@ -14,11 +14,13 @@ #include #include +#include "rtc_base/system/rtc_export.h" + namespace webrtc { // SDP specification for a single video codec. // NOTE: This class is still under development and may change without notice. -struct SdpVideoFormat { +struct RTC_EXPORT SdpVideoFormat { using Parameters = std::map; explicit SdpVideoFormat(const std::string& name); diff --git a/api/video_codecs/video_codec.h b/api/video_codecs/video_codec.h index c5758a4dbb..cbbb6495d0 100644 --- a/api/video_codecs/video_codec.h +++ b/api/video_codecs/video_codec.h @@ -87,8 +87,8 @@ struct VideoCodecH264 { }; // Translates from name of codec to codec type and vice versa. -const char* CodecTypeToPayloadString(VideoCodecType type); -VideoCodecType PayloadStringToCodecType(const std::string& name); +RTC_EXPORT const char* CodecTypeToPayloadString(VideoCodecType type); +RTC_EXPORT VideoCodecType PayloadStringToCodecType(const std::string& name); union VideoCodecUnion { VideoCodecVP8 VP8; diff --git a/modules/desktop_capture/desktop_geometry.h b/modules/desktop_capture/desktop_geometry.h index 09ad55bb4b..623a4555f9 100644 --- a/modules/desktop_capture/desktop_geometry.h +++ b/modules/desktop_capture/desktop_geometry.h @@ -14,6 +14,7 @@ #include #include "rtc_base/constructormagic.h" +#include "rtc_base/system/rtc_export.h" namespace webrtc { @@ -74,7 +75,7 @@ class DesktopSize { }; // Represents a rectangle on the screen. -class DesktopRect { +class RTC_EXPORT DesktopRect { public: static DesktopRect MakeSize(const DesktopSize& size) { return DesktopRect(0, 0, size.width(), size.height()); diff --git a/modules/desktop_capture/desktop_region.h b/modules/desktop_capture/desktop_region.h index f4b9209e2d..cbb2d8c48b 100644 --- a/modules/desktop_capture/desktop_region.h +++ b/modules/desktop_capture/desktop_region.h @@ -16,6 +16,7 @@ #include "modules/desktop_capture/desktop_geometry.h" #include "rtc_base/constructormagic.h" +#include "rtc_base/system/rtc_export.h" namespace webrtc { @@ -23,7 +24,7 @@ namespace webrtc { // // Internally each region is stored as a set of rows where each row contains one // or more rectangles aligned vertically. -class DesktopRegion { +class RTC_EXPORT DesktopRegion { private: // The following private types need to be declared first because they are used // in the public Iterator. diff --git a/modules/desktop_capture/shared_desktop_frame.h b/modules/desktop_capture/shared_desktop_frame.h index f70508cee1..ea12c000f2 100644 --- a/modules/desktop_capture/shared_desktop_frame.h +++ b/modules/desktop_capture/shared_desktop_frame.h @@ -16,12 +16,13 @@ #include "rtc_base/refcount.h" #include "rtc_base/refcountedobject.h" #include "rtc_base/scoped_ref_ptr.h" +#include "rtc_base/system/rtc_export.h" namespace webrtc { // SharedDesktopFrame is a DesktopFrame that may have multiple instances all // sharing the same buffer. -class SharedDesktopFrame : public DesktopFrame { +class RTC_EXPORT SharedDesktopFrame : public DesktopFrame { public: ~SharedDesktopFrame() override; diff --git a/p2p/base/icetransportinternal.h b/p2p/base/icetransportinternal.h index a4af24b7c3..b360f7917e 100644 --- a/p2p/base/icetransportinternal.h +++ b/p2p/base/icetransportinternal.h @@ -20,6 +20,7 @@ #include "p2p/base/packettransportinternal.h" #include "p2p/base/port.h" #include "p2p/base/transportdescription.h" +#include "rtc_base/system/rtc_export.h" namespace cricket { @@ -183,7 +184,7 @@ enum IceProtocolType { // Once the public interface is supported, // (https://www.w3.org/TR/webrtc/#rtcicetransport-interface) // the IceTransportInterface will be split from this class. -class IceTransportInternal : public rtc::PacketTransportInternal { +class RTC_EXPORT IceTransportInternal : public rtc::PacketTransportInternal { public: IceTransportInternal(); ~IceTransportInternal() override; diff --git a/p2p/base/p2pconstants.h b/p2p/base/p2pconstants.h index b2e92eff13..2948be0bb8 100644 --- a/p2p/base/p2pconstants.h +++ b/p2p/base/p2pconstants.h @@ -13,6 +13,8 @@ #include +#include "rtc_base/system/rtc_export.h" + namespace cricket { // CN_ == "content name". When we initiate a session, we choose the @@ -29,7 +31,7 @@ extern const char CN_OTHER[]; extern const char GROUP_TYPE_BUNDLE[]; extern const int ICE_UFRAG_LENGTH; -extern const int ICE_PWD_LENGTH; +RTC_EXPORT extern const int ICE_PWD_LENGTH; extern const size_t ICE_UFRAG_MIN_LENGTH; extern const size_t ICE_PWD_MIN_LENGTH; extern const size_t ICE_UFRAG_MAX_LENGTH; diff --git a/p2p/base/p2ptransportchannel.h b/p2p/base/p2ptransportchannel.h index 84d28795dd..fd59bbdd8c 100644 --- a/p2p/base/p2ptransportchannel.h +++ b/p2p/base/p2ptransportchannel.h @@ -42,6 +42,7 @@ #include "rtc_base/asyncpacketsocket.h" #include "rtc_base/constructormagic.h" #include "rtc_base/strings/string_builder.h" +#include "rtc_base/system/rtc_export.h" #include "rtc_base/third_party/sigslot/sigslot.h" namespace webrtc { @@ -75,7 +76,7 @@ class RemoteCandidate : public Candidate { // P2PTransportChannel manages the candidates and connection process to keep // two P2P clients connected to each other. -class P2PTransportChannel : public IceTransportInternal { +class RTC_EXPORT P2PTransportChannel : public IceTransportInternal { public: // For testing only. // TODO(zstein): Remove once AsyncResolverFactory is required. diff --git a/p2p/base/packettransportinternal.h b/p2p/base/packettransportinternal.h index ca7f003611..3cdacbcabf 100644 --- a/p2p/base/packettransportinternal.h +++ b/p2p/base/packettransportinternal.h @@ -21,6 +21,7 @@ #include "rtc_base/asyncpacketsocket.h" #include "rtc_base/networkroute.h" #include "rtc_base/socket.h" +#include "rtc_base/system/rtc_export.h" #include "rtc_base/third_party/sigslot/sigslot.h" namespace rtc { @@ -28,8 +29,9 @@ struct PacketOptions; struct PacketTime; struct SentPacket; -class PacketTransportInternal : public virtual webrtc::PacketTransportInterface, - public sigslot::has_slots<> { +class RTC_EXPORT PacketTransportInternal + : public virtual webrtc::PacketTransportInterface, + public sigslot::has_slots<> { public: virtual const std::string& transport_name() const = 0; diff --git a/p2p/base/port.h b/p2p/base/port.h index 85711e41f5..be273bd15c 100644 --- a/p2p/base/port.h +++ b/p2p/base/port.h @@ -37,6 +37,7 @@ #include "rtc_base/proxyinfo.h" #include "rtc_base/ratetracker.h" #include "rtc_base/socketaddress.h" +#include "rtc_base/system/rtc_export.h" #include "rtc_base/third_party/sigslot/sigslot.h" #include "rtc_base/thread.h" #include "rtc_base/weak_ptr.h" @@ -49,7 +50,7 @@ class ConnectionRequest; extern const char LOCAL_PORT_TYPE[]; extern const char STUN_PORT_TYPE[]; extern const char PRFLX_PORT_TYPE[]; -extern const char RELAY_PORT_TYPE[]; +RTC_EXPORT extern const char RELAY_PORT_TYPE[]; // RFC 6544, TCP candidate encoding rules. extern const int DISCARD_PORT; diff --git a/p2p/base/pseudotcp.h b/p2p/base/pseudotcp.h index c363ef64b7..5b26aeb21a 100644 --- a/p2p/base/pseudotcp.h +++ b/p2p/base/pseudotcp.h @@ -14,6 +14,7 @@ #include #include "rtc_base/stream.h" +#include "rtc_base/system/rtc_export.h" namespace cricket { @@ -45,7 +46,7 @@ class IPseudoTcpNotify { // PseudoTcp ////////////////////////////////////////////////////////////////////// -class PseudoTcp { +class RTC_EXPORT PseudoTcp { public: static uint32_t Now();