Export symbols needed by the Chromium component build (part 8).
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: Ib2c29054b2ae008f5291bd3b762a504b18534326
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130513
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27410}
diff --git a/api/BUILD.gn b/api/BUILD.gn
index 0b54fcb..1a193d9 100644
--- a/api/BUILD.gn
+++ b/api/BUILD.gn
@@ -466,6 +466,7 @@
":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 a8330df..f3a174f 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 @@
// 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<IceTransportInterface> CreateIceTransport(
+RTC_EXPORT rtc::scoped_refptr<IceTransportInterface> CreateIceTransport(
cricket::PortAllocator* port_allocator);
} // namespace webrtc
diff --git a/api/jsep_ice_candidate.h b/api/jsep_ice_candidate.h
index 5b22454..890c486 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 1249b85..ccacb4c 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 @@
// 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 @@
// 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 @@
// 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 64e2ebc..2f9e74c 100644
--- a/api/media_types.h
+++ b/api/media_types.h
@@ -13,6 +13,8 @@
#include <string>
+#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 @@
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 1d7f96f..b925fe8 100644
--- a/api/peer_connection_interface.h
+++ b/api/peer_connection_interface.h
@@ -151,7 +151,7 @@
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 904a619..fdc1999 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 @@
//
// 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 b7d7702..7fd4952 100644
--- a/api/rtp_parameters.h
+++ b/api/rtp_parameters.h
@@ -87,7 +87,7 @@
BALANCED,
};
-extern const double kDefaultBitratePriority;
+RTC_EXPORT extern const double kDefaultBitratePriority;
struct RtcpFeedback {
RtcpFeedbackType type = RtcpFeedbackType::CCM;
@@ -362,7 +362,7 @@
bool operator!=(const RtpRtxParameters& o) const { return !(*this == o); }
};
-struct RtpEncodingParameters {
+struct RTC_EXPORT RtpEncodingParameters {
RtpEncodingParameters();
RtpEncodingParameters(const RtpEncodingParameters&);
~RtpEncodingParameters();
@@ -561,7 +561,7 @@
// 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 aec0d15..9b052d1 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 @@
// 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 3698fc2..6af0bfc 100644
--- a/api/sctp_transport_interface.h
+++ b/api/sctp_transport_interface.h
@@ -33,7 +33,7 @@
// 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 5810c60..47146d8 100644
--- a/api/transport/BUILD.gn
+++ b/api/transport/BUILD.gn
@@ -15,6 +15,7 @@
"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 77654bc..f95ab7c 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 @@
// 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 026d534..533e8d3 100644
--- a/api/video/BUILD.gn
+++ b/api/video/BUILD.gn
@@ -130,6 +130,7 @@
"../../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 ef64226..d335a55 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 @@
// 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<uint32_t>::max();
diff --git a/api/video_codecs/BUILD.gn b/api/video_codecs/BUILD.gn
index 672246d..21cdca2 100644
--- a/api/video_codecs/BUILD.gn
+++ b/api/video_codecs/BUILD.gn
@@ -143,6 +143,7 @@
"../../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 edb7819..da1ff0b 100644
--- a/api/video_codecs/sdp_video_format.h
+++ b/api/video_codecs/sdp_video_format.h
@@ -32,8 +32,10 @@
~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 a221689..e4d83c2 100644
--- a/api/video_codecs/video_decoder_factory.h
+++ b/api/video_codecs/video_decoder_factory.h
@@ -15,6 +15,8 @@
#include <string>
#include <vector>
+#include "rtc_base/system/rtc_export.h"
+
namespace webrtc {
class VideoDecoder;
@@ -22,7 +24,7 @@
// 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 0608715..3f44e02 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 <memory>
#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<VideoDecoder> CreateVideoDecoderSoftwareFallbackWrapper(
+RTC_EXPORT std::unique_ptr<VideoDecoder>
+CreateVideoDecoderSoftwareFallbackWrapper(
std::unique_ptr<VideoDecoder> sw_fallback_decoder,
std::unique_ptr<VideoDecoder> 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 0f46ad4..fa93ab8 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 <memory>
#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<VideoEncoder> CreateVideoEncoderSoftwareFallbackWrapper(
+RTC_EXPORT std::unique_ptr<VideoEncoder>
+CreateVideoEncoderSoftwareFallbackWrapper(
std::unique_ptr<VideoEncoder> sw_fallback_encoder,
std::unique_ptr<VideoEncoder> hw_encoder);