Export symbols needed by the Chromium component build (part 2).

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).

Bug: webrtc:9419
Change-Id: I6f27003001548ea9d54412fdf62d5dd7a39cfd46
Reviewed-on: https://webrtc-review.googlesource.com/c/106022
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25187}
This commit is contained in:
Mirko Bonadei
2018-10-15 17:15:12 +02:00
committed by Commit Bot
parent d4d5f8a0ec
commit 3b56ee73a3
18 changed files with 50 additions and 31 deletions

View File

@ -128,6 +128,7 @@ rtc_static_library("libjingle_peerconnection_api") {
"../rtc_base:rtc_base", "../rtc_base:rtc_base",
"../rtc_base:rtc_base_approved", "../rtc_base:rtc_base_approved",
"../rtc_base:stringutils", "../rtc_base:stringutils",
"../rtc_base/system:rtc_export",
] ]
if (is_nacl) { if (is_nacl) {
@ -250,6 +251,7 @@ rtc_source_set("rtc_stats_api") {
deps = [ deps = [
"../rtc_base:checks", "../rtc_base:checks",
"../rtc_base:rtc_base_approved", "../rtc_base:rtc_base_approved",
"../rtc_base/system:rtc_export",
] ]
} }

View File

@ -43,6 +43,7 @@ rtc_static_library("audio_decoder_L16") {
"../../..:webrtc_common", "../../..:webrtc_common",
"../../../modules/audio_coding:pcm16b", "../../../modules/audio_coding:pcm16b",
"../../../rtc_base:rtc_base_approved", "../../../rtc_base:rtc_base_approved",
"../../../rtc_base/system:rtc_export",
"//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/types:optional", "//third_party/abseil-cpp/absl/types:optional",
] ]

View File

@ -18,6 +18,7 @@
#include "api/audio_codecs/audio_codec_pair_id.h" #include "api/audio_codecs/audio_codec_pair_id.h"
#include "api/audio_codecs/audio_decoder.h" #include "api/audio_codecs/audio_decoder.h"
#include "api/audio_codecs/audio_format.h" #include "api/audio_codecs/audio_format.h"
#include "rtc_base/system/rtc_export.h"
namespace webrtc { namespace webrtc {
@ -25,7 +26,7 @@ namespace webrtc {
// CreateAudioDecoderFactory<...>(). // CreateAudioDecoderFactory<...>().
// //
// NOTE: This struct is still under development and may change without notice. // NOTE: This struct is still under development and may change without notice.
struct AudioDecoderL16 { struct RTC_EXPORT AudioDecoderL16 {
struct Config { struct Config {
bool IsOk() const { bool IsOk() const {
return (sample_rate_hz == 8000 || sample_rate_hz == 16000 || return (sample_rate_hz == 8000 || sample_rate_hz == 16000 ||

View File

@ -43,6 +43,7 @@ rtc_static_library("audio_decoder_g711") {
"../../..:webrtc_common", "../../..:webrtc_common",
"../../../modules/audio_coding:g711", "../../../modules/audio_coding:g711",
"../../../rtc_base:rtc_base_approved", "../../../rtc_base:rtc_base_approved",
"../../../rtc_base/system:rtc_export",
"//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/types:optional", "//third_party/abseil-cpp/absl/types:optional",
] ]

View File

@ -18,6 +18,7 @@
#include "api/audio_codecs/audio_codec_pair_id.h" #include "api/audio_codecs/audio_codec_pair_id.h"
#include "api/audio_codecs/audio_decoder.h" #include "api/audio_codecs/audio_decoder.h"
#include "api/audio_codecs/audio_format.h" #include "api/audio_codecs/audio_format.h"
#include "rtc_base/system/rtc_export.h"
namespace webrtc { namespace webrtc {
@ -25,7 +26,7 @@ namespace webrtc {
// CreateAudioDecoderFactory<...>(). // CreateAudioDecoderFactory<...>().
// //
// NOTE: This struct is still under development and may change without notice. // NOTE: This struct is still under development and may change without notice.
struct AudioDecoderG711 { struct RTC_EXPORT AudioDecoderG711 {
struct Config { struct Config {
enum class Type { kPcmU, kPcmA }; enum class Type { kPcmU, kPcmA };
bool IsOk() const { bool IsOk() const {

View File

@ -51,6 +51,7 @@ rtc_static_library("audio_decoder_g722") {
"../../..:webrtc_common", "../../..:webrtc_common",
"../../../modules/audio_coding:g722", "../../../modules/audio_coding:g722",
"../../../rtc_base:rtc_base_approved", "../../../rtc_base:rtc_base_approved",
"../../../rtc_base/system:rtc_export",
"//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/types:optional", "//third_party/abseil-cpp/absl/types:optional",
] ]

View File

@ -18,6 +18,7 @@
#include "api/audio_codecs/audio_codec_pair_id.h" #include "api/audio_codecs/audio_codec_pair_id.h"
#include "api/audio_codecs/audio_decoder.h" #include "api/audio_codecs/audio_decoder.h"
#include "api/audio_codecs/audio_format.h" #include "api/audio_codecs/audio_format.h"
#include "rtc_base/system/rtc_export.h"
namespace webrtc { namespace webrtc {
@ -25,7 +26,7 @@ namespace webrtc {
// CreateAudioDecoderFactory<...>(). // CreateAudioDecoderFactory<...>().
// //
// NOTE: This struct is still under development and may change without notice. // NOTE: This struct is still under development and may change without notice.
struct AudioDecoderG722 { struct RTC_EXPORT AudioDecoderG722 {
struct Config { struct Config {
bool IsOk() const { return num_channels == 1 || num_channels == 2; } bool IsOk() const { return num_channels == 1 || num_channels == 2; }
int num_channels; int num_channels;

View File

@ -20,6 +20,7 @@ rtc_static_library("audio_encoder_opus_config") {
] ]
deps = [ deps = [
"../../../rtc_base:rtc_base_approved", "../../../rtc_base:rtc_base_approved",
"../../../rtc_base/system:rtc_export",
"//third_party/abseil-cpp/absl/types:optional", "//third_party/abseil-cpp/absl/types:optional",
] ]
defines = [] defines = []

View File

@ -16,11 +16,12 @@
#include <vector> #include <vector>
#include "absl/types/optional.h" #include "absl/types/optional.h"
#include "rtc_base/system/rtc_export.h"
namespace webrtc { namespace webrtc {
// NOTE: This struct is still under development and may change without notice. // NOTE: This struct is still under development and may change without notice.
struct AudioEncoderOpusConfig { struct RTC_EXPORT AudioEncoderOpusConfig {
static constexpr int kDefaultFrameSizeMs = 20; static constexpr int kDefaultFrameSizeMs = 20;
// Opus API allows a min bitrate of 500bps, but Opus documentation suggests // Opus API allows a min bitrate of 500bps, but Opus documentation suggests

View File

@ -20,13 +20,14 @@
#include "rtc_base/checks.h" #include "rtc_base/checks.h"
#include "rtc_base/network_constants.h" #include "rtc_base/network_constants.h"
#include "rtc_base/socketaddress.h" #include "rtc_base/socketaddress.h"
#include "rtc_base/system/rtc_export.h"
namespace cricket { namespace cricket {
// Candidate for ICE based connection discovery. // Candidate for ICE based connection discovery.
// TODO(phoglund): remove things in here that are not needed in the public API. // TODO(phoglund): remove things in here that are not needed in the public API.
class Candidate { class RTC_EXPORT Candidate {
public: public:
Candidate(); Candidate();
// TODO(pthatcher): Match the ordering and param list as per RFC 5245 // TODO(pthatcher): Match the ordering and param list as per RFC 5245

View File

@ -29,6 +29,7 @@
#include "absl/types/optional.h" #include "absl/types/optional.h"
#include "api/rtcerror.h" #include "api/rtcerror.h"
#include "rtc_base/refcount.h" #include "rtc_base/refcount.h"
#include "rtc_base/system/rtc_export.h"
namespace cricket { namespace cricket {
class Candidate; class Candidate;
@ -73,13 +74,13 @@ class IceCandidateInterface {
// Creates a IceCandidateInterface based on SDP string. // Creates a IceCandidateInterface based on SDP string.
// Returns null if the sdp string can't be parsed. // Returns null if the sdp string can't be parsed.
// |error| may be null. // |error| may be null.
IceCandidateInterface* CreateIceCandidate(const std::string& sdp_mid, RTC_EXPORT IceCandidateInterface* CreateIceCandidate(const std::string& sdp_mid,
int sdp_mline_index, int sdp_mline_index,
const std::string& sdp, const std::string& sdp,
SdpParseError* error); SdpParseError* error);
// Creates an IceCandidateInterface based on a parsed candidate structure. // Creates an IceCandidateInterface based on a parsed candidate structure.
std::unique_ptr<IceCandidateInterface> CreateIceCandidate( RTC_EXPORT std::unique_ptr<IceCandidateInterface> CreateIceCandidate(
const std::string& sdp_mid, const std::string& sdp_mid,
int sdp_mline_index, int sdp_mline_index,
const cricket::Candidate& candidate); const cricket::Candidate& candidate);
@ -121,7 +122,7 @@ absl::optional<SdpType> SdpTypeFromString(const std::string& type_str);
// and is therefore not expected to be thread safe. // and is therefore not expected to be thread safe.
// //
// An instance can be created by CreateSessionDescription. // An instance can be created by CreateSessionDescription.
class SessionDescriptionInterface { class RTC_EXPORT SessionDescriptionInterface {
public: public:
// String representations of the supported SDP types. // String representations of the supported SDP types.
static const char kOffer[]; static const char kOffer[];
@ -181,21 +182,21 @@ class SessionDescriptionInterface {
// |error| may be null. // |error| may be null.
// TODO(steveanton): This function is deprecated. Please use the functions below // TODO(steveanton): This function is deprecated. Please use the functions below
// which take an SdpType enum instead. Remove this once it is no longer used. // which take an SdpType enum instead. Remove this once it is no longer used.
SessionDescriptionInterface* CreateSessionDescription(const std::string& type, RTC_EXPORT SessionDescriptionInterface* CreateSessionDescription(
const std::string& sdp, const std::string& type,
SdpParseError* error); const std::string& sdp,
SdpParseError* error);
// Creates a SessionDescriptionInterface based on the SDP string and the type. // Creates a SessionDescriptionInterface based on the SDP string and the type.
// Returns null if the SDP string cannot be parsed. // Returns null if the SDP string cannot be parsed.
// If using the signature with |error_out|, details of the parsing error may be // If using the signature with |error_out|, details of the parsing error may be
// written to |error_out| if it is not null. // written to |error_out| if it is not null.
std::unique_ptr<SessionDescriptionInterface> CreateSessionDescription( RTC_EXPORT std::unique_ptr<SessionDescriptionInterface>
SdpType type, CreateSessionDescription(SdpType type, const std::string& sdp);
const std::string& sdp); RTC_EXPORT std::unique_ptr<SessionDescriptionInterface>
std::unique_ptr<SessionDescriptionInterface> CreateSessionDescription( CreateSessionDescription(SdpType type,
SdpType type, const std::string& sdp,
const std::string& sdp, SdpParseError* error_out);
SdpParseError* error_out);
// Creates a SessionDescriptionInterface based on a parsed SDP structure and the // Creates a SessionDescriptionInterface based on a parsed SDP structure and the
// given type, ID and version. // given type, ID and version.

View File

@ -20,12 +20,13 @@
#include "rtc_base/refcount.h" #include "rtc_base/refcount.h"
#include "rtc_base/refcountedobject.h" #include "rtc_base/refcountedobject.h"
#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/scoped_ref_ptr.h"
#include "rtc_base/system/rtc_export.h"
namespace webrtc { namespace webrtc {
// A collection of stats. // A collection of stats.
// This is accessible as a map from |RTCStats::id| to |RTCStats|. // This is accessible as a map from |RTCStats::id| to |RTCStats|.
class RTCStatsReport : public rtc::RefCountInterface { class RTC_EXPORT RTCStatsReport : public rtc::RefCountInterface {
public: public:
typedef std::map<std::string, std::unique_ptr<const RTCStats>> StatsMap; typedef std::map<std::string, std::unique_ptr<const RTCStats>> StatsMap;

View File

@ -95,6 +95,7 @@ rtc_static_library("rtc_p2p") {
"../rtc_base:safe_minmax", "../rtc_base:safe_minmax",
"../rtc_base:stringutils", "../rtc_base:stringutils",
"../rtc_base:weak_ptr", "../rtc_base:weak_ptr",
"../rtc_base/system:rtc_export",
"../rtc_base/third_party/base64", "../rtc_base/third_party/base64",
"../rtc_base/third_party/sigslot", "../rtc_base/third_party/sigslot",
"../system_wrappers:field_trial", "../system_wrappers:field_trial",

View File

@ -17,6 +17,7 @@
#include "rtc_base/constructormagic.h" #include "rtc_base/constructormagic.h"
#include "rtc_base/proxyinfo.h" #include "rtc_base/proxyinfo.h"
#include "rtc_base/sslcertificate.h" #include "rtc_base/sslcertificate.h"
#include "rtc_base/system/rtc_export.h"
namespace rtc { namespace rtc {
@ -36,7 +37,7 @@ struct PacketSocketTcpOptions {
class AsyncPacketSocket; class AsyncPacketSocket;
class AsyncResolverInterface; class AsyncResolverInterface;
class PacketSocketFactory { class RTC_EXPORT PacketSocketFactory {
public: public:
enum Options { enum Options {
OPT_STUN = 0x04, OPT_STUN = 0x04,

View File

@ -21,6 +21,7 @@
#include "rtc_base/helpers.h" #include "rtc_base/helpers.h"
#include "rtc_base/proxyinfo.h" #include "rtc_base/proxyinfo.h"
#include "rtc_base/sslcertificate.h" #include "rtc_base/sslcertificate.h"
#include "rtc_base/system/rtc_export.h"
#include "rtc_base/third_party/sigslot/sigslot.h" #include "rtc_base/third_party/sigslot/sigslot.h"
#include "rtc_base/thread.h" #include "rtc_base/thread.h"
#include "rtc_base/thread_checker.h" #include "rtc_base/thread_checker.h"
@ -146,7 +147,7 @@ struct RelayCredentials {
typedef std::vector<ProtocolAddress> PortList; typedef std::vector<ProtocolAddress> PortList;
// TODO(deadbeef): Rename to TurnServerConfig. // TODO(deadbeef): Rename to TurnServerConfig.
struct RelayServerConfig { struct RTC_EXPORT RelayServerConfig {
explicit RelayServerConfig(RelayType type); explicit RelayServerConfig(RelayType type);
RelayServerConfig(const rtc::SocketAddress& address, RelayServerConfig(const rtc::SocketAddress& address,
const std::string& username, const std::string& username,
@ -183,7 +184,7 @@ struct RelayServerConfig {
rtc::SSLCertificateVerifier* tls_cert_verifier = nullptr; rtc::SSLCertificateVerifier* tls_cert_verifier = nullptr;
}; };
class PortAllocatorSession : public sigslot::has_slots<> { class RTC_EXPORT PortAllocatorSession : public sigslot::has_slots<> {
public: public:
// Content name passed in mostly for logging and debugging. // Content name passed in mostly for logging and debugging.
PortAllocatorSession(const std::string& content_name, PortAllocatorSession(const std::string& content_name,
@ -330,7 +331,7 @@ class PortAllocatorSession : public sigslot::has_slots<> {
// //
// This allows a PortAllocator subclass to be constructed and configured on one // This allows a PortAllocator subclass to be constructed and configured on one
// thread, and passed into an object that uses it on a different thread. // thread, and passed into an object that uses it on a different thread.
class PortAllocator : public sigslot::has_slots<> { class RTC_EXPORT PortAllocator : public sigslot::has_slots<> {
public: public:
PortAllocator(); PortAllocator();
~PortAllocator() override; ~PortAllocator() override;

View File

@ -22,11 +22,12 @@
#include "rtc_base/checks.h" #include "rtc_base/checks.h"
#include "rtc_base/messagequeue.h" #include "rtc_base/messagequeue.h"
#include "rtc_base/network.h" #include "rtc_base/network.h"
#include "rtc_base/system/rtc_export.h"
#include "rtc_base/thread.h" #include "rtc_base/thread.h"
namespace cricket { namespace cricket {
class BasicPortAllocator : public PortAllocator { class RTC_EXPORT BasicPortAllocator : public PortAllocator {
public: public:
// note: The (optional) relay_port_factory is owned by caller // note: The (optional) relay_port_factory is owned by caller
// and must have a life time that exceeds that of BasicPortAllocator. // and must have a life time that exceeds that of BasicPortAllocator.
@ -110,8 +111,8 @@ enum class SessionState {
// process will be started. // process will be started.
}; };
class BasicPortAllocatorSession : public PortAllocatorSession, class RTC_EXPORT BasicPortAllocatorSession : public PortAllocatorSession,
public rtc::MessageHandler { public rtc::MessageHandler {
public: public:
BasicPortAllocatorSession(BasicPortAllocator* allocator, BasicPortAllocatorSession(BasicPortAllocator* allocator,
const std::string& content_name, const std::string& content_name,
@ -274,7 +275,7 @@ class BasicPortAllocatorSession : public PortAllocatorSession,
// Records configuration information useful in creating ports. // Records configuration information useful in creating ports.
// TODO(deadbeef): Rename "relay" to "turn_server" in this struct. // TODO(deadbeef): Rename "relay" to "turn_server" in this struct.
struct PortConfiguration : public rtc::MessageData { struct RTC_EXPORT PortConfiguration : public rtc::MessageData {
// TODO(jiayl): remove |stun_address| when Chrome is updated. // TODO(jiayl): remove |stun_address| when Chrome is updated.
rtc::SocketAddress stun_address; rtc::SocketAddress stun_address;
ServerAddresses stun_servers; ServerAddresses stun_servers;

View File

@ -203,6 +203,7 @@ rtc_static_library("peerconnection") {
"../rtc_base:rtc_base_approved", "../rtc_base:rtc_base_approved",
"../rtc_base:stringutils", "../rtc_base:stringutils",
"../rtc_base/experiments:congestion_controller_experiment", "../rtc_base/experiments:congestion_controller_experiment",
"../rtc_base/system:rtc_export",
"../rtc_base/third_party/base64", "../rtc_base/third_party/base64",
"../rtc_base/third_party/sigslot", "../rtc_base/third_party/sigslot",
"../stats", "../stats",

View File

@ -15,13 +15,14 @@
#include "api/notifier.h" #include "api/notifier.h"
#include "api/video/video_sink_interface.h" #include "api/video/video_sink_interface.h"
#include "media/base/mediachannel.h" #include "media/base/mediachannel.h"
#include "rtc_base/system/rtc_export.h"
#include "rtc_base/thread_checker.h" #include "rtc_base/thread_checker.h"
namespace webrtc { namespace webrtc {
// VideoTrackSource is a convenience base class for implementations of // VideoTrackSource is a convenience base class for implementations of
// VideoTrackSourceInterface. // VideoTrackSourceInterface.
class VideoTrackSource : public Notifier<VideoTrackSourceInterface> { class RTC_EXPORT VideoTrackSource : public Notifier<VideoTrackSourceInterface> {
public: public:
explicit VideoTrackSource(bool remote); explicit VideoTrackSource(bool remote);
void SetState(SourceState new_state); void SetState(SourceState new_state);