diff --git a/api/BUILD.gn b/api/BUILD.gn index 0b54fcb4d8..1a193d932a 100644 --- a/api/BUILD.gn +++ b/api/BUILD.gn @@ -466,6 +466,7 @@ rtc_source_set("ice_transport_factory") { ":scoped_refptr", "../p2p:rtc_p2p", "../rtc_base", + "../rtc_base/system:rtc_export", "//third_party/abseil-cpp/absl/memory", ] } diff --git a/api/ice_transport_factory.h b/api/ice_transport_factory.h index a8330df74e..f3a174f228 100644 --- a/api/ice_transport_factory.h +++ b/api/ice_transport_factory.h @@ -13,6 +13,7 @@ #include "api/ice_transport_interface.h" #include "api/scoped_refptr.h" +#include "rtc_base/system/rtc_export.h" namespace cricket { class PortAllocator; @@ -25,7 +26,7 @@ namespace webrtc { // The returned object must be accessed and destroyed on the thread that // created it. // The PortAllocator must outlive the created IceTransportInterface object. -rtc::scoped_refptr CreateIceTransport( +RTC_EXPORT rtc::scoped_refptr CreateIceTransport( cricket::PortAllocator* port_allocator); } // namespace webrtc diff --git a/api/jsep_ice_candidate.h b/api/jsep_ice_candidate.h index 5b224549bb..890c486898 100644 --- a/api/jsep_ice_candidate.h +++ b/api/jsep_ice_candidate.h @@ -21,11 +21,12 @@ #include "api/candidate.h" #include "api/jsep.h" #include "rtc_base/constructor_magic.h" +#include "rtc_base/system/rtc_export.h" namespace webrtc { // Implementation of IceCandidateInterface. -class JsepIceCandidate : public IceCandidateInterface { +class RTC_EXPORT JsepIceCandidate : public IceCandidateInterface { public: JsepIceCandidate(const std::string& sdp_mid, int sdp_mline_index); JsepIceCandidate(const std::string& sdp_mid, diff --git a/api/media_stream_interface.h b/api/media_stream_interface.h index 1249b85c96..ccacb4ca56 100644 --- a/api/media_stream_interface.h +++ b/api/media_stream_interface.h @@ -30,6 +30,7 @@ #include "api/video/video_source_interface.h" #include "modules/audio_processing/include/audio_processing_statistics.h" #include "rtc_base/ref_count.h" +#include "rtc_base/system/rtc_export.h" namespace webrtc { @@ -52,8 +53,8 @@ class NotifierInterface { // Base class for sources. A MediaStreamTrack has an underlying source that // provides media. A source can be shared by multiple tracks. -class MediaSourceInterface : public rtc::RefCountInterface, - public NotifierInterface { +class RTC_EXPORT MediaSourceInterface : public rtc::RefCountInterface, + public NotifierInterface { public: enum SourceState { kInitializing, kLive, kEnded, kMuted }; @@ -74,8 +75,8 @@ class MediaSourceInterface : public rtc::RefCountInterface, // C++ version of MediaStreamTrack. // See: https://www.w3.org/TR/mediacapture-streams/#mediastreamtrack -class MediaStreamTrackInterface : public rtc::RefCountInterface, - public NotifierInterface { +class RTC_EXPORT MediaStreamTrackInterface : public rtc::RefCountInterface, + public NotifierInterface { public: enum TrackState { kLive, @@ -190,7 +191,7 @@ class AudioTrackSinkInterface { // AudioSourceInterface is a reference counted source used for AudioTracks. // The same source can be used by multiple AudioTracks. -class AudioSourceInterface : public MediaSourceInterface { +class RTC_EXPORT AudioSourceInterface : public MediaSourceInterface { public: class AudioObserver { public: diff --git a/api/media_types.h b/api/media_types.h index 64e2ebc286..2f9e74c65f 100644 --- a/api/media_types.h +++ b/api/media_types.h @@ -13,6 +13,8 @@ #include +#include "rtc_base/system/rtc_export.h" + // The cricket and webrtc have separate definitions for what a media type is. // They're not compatible. Watch out for this. @@ -20,7 +22,7 @@ namespace cricket { enum MediaType { MEDIA_TYPE_AUDIO, MEDIA_TYPE_VIDEO, MEDIA_TYPE_DATA }; -std::string MediaTypeToString(MediaType type); +RTC_EXPORT std::string MediaTypeToString(MediaType type); // Aborts on invalid string. Only expected to be used on strings that are // guaranteed to be valid, such as MediaStreamTrackInterface::kind(). MediaType MediaTypeFromString(const std::string& type_str); diff --git a/api/peer_connection_interface.h b/api/peer_connection_interface.h index 1d7f96fa18..b925fe84e5 100644 --- a/api/peer_connection_interface.h +++ b/api/peer_connection_interface.h @@ -151,7 +151,7 @@ class StatsObserver : public rtc::RefCountInterface { enum class SdpSemantics { kPlanB, kUnifiedPlan }; -class PeerConnectionInterface : public rtc::RefCountInterface { +class RTC_EXPORT PeerConnectionInterface : public rtc::RefCountInterface { public: // See https://w3c.github.io/webrtc-pc/#dom-rtcsignalingstate enum SignalingState { diff --git a/api/rtc_error.h b/api/rtc_error.h index 904a619a5d..fdc1999299 100644 --- a/api/rtc_error.h +++ b/api/rtc_error.h @@ -20,6 +20,7 @@ #include "absl/strings/string_view.h" #include "rtc_base/checks.h" #include "rtc_base/logging.h" +#include "rtc_base/system/rtc_export.h" namespace webrtc { @@ -80,7 +81,7 @@ enum class RTCErrorType { // // Doesn't contain anything beyond a type and message now, but will in the // future as more errors are implemented. -class RTCError { +class RTC_EXPORT RTCError { public: // Constructors. diff --git a/api/rtp_parameters.h b/api/rtp_parameters.h index b7d7702d0b..7fd4952eb6 100644 --- a/api/rtp_parameters.h +++ b/api/rtp_parameters.h @@ -87,7 +87,7 @@ enum class DegradationPreference { BALANCED, }; -extern const double kDefaultBitratePriority; +RTC_EXPORT extern const double kDefaultBitratePriority; struct RtcpFeedback { RtcpFeedbackType type = RtcpFeedbackType::CCM; @@ -362,7 +362,7 @@ struct RtpRtxParameters { bool operator!=(const RtpRtxParameters& o) const { return !(*this == o); } }; -struct RtpEncodingParameters { +struct RTC_EXPORT RtpEncodingParameters { RtpEncodingParameters(); RtpEncodingParameters(const RtpEncodingParameters&); ~RtpEncodingParameters(); @@ -561,7 +561,7 @@ struct RtpCodecParameters { // RtpCapabilities is used to represent the static capabilities of an // endpoint. An application can use these capabilities to construct an // RtpParameters. -struct RtpCapabilities { +struct RTC_EXPORT RtpCapabilities { RtpCapabilities(); ~RtpCapabilities(); diff --git a/api/rtp_transceiver_interface.h b/api/rtp_transceiver_interface.h index aec0d155b0..9b052d1b73 100644 --- a/api/rtp_transceiver_interface.h +++ b/api/rtp_transceiver_interface.h @@ -22,6 +22,7 @@ #include "api/rtp_sender_interface.h" #include "api/scoped_refptr.h" #include "rtc_base/ref_count.h" +#include "rtc_base/system/rtc_export.h" namespace webrtc { @@ -36,7 +37,7 @@ enum class RtpTransceiverDirection { // Structure for initializing an RtpTransceiver in a call to // PeerConnectionInterface::AddTransceiver. // https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiverinit -struct RtpTransceiverInit final { +struct RTC_EXPORT RtpTransceiverInit final { RtpTransceiverInit(); RtpTransceiverInit(const RtpTransceiverInit&); ~RtpTransceiverInit(); diff --git a/api/sctp_transport_interface.h b/api/sctp_transport_interface.h index 3698fc2e56..6af0bfce34 100644 --- a/api/sctp_transport_interface.h +++ b/api/sctp_transport_interface.h @@ -33,7 +33,7 @@ enum class SctpTransportState { // SctpTransport. // It reflects the readonly attributes of the object in the specification. // http://w3c.github.io/webrtc-pc/#rtcsctptransport-interface -class SctpTransportInformation { +class RTC_EXPORT SctpTransportInformation { public: explicit SctpTransportInformation(SctpTransportState state); SctpTransportInformation( diff --git a/api/transport/BUILD.gn b/api/transport/BUILD.gn index 5810c604a3..47146d8899 100644 --- a/api/transport/BUILD.gn +++ b/api/transport/BUILD.gn @@ -15,6 +15,7 @@ rtc_source_set("bitrate_settings") { "bitrate_settings.h", ] deps = [ + "../../rtc_base/system:rtc_export", "//third_party/abseil-cpp/absl/types:optional", ] } diff --git a/api/transport/bitrate_settings.h b/api/transport/bitrate_settings.h index 77654bc401..f95ab7cb6e 100644 --- a/api/transport/bitrate_settings.h +++ b/api/transport/bitrate_settings.h @@ -12,6 +12,7 @@ #define API_TRANSPORT_BITRATE_SETTINGS_H_ #include "absl/types/optional.h" +#include "rtc_base/system/rtc_export.h" namespace webrtc { @@ -20,7 +21,7 @@ namespace webrtc { // estimator, and for initial configuration of the encoder. We may // want to create separate apis for those, and use a smaller struct // with only the min and max constraints. -struct BitrateSettings { +struct RTC_EXPORT BitrateSettings { BitrateSettings(); ~BitrateSettings(); BitrateSettings(const BitrateSettings&); diff --git a/api/video/BUILD.gn b/api/video/BUILD.gn index 026d534ed9..533e8d397c 100644 --- a/api/video/BUILD.gn +++ b/api/video/BUILD.gn @@ -130,6 +130,7 @@ rtc_source_set("video_bitrate_allocation") { "../../rtc_base:checks", "../../rtc_base:safe_conversions", "../../rtc_base:stringutils", + "../../rtc_base/system:rtc_export", "//third_party/abseil-cpp/absl/types:optional", ] } diff --git a/api/video/video_bitrate_allocation.h b/api/video/video_bitrate_allocation.h index ef64226058..d335a553c1 100644 --- a/api/video/video_bitrate_allocation.h +++ b/api/video/video_bitrate_allocation.h @@ -19,6 +19,7 @@ #include "absl/types/optional.h" #include "api/video/video_codec_constants.h" +#include "rtc_base/system/rtc_export.h" namespace webrtc { @@ -27,7 +28,7 @@ namespace webrtc { // layers are dependent or not, it is up to the user to aggregate. // For each index, the bitrate can also both set and unset. This is used with a // set bps = 0 to signal an explicit "turn off" signal. -class VideoBitrateAllocation { +class RTC_EXPORT VideoBitrateAllocation { public: static constexpr uint32_t kMaxBitrateBps = std::numeric_limits::max(); diff --git a/api/video_codecs/BUILD.gn b/api/video_codecs/BUILD.gn index 672246d829..21cdca2e54 100644 --- a/api/video_codecs/BUILD.gn +++ b/api/video_codecs/BUILD.gn @@ -143,6 +143,7 @@ rtc_static_library("rtc_software_fallback_wrappers") { "../../rtc_base:checks", "../../rtc_base:rtc_base_approved", "../../rtc_base/system:fallthrough", + "../../rtc_base/system:rtc_export", "../../system_wrappers:field_trial", "../video:encoded_image", "../video:video_bitrate_allocation", diff --git a/api/video_codecs/sdp_video_format.h b/api/video_codecs/sdp_video_format.h index edb78191c7..da1ff0baba 100644 --- a/api/video_codecs/sdp_video_format.h +++ b/api/video_codecs/sdp_video_format.h @@ -32,8 +32,10 @@ struct RTC_EXPORT SdpVideoFormat { ~SdpVideoFormat(); - friend bool operator==(const SdpVideoFormat& a, const SdpVideoFormat& b); - friend bool operator!=(const SdpVideoFormat& a, const SdpVideoFormat& b) { + friend RTC_EXPORT bool operator==(const SdpVideoFormat& a, + const SdpVideoFormat& b); + friend RTC_EXPORT bool operator!=(const SdpVideoFormat& a, + const SdpVideoFormat& b) { return !(a == b); } diff --git a/api/video_codecs/video_decoder_factory.h b/api/video_codecs/video_decoder_factory.h index a2216899c7..e4d83c2465 100644 --- a/api/video_codecs/video_decoder_factory.h +++ b/api/video_codecs/video_decoder_factory.h @@ -15,6 +15,8 @@ #include #include +#include "rtc_base/system/rtc_export.h" + namespace webrtc { class VideoDecoder; @@ -22,7 +24,7 @@ struct SdpVideoFormat; // A factory that creates VideoDecoders. // NOTE: This class is still under development and may change without notice. -class VideoDecoderFactory { +class RTC_EXPORT VideoDecoderFactory { public: // Returns a list of supported video formats in order of preference, to use // for signaling etc. diff --git a/api/video_codecs/video_decoder_software_fallback_wrapper.h b/api/video_codecs/video_decoder_software_fallback_wrapper.h index 0608715182..3f44e02b26 100644 --- a/api/video_codecs/video_decoder_software_fallback_wrapper.h +++ b/api/video_codecs/video_decoder_software_fallback_wrapper.h @@ -14,13 +14,15 @@ #include #include "api/video_codecs/video_decoder.h" +#include "rtc_base/system/rtc_export.h" namespace webrtc { // Used to wrap external VideoDecoders to provide a fallback option on // software decoding when a hardware decoder fails to decode a stream due to // hardware restrictions, such as max resolution. -std::unique_ptr CreateVideoDecoderSoftwareFallbackWrapper( +RTC_EXPORT std::unique_ptr +CreateVideoDecoderSoftwareFallbackWrapper( std::unique_ptr sw_fallback_decoder, std::unique_ptr hw_decoder); diff --git a/api/video_codecs/video_encoder_software_fallback_wrapper.h b/api/video_codecs/video_encoder_software_fallback_wrapper.h index 0f46ad41ba..fa93ab82e9 100644 --- a/api/video_codecs/video_encoder_software_fallback_wrapper.h +++ b/api/video_codecs/video_encoder_software_fallback_wrapper.h @@ -14,13 +14,15 @@ #include #include "api/video_codecs/video_encoder.h" +#include "rtc_base/system/rtc_export.h" namespace webrtc { // Used to wrap external VideoEncoders to provide a fallback option on // software encoding when a hardware encoder fails to encode a stream due to // hardware restrictions, such as max resolution. -std::unique_ptr CreateVideoEncoderSoftwareFallbackWrapper( +RTC_EXPORT std::unique_ptr +CreateVideoEncoderSoftwareFallbackWrapper( std::unique_ptr sw_fallback_encoder, std::unique_ptr hw_encoder); diff --git a/media/BUILD.gn b/media/BUILD.gn index 2c9974195d..c90cc47888 100644 --- a/media/BUILD.gn +++ b/media/BUILD.gn @@ -58,6 +58,7 @@ rtc_source_set("rtc_vp9_profile") { "..:webrtc_common", "../api/video_codecs:video_codecs_api", "../rtc_base:rtc_base_approved", + "../rtc_base/system:rtc_export", "//third_party/abseil-cpp/absl/types:optional", ] } @@ -168,6 +169,7 @@ rtc_static_library("rtc_simulcast_encoder_adapter") { "../rtc_base:rtc_base_approved", "../rtc_base:sequenced_task_checker", "../rtc_base/experiments:rate_control_settings", + "../rtc_base/system:rtc_export", "../system_wrappers", "../system_wrappers:field_trial", "//third_party/abseil-cpp/absl/types:optional", @@ -189,6 +191,7 @@ rtc_static_library("rtc_encoder_simulcast_proxy") { "../api/video:video_frame", "../api/video_codecs:video_codecs_api", "../modules/video_coding:video_codec_interface", + "../rtc_base/system:rtc_export", ] } diff --git a/media/base/adapted_video_track_source.h b/media/base/adapted_video_track_source.h index 21cff17a94..667715a272 100644 --- a/media/base/adapted_video_track_source.h +++ b/media/base/adapted_video_track_source.h @@ -22,6 +22,7 @@ #include "media/base/video_adapter.h" #include "media/base/video_broadcaster.h" #include "rtc_base/critical_section.h" +#include "rtc_base/system/rtc_export.h" #include "rtc_base/thread_annotations.h" namespace rtc { @@ -30,7 +31,7 @@ namespace rtc { // capture sources. Sinks must be added and removed on one and only // one thread, while AdaptFrame and OnFrame may be called on any // thread. -class AdaptedVideoTrackSource +class RTC_EXPORT AdaptedVideoTrackSource : public webrtc::Notifier { public: AdaptedVideoTrackSource(); diff --git a/media/base/codec.h b/media/base/codec.h index fe4455d2ce..b60d001de0 100644 --- a/media/base/codec.h +++ b/media/base/codec.h @@ -224,10 +224,10 @@ bool HasTransportCc(const Codec& codec); const VideoCodec* FindMatchingCodec( const std::vector& supported_codecs, const VideoCodec& codec); -bool IsSameCodec(const std::string& name1, - const CodecParameterMap& params1, - const std::string& name2, - const CodecParameterMap& params2); +RTC_EXPORT bool IsSameCodec(const std::string& name1, + const CodecParameterMap& params1, + const std::string& name2, + const CodecParameterMap& params2); } // namespace cricket diff --git a/media/base/media_constants.h b/media/base/media_constants.h index 97dcadc9f3..ea3c49a926 100644 --- a/media/base/media_constants.h +++ b/media/base/media_constants.h @@ -127,8 +127,8 @@ extern const char kGoogleSctpDataCodecName[]; extern const char kComfortNoiseCodecName[]; -extern const char kVp8CodecName[]; -extern const char kVp9CodecName[]; +RTC_EXPORT extern const char kVp8CodecName[]; +RTC_EXPORT extern const char kVp9CodecName[]; RTC_EXPORT extern const char kH264CodecName[]; // RFC 6184 RTP Payload Format for H.264 video diff --git a/media/base/vp9_profile.h b/media/base/vp9_profile.h index d08ec03841..e2bbf19005 100644 --- a/media/base/vp9_profile.h +++ b/media/base/vp9_profile.h @@ -15,11 +15,12 @@ #include "absl/types/optional.h" #include "api/video_codecs/sdp_video_format.h" +#include "rtc_base/system/rtc_export.h" namespace webrtc { // Profile information for VP9 video. -extern const char kVP9FmtpProfileId[]; +extern RTC_EXPORT const char kVP9FmtpProfileId[]; enum class VP9Profile { kProfile0, @@ -28,7 +29,7 @@ enum class VP9Profile { // Helper functions to convert VP9Profile to std::string. Returns "0" by // default. -std::string VP9ProfileToString(VP9Profile profile); +RTC_EXPORT std::string VP9ProfileToString(VP9Profile profile); // Helper functions to convert std::string to VP9Profile. Returns null if given // an invalid profile string. @@ -38,7 +39,7 @@ absl::optional StringToVP9Profile(const std::string& str); // SDP key-value map. A default profile(kProfile0) will be returned if the // profile key is missing. Nothing will be returned if the key is present but // the string is invalid. -absl::optional ParseSdpForVP9Profile( +RTC_EXPORT absl::optional ParseSdpForVP9Profile( const SdpVideoFormat::Parameters& params); // Returns true if the parameters have the same VP9 profile, or neither contains diff --git a/media/engine/encoder_simulcast_proxy.h b/media/engine/encoder_simulcast_proxy.h index 29151ad5e5..e9f9f34173 100644 --- a/media/engine/encoder_simulcast_proxy.h +++ b/media/engine/encoder_simulcast_proxy.h @@ -24,12 +24,13 @@ #include "api/video_codecs/video_encoder.h" #include "api/video_codecs/video_encoder_factory.h" #include "modules/video_coding/include/video_codec_interface.h" +#include "rtc_base/system/rtc_export.h" namespace webrtc { // This class provides fallback to SimulcastEncoderAdapter if default VP8Encoder // doesn't support simulcast for provided settings. -class EncoderSimulcastProxy : public VideoEncoder { +class RTC_EXPORT EncoderSimulcastProxy : public VideoEncoder { public: EncoderSimulcastProxy(VideoEncoderFactory* factory, const SdpVideoFormat& format); diff --git a/media/engine/fake_video_codec_factory.h b/media/engine/fake_video_codec_factory.h index 8e00418123..029a695337 100644 --- a/media/engine/fake_video_codec_factory.h +++ b/media/engine/fake_video_codec_factory.h @@ -16,12 +16,13 @@ #include "api/video_codecs/video_decoder_factory.h" #include "api/video_codecs/video_encoder_factory.h" +#include "rtc_base/system/rtc_export.h" namespace webrtc { // Provides a fake video encoder instance that produces frames large enough for // the given bitrate constraints. -class FakeVideoEncoderFactory : public VideoEncoderFactory { +class RTC_EXPORT FakeVideoEncoderFactory : public VideoEncoderFactory { public: FakeVideoEncoderFactory(); @@ -37,7 +38,7 @@ class FakeVideoEncoderFactory : public VideoEncoderFactory { // Provides a fake video decoder instance that ignores the given bitstream and // produces frames. -class FakeVideoDecoderFactory : public VideoDecoderFactory { +class RTC_EXPORT FakeVideoDecoderFactory : public VideoDecoderFactory { public: FakeVideoDecoderFactory(); diff --git a/media/engine/internal_decoder_factory.h b/media/engine/internal_decoder_factory.h index feb8f53995..2a580dea0b 100644 --- a/media/engine/internal_decoder_factory.h +++ b/media/engine/internal_decoder_factory.h @@ -17,10 +17,11 @@ #include "api/video_codecs/sdp_video_format.h" #include "api/video_codecs/video_decoder.h" #include "api/video_codecs/video_decoder_factory.h" +#include "rtc_base/system/rtc_export.h" namespace webrtc { -class InternalDecoderFactory : public VideoDecoderFactory { +class RTC_EXPORT InternalDecoderFactory : public VideoDecoderFactory { public: std::vector GetSupportedFormats() const override; std::unique_ptr CreateVideoDecoder( diff --git a/media/engine/internal_encoder_factory.h b/media/engine/internal_encoder_factory.h index c2442f10d6..79dbc46e08 100644 --- a/media/engine/internal_encoder_factory.h +++ b/media/engine/internal_encoder_factory.h @@ -17,10 +17,11 @@ #include "api/video_codecs/sdp_video_format.h" #include "api/video_codecs/video_encoder.h" #include "api/video_codecs/video_encoder_factory.h" +#include "rtc_base/system/rtc_export.h" namespace webrtc { -class InternalEncoderFactory : public VideoEncoderFactory { +class RTC_EXPORT InternalEncoderFactory : public VideoEncoderFactory { public: std::vector GetSupportedFormats() const override; diff --git a/media/engine/simulcast_encoder_adapter.h b/media/engine/simulcast_encoder_adapter.h index 039ab62a1a..202967f975 100644 --- a/media/engine/simulcast_encoder_adapter.h +++ b/media/engine/simulcast_encoder_adapter.h @@ -23,6 +23,7 @@ #include "modules/video_coding/include/video_codec_interface.h" #include "rtc_base/atomic_ops.h" #include "rtc_base/sequenced_task_checker.h" +#include "rtc_base/system/rtc_export.h" namespace webrtc { @@ -33,7 +34,7 @@ class VideoEncoderFactory; // webrtc::VideoEncoder instances with the given VideoEncoderFactory. // The object is created and destroyed on the worker thread, but all public // interfaces should be called from the encoder task queue. -class SimulcastEncoderAdapter : public VideoEncoder { +class RTC_EXPORT SimulcastEncoderAdapter : public VideoEncoder { public: explicit SimulcastEncoderAdapter(VideoEncoderFactory* factory, const SdpVideoFormat& format); diff --git a/modules/desktop_capture/mouse_cursor.h b/modules/desktop_capture/mouse_cursor.h index 1d997e23c8..2263610ede 100644 --- a/modules/desktop_capture/mouse_cursor.h +++ b/modules/desktop_capture/mouse_cursor.h @@ -16,10 +16,11 @@ #include "modules/desktop_capture/desktop_frame.h" #include "modules/desktop_capture/desktop_geometry.h" #include "rtc_base/constructor_magic.h" +#include "rtc_base/system/rtc_export.h" namespace webrtc { -class MouseCursor { +class RTC_EXPORT MouseCursor { public: MouseCursor(); diff --git a/modules/desktop_capture/mouse_cursor_monitor.h b/modules/desktop_capture/mouse_cursor_monitor.h index 6ba9099757..22fd629b1a 100644 --- a/modules/desktop_capture/mouse_cursor_monitor.h +++ b/modules/desktop_capture/mouse_cursor_monitor.h @@ -15,6 +15,7 @@ #include "modules/desktop_capture/desktop_capture_types.h" #include "modules/desktop_capture/desktop_geometry.h" +#include "rtc_base/system/rtc_export.h" namespace webrtc { @@ -84,7 +85,7 @@ class MouseCursorMonitor { // the specified screen. // // Deprecated: use Create() function. - static MouseCursorMonitor* CreateForScreen( + static RTC_EXPORT MouseCursorMonitor* CreateForScreen( const DesktopCaptureOptions& options, ScreenId screen); diff --git a/modules/video_coding/BUILD.gn b/modules/video_coding/BUILD.gn index ac1683445d..cdaff5d6ab 100644 --- a/modules/video_coding/BUILD.gn +++ b/modules/video_coding/BUILD.gn @@ -197,6 +197,7 @@ rtc_source_set("video_codec_interface") { "../../api/video_codecs:video_codecs_api", "../../common_video", "../../common_video/generic_frame_descriptor", + "../../rtc_base/system:rtc_export", "//third_party/abseil-cpp/absl/types:optional", ] } diff --git a/modules/video_coding/include/video_codec_interface.h b/modules/video_coding/include/video_codec_interface.h index 1b22cae52b..e0377eda92 100644 --- a/modules/video_coding/include/video_codec_interface.h +++ b/modules/video_coding/include/video_codec_interface.h @@ -20,6 +20,7 @@ #include "common_video/generic_frame_descriptor/generic_frame_info.h" #include "modules/include/module_common_types.h" #include "modules/video_coding/include/video_error_codes.h" +#include "rtc_base/system/rtc_export.h" namespace webrtc { @@ -100,7 +101,7 @@ static_assert(std::is_pod::value, ""); // Note: if any pointers are added to this struct or its sub-structs, it // must be fitted with a copy-constructor. This is because it is copied // in the copy-constructor of VCMEncodedFrame. -struct CodecSpecificInfo { +struct RTC_EXPORT CodecSpecificInfo { CodecSpecificInfo(); CodecSpecificInfo(const CodecSpecificInfo&); ~CodecSpecificInfo(); diff --git a/p2p/base/p2p_constants.h b/p2p/base/p2p_constants.h index bdd1ebeb09..a2be32de6f 100644 --- a/p2p/base/p2p_constants.h +++ b/p2p/base/p2p_constants.h @@ -31,15 +31,15 @@ extern const char CN_OTHER[]; // GN stands for group name extern const char GROUP_TYPE_BUNDLE[]; -extern const int ICE_UFRAG_LENGTH; +RTC_EXPORT extern const int ICE_UFRAG_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; extern const size_t ICE_PWD_MAX_LENGTH; -extern const int ICE_CANDIDATE_COMPONENT_RTP; -extern const int ICE_CANDIDATE_COMPONENT_RTCP; +RTC_EXPORT extern const int ICE_CANDIDATE_COMPONENT_RTP; +RTC_EXPORT extern const int ICE_CANDIDATE_COMPONENT_RTCP; extern const int ICE_CANDIDATE_COMPONENT_DEFAULT; // RFC 4145, SDP setup attribute values. diff --git a/p2p/base/port.h b/p2p/base/port.h index 2358f1b144..c42ee51ea9 100644 --- a/p2p/base/port.h +++ b/p2p/base/port.h @@ -46,9 +46,9 @@ namespace cricket { class Connection; class ConnectionRequest; -extern const char LOCAL_PORT_TYPE[]; -extern const char STUN_PORT_TYPE[]; -extern const char PRFLX_PORT_TYPE[]; +RTC_EXPORT extern const char LOCAL_PORT_TYPE[]; +RTC_EXPORT extern const char STUN_PORT_TYPE[]; +RTC_EXPORT extern const char PRFLX_PORT_TYPE[]; RTC_EXPORT extern const char RELAY_PORT_TYPE[]; // RFC 6544, TCP candidate encoding rules. diff --git a/pc/ice_server_parsing.h b/pc/ice_server_parsing.h index c73d803896..8cdd31aba0 100644 --- a/pc/ice_server_parsing.h +++ b/pc/ice_server_parsing.h @@ -17,6 +17,7 @@ #include "api/rtc_error.h" #include "p2p/base/port.h" #include "p2p/base/port_allocator.h" +#include "rtc_base/system/rtc_export.h" namespace webrtc { @@ -26,10 +27,10 @@ namespace webrtc { // // Intended to be used to convert/validate the servers passed into a // PeerConnection through RTCConfiguration. -RTCErrorType ParseIceServers( - const PeerConnectionInterface::IceServers& servers, - cricket::ServerAddresses* stun_servers, - std::vector* turn_servers); +RTC_EXPORT RTCErrorType +ParseIceServers(const PeerConnectionInterface::IceServers& servers, + cricket::ServerAddresses* stun_servers, + std::vector* turn_servers); } // namespace webrtc diff --git a/pc/webrtc_sdp.h b/pc/webrtc_sdp.h index 3ba5c7f2be..94008a067f 100644 --- a/pc/webrtc_sdp.h +++ b/pc/webrtc_sdp.h @@ -67,9 +67,9 @@ bool SdpDeserialize(const std::string& message, // candidates - The JsepIceCandidate from the SDP string. // error - The detail error information when parsing fails. // return - true on success, false on failure. -bool SdpDeserializeCandidate(const std::string& message, - JsepIceCandidate* candidate, - SdpParseError* error); +RTC_EXPORT bool SdpDeserializeCandidate(const std::string& message, + JsepIceCandidate* candidate, + SdpParseError* error); // Deserializes the passed in SDP string to a cricket Candidate. // The first line must be a=candidate line and only the first line will be