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

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: I67a4d016a11deca5ac5459826741dd2d3f7931d5
Reviewed-on: https://webrtc-review.googlesource.com/c/107400
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25298}
This commit is contained in:
Mirko Bonadei
2018-10-22 17:08:37 +02:00
committed by Commit Bot
parent 9a5da497b5
commit ac19414512
23 changed files with 51 additions and 23 deletions

View File

@ -35,6 +35,7 @@ rtc_source_set("audio_codecs_api") {
"../../rtc_base:deprecation", "../../rtc_base:deprecation",
"../../rtc_base:rtc_base_approved", "../../rtc_base:rtc_base_approved",
"../../rtc_base:sanitizer", "../../rtc_base:sanitizer",
"../../rtc_base/system:rtc_export",
"//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional", "//third_party/abseil-cpp/absl/types:optional",
] ]

View File

@ -16,11 +16,12 @@
#include "absl/strings/string_view.h" #include "absl/strings/string_view.h"
#include "rtc_base/checks.h" #include "rtc_base/checks.h"
#include "rtc_base/system/rtc_export.h"
namespace webrtc { namespace webrtc {
// SDP specification for a single audio codec. // SDP specification for a single audio codec.
struct SdpAudioFormat { struct RTC_EXPORT SdpAudioFormat {
using Parameters = std::map<std::string, std::string>; using Parameters = std::map<std::string, std::string>;
SdpAudioFormat(const SdpAudioFormat&); SdpAudioFormat(const SdpAudioFormat&);

View File

@ -207,7 +207,8 @@ std::unique_ptr<SessionDescriptionInterface> CreateSessionDescription(
std::unique_ptr<cricket::SessionDescription> description); std::unique_ptr<cricket::SessionDescription> description);
// CreateOffer and CreateAnswer callback interface. // CreateOffer and CreateAnswer callback interface.
class CreateSessionDescriptionObserver : public rtc::RefCountInterface { class RTC_EXPORT CreateSessionDescriptionObserver
: public rtc::RefCountInterface {
public: public:
// This callback transfers the ownership of the |desc|. // This callback transfers the ownership of the |desc|.
// TODO(deadbeef): Make this take an std::unique_ptr<> to avoid confusion // 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. // SetLocalDescription and SetRemoteDescription callback interface.
class SetSessionDescriptionObserver : public rtc::RefCountInterface { class RTC_EXPORT SetSessionDescriptionObserver : public rtc::RefCountInterface {
public: public:
virtual void OnSuccess() = 0; virtual void OnSuccess() = 0;
// See description in CreateSessionDescriptionObserver for OnFailure. // See description in CreateSessionDescriptionObserver for OnFailure.

View File

@ -294,7 +294,7 @@ class PeerConnectionInterface : public rtc::RefCountInterface {
// organization of the implementation, which isn't stable. So we // organization of the implementation, which isn't stable. So we
// need getters and setters at least for fields which applications // need getters and setters at least for fields which applications
// are interested in. // are interested in.
struct RTCConfiguration { struct RTC_EXPORT RTCConfiguration {
// This struct is subject to reorganization, both for naming // This struct is subject to reorganization, both for naming
// consistency, and to group settings to match where they are used // consistency, and to group settings to match where they are used
// in the implementation. To do that, we need getter and setter // in the implementation. To do that, we need getter and setter

View File

@ -17,6 +17,7 @@
#include "absl/types/optional.h" #include "absl/types/optional.h"
#include "api/mediatypes.h" #include "api/mediatypes.h"
#include "rtc_base/system/rtc_export.h"
namespace webrtc { namespace webrtc {
@ -616,7 +617,7 @@ struct RtcpParameters final {
bool operator!=(const RtcpParameters& o) const { return !(*this == o); } bool operator!=(const RtcpParameters& o) const { return !(*this == o); }
}; };
struct RtpParameters { struct RTC_EXPORT RtpParameters {
RtpParameters(); RtpParameters();
RtpParameters(const RtpParameters&); RtpParameters(const RtpParameters&);
~RtpParameters(); ~RtpParameters();

View File

@ -31,6 +31,7 @@ rtc_source_set("video_frame") {
deps = [ deps = [
"../../rtc_base:checks", "../../rtc_base:checks",
"../../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",
] ]
} }
@ -76,6 +77,7 @@ rtc_source_set("encoded_image") {
"../..:webrtc_common", "../..:webrtc_common",
"../../rtc_base:checks", "../../rtc_base:checks",
"../../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",
] ]
} }

View File

@ -16,12 +16,13 @@
#include "api/video/video_rotation.h" #include "api/video/video_rotation.h"
#include "api/video/video_timing.h" #include "api/video/video_timing.h"
#include "common_types.h" // NOLINT(build/include) #include "common_types.h" // NOLINT(build/include)
#include "rtc_base/system/rtc_export.h"
namespace webrtc { namespace webrtc {
// TODO(bug.webrtc.org/9378): This is a legacy api class, which is slowly being // 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. // cleaned up. Direct use of its members is strongly discouraged.
class EncodedImage { class RTC_EXPORT EncodedImage {
public: public:
static const size_t kBufferPaddingBytesH264; static const size_t kBufferPaddingBytesH264;

View File

@ -17,10 +17,11 @@
#include "api/video/color_space.h" #include "api/video/color_space.h"
#include "api/video/video_frame_buffer.h" #include "api/video/video_frame_buffer.h"
#include "api/video/video_rotation.h" #include "api/video/video_rotation.h"
#include "rtc_base/system/rtc_export.h"
namespace webrtc { namespace webrtc {
class VideoFrame { class RTC_EXPORT VideoFrame {
public: public:
// Preferred way of building VideoFrame objects. // Preferred way of building VideoFrame objects.
class Builder { class Builder {

View File

@ -15,12 +15,13 @@
#include "absl/types/optional.h" #include "absl/types/optional.h"
#include "api/video/video_sink_interface.h" #include "api/video/video_sink_interface.h"
#include "rtc_base/system/rtc_export.h"
namespace rtc { namespace rtc {
// VideoSinkWants is used for notifying the source of properties a video frame // VideoSinkWants is used for notifying the source of properties a video frame
// should have when it is delivered to a certain sink. // should have when it is delivered to a certain sink.
struct VideoSinkWants { struct RTC_EXPORT VideoSinkWants {
VideoSinkWants(); VideoSinkWants();
VideoSinkWants(const VideoSinkWants&); VideoSinkWants(const VideoSinkWants&);
~VideoSinkWants(); ~VideoSinkWants();

View File

@ -59,6 +59,7 @@ rtc_static_library("builtin_video_decoder_factory") {
":video_codecs_api", ":video_codecs_api",
"../../media:rtc_internal_video_codecs", "../../media:rtc_internal_video_codecs",
"../../rtc_base:ptr_util", "../../rtc_base:ptr_util",
"../../rtc_base/system:rtc_export",
"//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/memory",
] ]
} }
@ -79,6 +80,7 @@ rtc_static_library("builtin_video_encoder_factory") {
"../../media:rtc_internal_video_codecs", "../../media:rtc_internal_video_codecs",
"../../media:rtc_media_base", "../../media:rtc_media_base",
"../../rtc_base:ptr_util", "../../rtc_base:ptr_util",
"../../rtc_base/system:rtc_export",
"//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/memory",
] ]
} }

View File

@ -14,11 +14,13 @@
#include <memory> #include <memory>
#include "api/video_codecs/video_decoder_factory.h" #include "api/video_codecs/video_decoder_factory.h"
#include "rtc_base/system/rtc_export.h"
namespace webrtc { namespace webrtc {
// Creates a new factory that can create the built-in types of video decoders. // Creates a new factory that can create the built-in types of video decoders.
std::unique_ptr<VideoDecoderFactory> CreateBuiltinVideoDecoderFactory(); RTC_EXPORT std::unique_ptr<VideoDecoderFactory>
CreateBuiltinVideoDecoderFactory();
} // namespace webrtc } // namespace webrtc

View File

@ -14,12 +14,14 @@
#include <memory> #include <memory>
#include "api/video_codecs/video_encoder_factory.h" #include "api/video_codecs/video_encoder_factory.h"
#include "rtc_base/system/rtc_export.h"
namespace webrtc { namespace webrtc {
// Creates a new factory that can create the built-in types of video encoders. // Creates a new factory that can create the built-in types of video encoders.
// The factory has simulcast support for VP8. // The factory has simulcast support for VP8.
std::unique_ptr<VideoEncoderFactory> CreateBuiltinVideoEncoderFactory(); RTC_EXPORT std::unique_ptr<VideoEncoderFactory>
CreateBuiltinVideoEncoderFactory();
} // namespace webrtc } // namespace webrtc

View File

@ -14,11 +14,13 @@
#include <map> #include <map>
#include <string> #include <string>
#include "rtc_base/system/rtc_export.h"
namespace webrtc { namespace webrtc {
// SDP specification for a single video codec. // SDP specification for a single video codec.
// NOTE: This class is still under development and may change without notice. // NOTE: This class is still under development and may change without notice.
struct SdpVideoFormat { struct RTC_EXPORT SdpVideoFormat {
using Parameters = std::map<std::string, std::string>; using Parameters = std::map<std::string, std::string>;
explicit SdpVideoFormat(const std::string& name); explicit SdpVideoFormat(const std::string& name);

View File

@ -87,8 +87,8 @@ struct VideoCodecH264 {
}; };
// Translates from name of codec to codec type and vice versa. // Translates from name of codec to codec type and vice versa.
const char* CodecTypeToPayloadString(VideoCodecType type); RTC_EXPORT const char* CodecTypeToPayloadString(VideoCodecType type);
VideoCodecType PayloadStringToCodecType(const std::string& name); RTC_EXPORT VideoCodecType PayloadStringToCodecType(const std::string& name);
union VideoCodecUnion { union VideoCodecUnion {
VideoCodecVP8 VP8; VideoCodecVP8 VP8;

View File

@ -14,6 +14,7 @@
#include <stdint.h> #include <stdint.h>
#include "rtc_base/constructormagic.h" #include "rtc_base/constructormagic.h"
#include "rtc_base/system/rtc_export.h"
namespace webrtc { namespace webrtc {
@ -74,7 +75,7 @@ class DesktopSize {
}; };
// Represents a rectangle on the screen. // Represents a rectangle on the screen.
class DesktopRect { class RTC_EXPORT DesktopRect {
public: public:
static DesktopRect MakeSize(const DesktopSize& size) { static DesktopRect MakeSize(const DesktopSize& size) {
return DesktopRect(0, 0, size.width(), size.height()); return DesktopRect(0, 0, size.width(), size.height());

View File

@ -16,6 +16,7 @@
#include "modules/desktop_capture/desktop_geometry.h" #include "modules/desktop_capture/desktop_geometry.h"
#include "rtc_base/constructormagic.h" #include "rtc_base/constructormagic.h"
#include "rtc_base/system/rtc_export.h"
namespace webrtc { namespace webrtc {
@ -23,7 +24,7 @@ namespace webrtc {
// //
// Internally each region is stored as a set of rows where each row contains one // Internally each region is stored as a set of rows where each row contains one
// or more rectangles aligned vertically. // or more rectangles aligned vertically.
class DesktopRegion { class RTC_EXPORT DesktopRegion {
private: private:
// The following private types need to be declared first because they are used // The following private types need to be declared first because they are used
// in the public Iterator. // in the public Iterator.

View File

@ -16,12 +16,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 {
// SharedDesktopFrame is a DesktopFrame that may have multiple instances all // SharedDesktopFrame is a DesktopFrame that may have multiple instances all
// sharing the same buffer. // sharing the same buffer.
class SharedDesktopFrame : public DesktopFrame { class RTC_EXPORT SharedDesktopFrame : public DesktopFrame {
public: public:
~SharedDesktopFrame() override; ~SharedDesktopFrame() override;

View File

@ -20,6 +20,7 @@
#include "p2p/base/packettransportinternal.h" #include "p2p/base/packettransportinternal.h"
#include "p2p/base/port.h" #include "p2p/base/port.h"
#include "p2p/base/transportdescription.h" #include "p2p/base/transportdescription.h"
#include "rtc_base/system/rtc_export.h"
namespace cricket { namespace cricket {
@ -183,7 +184,7 @@ enum IceProtocolType {
// Once the public interface is supported, // Once the public interface is supported,
// (https://www.w3.org/TR/webrtc/#rtcicetransport-interface) // (https://www.w3.org/TR/webrtc/#rtcicetransport-interface)
// the IceTransportInterface will be split from this class. // the IceTransportInterface will be split from this class.
class IceTransportInternal : public rtc::PacketTransportInternal { class RTC_EXPORT IceTransportInternal : public rtc::PacketTransportInternal {
public: public:
IceTransportInternal(); IceTransportInternal();
~IceTransportInternal() override; ~IceTransportInternal() override;

View File

@ -13,6 +13,8 @@
#include <string> #include <string>
#include "rtc_base/system/rtc_export.h"
namespace cricket { namespace cricket {
// CN_ == "content name". When we initiate a session, we choose the // 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 char GROUP_TYPE_BUNDLE[];
extern const int ICE_UFRAG_LENGTH; 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_UFRAG_MIN_LENGTH;
extern const size_t ICE_PWD_MIN_LENGTH; extern const size_t ICE_PWD_MIN_LENGTH;
extern const size_t ICE_UFRAG_MAX_LENGTH; extern const size_t ICE_UFRAG_MAX_LENGTH;

View File

@ -42,6 +42,7 @@
#include "rtc_base/asyncpacketsocket.h" #include "rtc_base/asyncpacketsocket.h"
#include "rtc_base/constructormagic.h" #include "rtc_base/constructormagic.h"
#include "rtc_base/strings/string_builder.h" #include "rtc_base/strings/string_builder.h"
#include "rtc_base/system/rtc_export.h"
#include "rtc_base/third_party/sigslot/sigslot.h" #include "rtc_base/third_party/sigslot/sigslot.h"
namespace webrtc { namespace webrtc {
@ -75,7 +76,7 @@ class RemoteCandidate : public Candidate {
// P2PTransportChannel manages the candidates and connection process to keep // P2PTransportChannel manages the candidates and connection process to keep
// two P2P clients connected to each other. // two P2P clients connected to each other.
class P2PTransportChannel : public IceTransportInternal { class RTC_EXPORT P2PTransportChannel : public IceTransportInternal {
public: public:
// For testing only. // For testing only.
// TODO(zstein): Remove once AsyncResolverFactory is required. // TODO(zstein): Remove once AsyncResolverFactory is required.

View File

@ -21,6 +21,7 @@
#include "rtc_base/asyncpacketsocket.h" #include "rtc_base/asyncpacketsocket.h"
#include "rtc_base/networkroute.h" #include "rtc_base/networkroute.h"
#include "rtc_base/socket.h" #include "rtc_base/socket.h"
#include "rtc_base/system/rtc_export.h"
#include "rtc_base/third_party/sigslot/sigslot.h" #include "rtc_base/third_party/sigslot/sigslot.h"
namespace rtc { namespace rtc {
@ -28,7 +29,8 @@ struct PacketOptions;
struct PacketTime; struct PacketTime;
struct SentPacket; struct SentPacket;
class PacketTransportInternal : public virtual webrtc::PacketTransportInterface, class RTC_EXPORT PacketTransportInternal
: public virtual webrtc::PacketTransportInterface,
public sigslot::has_slots<> { public sigslot::has_slots<> {
public: public:
virtual const std::string& transport_name() const = 0; virtual const std::string& transport_name() const = 0;

View File

@ -37,6 +37,7 @@
#include "rtc_base/proxyinfo.h" #include "rtc_base/proxyinfo.h"
#include "rtc_base/ratetracker.h" #include "rtc_base/ratetracker.h"
#include "rtc_base/socketaddress.h" #include "rtc_base/socketaddress.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/weak_ptr.h" #include "rtc_base/weak_ptr.h"
@ -49,7 +50,7 @@ class ConnectionRequest;
extern const char LOCAL_PORT_TYPE[]; extern const char LOCAL_PORT_TYPE[];
extern const char STUN_PORT_TYPE[]; extern const char STUN_PORT_TYPE[];
extern const char PRFLX_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. // RFC 6544, TCP candidate encoding rules.
extern const int DISCARD_PORT; extern const int DISCARD_PORT;

View File

@ -14,6 +14,7 @@
#include <list> #include <list>
#include "rtc_base/stream.h" #include "rtc_base/stream.h"
#include "rtc_base/system/rtc_export.h"
namespace cricket { namespace cricket {
@ -45,7 +46,7 @@ class IPseudoTcpNotify {
// PseudoTcp // PseudoTcp
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
class PseudoTcp { class RTC_EXPORT PseudoTcp {
public: public:
static uint32_t Now(); static uint32_t Now();