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:rtc_base_approved",
"../../rtc_base:sanitizer",
"../../rtc_base/system:rtc_export",
"//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional",
]

View file

@ -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<std::string, std::string>;
SdpAudioFormat(const SdpAudioFormat&);

View file

@ -207,7 +207,8 @@ std::unique_ptr<SessionDescriptionInterface> CreateSessionDescription(
std::unique_ptr<cricket::SessionDescription> 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.

View file

@ -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

View file

@ -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();

View file

@ -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",
]
}

View file

@ -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;

View file

@ -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 {

View file

@ -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();

View file

@ -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",
]
}

View file

@ -14,11 +14,13 @@
#include <memory>
#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<VideoDecoderFactory> CreateBuiltinVideoDecoderFactory();
RTC_EXPORT std::unique_ptr<VideoDecoderFactory>
CreateBuiltinVideoDecoderFactory();
} // namespace webrtc

View file

@ -14,12 +14,14 @@
#include <memory>
#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<VideoEncoderFactory> CreateBuiltinVideoEncoderFactory();
RTC_EXPORT std::unique_ptr<VideoEncoderFactory>
CreateBuiltinVideoEncoderFactory();
} // namespace webrtc

View file

@ -14,11 +14,13 @@
#include <map>
#include <string>
#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<std::string, std::string>;
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.
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;

View file

@ -14,6 +14,7 @@
#include <stdint.h>
#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());

View file

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

View file

@ -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;

View file

@ -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;

View file

@ -13,6 +13,8 @@
#include <string>
#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;

View file

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

View file

@ -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;

View file

@ -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;

View file

@ -14,6 +14,7 @@
#include <list>
#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();