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

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: I4d4e2ae52ee01de68147fd0f2cfe4c92d600ad94
Reviewed-on: https://webrtc-review.googlesource.com/c/106343
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25207}
This commit is contained in:
Mirko Bonadei 2018-10-16 14:13:50 +02:00 committed by Commit Bot
parent 0753675a3e
commit 276827cbdb
19 changed files with 60 additions and 32 deletions

View File

@ -15,13 +15,15 @@
#include "absl/strings/string_view.h"
#include "api/audio/echo_canceller3_config.h"
#include "rtc_base/system/rtc_export.h"
namespace webrtc {
// Parses a JSON-encoded string into an Aec3 config. Fields corresponds to
// substruct names, with the addition that there must be a top-level node
// "aec3". Returns default config values for anything that cannot be parsed from
// the string.
EchoCanceller3Config Aec3ConfigFromJsonString(absl::string_view json_string);
RTC_EXPORT EchoCanceller3Config
Aec3ConfigFromJsonString(absl::string_view json_string);
// Encodes an Aec3 config in JSON format. Fields corresponds to substruct names,
// with the addition that the top-level node is named "aec3".

View File

@ -114,6 +114,7 @@ rtc_static_library("audio_encoder_isac_float") {
"../../..:webrtc_common",
"../../../modules/audio_coding:isac",
"../../../rtc_base:rtc_base_approved",
"../../../rtc_base/system:rtc_export",
"//third_party/abseil-cpp/absl/memory",
"//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_encoder.h"
#include "api/audio_codecs/audio_format.h"
#include "rtc_base/system/rtc_export.h"
namespace webrtc {
@ -25,7 +26,7 @@ namespace webrtc {
// parameter to CreateAudioEncoderFactory<...>().
//
// NOTE: This struct is still under development and may change without notice.
struct AudioEncoderIsacFloat {
struct RTC_EXPORT AudioEncoderIsacFloat {
struct Config {
bool IsOk() const {
switch (sample_rate_hz) {

View File

@ -113,6 +113,7 @@
#include "rtc_base/socketaddress.h"
#include "rtc_base/sslcertificate.h"
#include "rtc_base/sslstreamadapter.h"
#include "rtc_base/system/rtc_export.h"
namespace rtc {
class SSLIdentity;
@ -1376,7 +1377,8 @@ rtc::scoped_refptr<PeerConnectionFactoryInterface> CreatePeerConnectionFactory(
// be created and used.
// If |network_controller_factory| is provided, it will be used if enabled via
// field trial.
rtc::scoped_refptr<PeerConnectionFactoryInterface> CreatePeerConnectionFactory(
RTC_EXPORT rtc::scoped_refptr<PeerConnectionFactoryInterface>
CreatePeerConnectionFactory(
rtc::Thread* network_thread,
rtc::Thread* worker_thread,
rtc::Thread* signaling_thread,

View File

@ -18,6 +18,7 @@
#include <vector>
#include "rtc_base/checks.h"
#include "rtc_base/system/rtc_export.h"
namespace webrtc {
@ -47,7 +48,7 @@ class RTCStatsMemberInterface;
// for (const RTCStatsMemberInterface* member : foo.Members()) {
// printf("%s = %s\n", member->name(), member->ValueToString().c_str());
// }
class RTCStats {
class RTC_EXPORT RTCStats {
public:
RTCStats(const std::string& id, int64_t timestamp_us)
: id_(id), timestamp_us_(timestamp_us) {}
@ -247,7 +248,7 @@ class RTCStatsMemberInterface {
// (undefined reference to |kType|). The supported types are the ones described
// by |RTCStatsMemberInterface::Type|.
template <typename T>
class RTCStatsMember : public RTCStatsMemberInterface {
class RTC_EXPORT RTCStatsMember : public RTCStatsMemberInterface {
public:
static const Type kType;

View File

@ -16,6 +16,7 @@
#include <vector>
#include "api/stats/rtcstats.h"
#include "rtc_base/system/rtc_export.h"
namespace webrtc {
@ -73,7 +74,7 @@ struct RTCNetworkType {
};
// https://w3c.github.io/webrtc-stats/#certificatestats-dict*
class RTCCertificateStats final : public RTCStats {
class RTC_EXPORT RTCCertificateStats final : public RTCStats {
public:
WEBRTC_RTCSTATS_DECL();
@ -89,7 +90,7 @@ class RTCCertificateStats final : public RTCStats {
};
// https://w3c.github.io/webrtc-stats/#codec-dict*
class RTCCodecStats final : public RTCStats {
class RTC_EXPORT RTCCodecStats final : public RTCStats {
public:
WEBRTC_RTCSTATS_DECL();
@ -110,7 +111,7 @@ class RTCCodecStats final : public RTCStats {
};
// https://w3c.github.io/webrtc-stats/#dcstats-dict*
class RTCDataChannelStats final : public RTCStats {
class RTC_EXPORT RTCDataChannelStats final : public RTCStats {
public:
WEBRTC_RTCSTATS_DECL();
@ -132,7 +133,7 @@ class RTCDataChannelStats final : public RTCStats {
// https://w3c.github.io/webrtc-stats/#candidatepair-dict*
// TODO(hbos): Tracking bug https://bugs.webrtc.org/7062
class RTCIceCandidatePairStats final : public RTCStats {
class RTC_EXPORT RTCIceCandidatePairStats final : public RTCStats {
public:
WEBRTC_RTCSTATS_DECL();
@ -186,7 +187,7 @@ class RTCIceCandidatePairStats final : public RTCStats {
// crbug.com/632723
// TODO(qingsi): Add the stats of STUN binding requests (keepalives) and collect
// them in the new PeerConnection::GetStats.
class RTCIceCandidateStats : public RTCStats {
class RTC_EXPORT RTCIceCandidateStats : public RTCStats {
public:
WEBRTC_RTCSTATS_DECL();
@ -221,7 +222,7 @@ class RTCIceCandidateStats : public RTCStats {
// |kType| need to be different ("RTCStatsType type") in the local/remote case.
// https://w3c.github.io/webrtc-stats/#rtcstatstype-str*
// This forces us to have to override copy() and type().
class RTCLocalIceCandidateStats final : public RTCIceCandidateStats {
class RTC_EXPORT RTCLocalIceCandidateStats final : public RTCIceCandidateStats {
public:
static const char kType[];
RTCLocalIceCandidateStats(const std::string& id, int64_t timestamp_us);
@ -230,7 +231,8 @@ class RTCLocalIceCandidateStats final : public RTCIceCandidateStats {
const char* type() const override;
};
class RTCRemoteIceCandidateStats final : public RTCIceCandidateStats {
class RTC_EXPORT RTCRemoteIceCandidateStats final
: public RTCIceCandidateStats {
public:
static const char kType[];
RTCRemoteIceCandidateStats(const std::string& id, int64_t timestamp_us);
@ -241,7 +243,7 @@ class RTCRemoteIceCandidateStats final : public RTCIceCandidateStats {
// https://w3c.github.io/webrtc-stats/#msstats-dict*
// TODO(hbos): Tracking bug crbug.com/660827
class RTCMediaStreamStats final : public RTCStats {
class RTC_EXPORT RTCMediaStreamStats final : public RTCStats {
public:
WEBRTC_RTCSTATS_DECL();
@ -256,7 +258,7 @@ class RTCMediaStreamStats final : public RTCStats {
// https://w3c.github.io/webrtc-stats/#mststats-dict*
// TODO(hbos): Tracking bug crbug.com/659137
class RTCMediaStreamTrackStats final : public RTCStats {
class RTC_EXPORT RTCMediaStreamTrackStats final : public RTCStats {
public:
WEBRTC_RTCSTATS_DECL();
@ -309,7 +311,7 @@ class RTCMediaStreamTrackStats final : public RTCStats {
};
// https://w3c.github.io/webrtc-stats/#pcstats-dict*
class RTCPeerConnectionStats final : public RTCStats {
class RTC_EXPORT RTCPeerConnectionStats final : public RTCStats {
public:
WEBRTC_RTCSTATS_DECL();
@ -324,7 +326,7 @@ class RTCPeerConnectionStats final : public RTCStats {
// https://w3c.github.io/webrtc-stats/#streamstats-dict*
// TODO(hbos): Tracking bug crbug.com/657854
class RTCRTPStreamStats : public RTCStats {
class RTC_EXPORT RTCRTPStreamStats : public RTCStats {
public:
WEBRTC_RTCSTATS_DECL();
@ -362,7 +364,7 @@ class RTCRTPStreamStats : public RTCStats {
// https://w3c.github.io/webrtc-stats/#inboundrtpstats-dict*
// TODO(hbos): Support the remote case |is_remote = true|.
// https://bugs.webrtc.org/7065
class RTCInboundRTPStreamStats final : public RTCRTPStreamStats {
class RTC_EXPORT RTCInboundRTPStreamStats final : public RTCRTPStreamStats {
public:
WEBRTC_RTCSTATS_DECL();
@ -406,7 +408,7 @@ class RTCInboundRTPStreamStats final : public RTCRTPStreamStats {
// https://w3c.github.io/webrtc-stats/#outboundrtpstats-dict*
// TODO(hbos): Support the remote case |is_remote = true|.
// https://bugs.webrtc.org/7066
class RTCOutboundRTPStreamStats final : public RTCRTPStreamStats {
class RTC_EXPORT RTCOutboundRTPStreamStats final : public RTCRTPStreamStats {
public:
WEBRTC_RTCSTATS_DECL();
@ -423,7 +425,7 @@ class RTCOutboundRTPStreamStats final : public RTCRTPStreamStats {
};
// https://w3c.github.io/webrtc-stats/#transportstats-dict*
class RTCTransportStats final : public RTCStats {
class RTC_EXPORT RTCTransportStats final : public RTCStats {
public:
WEBRTC_RTCSTATS_DECL();

View File

@ -35,6 +35,7 @@ rtc_source_set("video_codecs_api") {
"../..:webrtc_common",
"../../rtc_base:checks",
"../../rtc_base:rtc_base_approved",
"../../rtc_base/system:rtc_export",
"../video:encoded_image",
"../video:video_bitrate_allocation",
"../video:video_frame",

View File

@ -14,6 +14,7 @@
#include <string>
#include "common_types.h" // NOLINT(build/include)
#include "rtc_base/system/rtc_export.h"
namespace webrtc {
@ -98,7 +99,7 @@ union VideoCodecUnion {
enum class VideoCodecMode { kRealtimeVideo, kScreensharing };
// Common video codec properties
class VideoCodec {
class RTC_EXPORT VideoCodec {
public:
VideoCodec();

View File

@ -18,6 +18,7 @@
#include "api/video/encoded_image.h"
#include "api/video/video_frame.h"
#include "api/video_codecs/video_codec.h"
#include "rtc_base/system/rtc_export.h"
namespace webrtc {
@ -47,7 +48,7 @@ class DecodedImageCallback {
virtual int32_t ReceivedDecodedFrame(const uint64_t pictureId);
};
class VideoDecoder {
class RTC_EXPORT VideoDecoder {
public:
virtual ~VideoDecoder() {}

View File

@ -21,6 +21,7 @@
#include "api/video/video_frame.h"
#include "api/video_codecs/video_codec.h"
#include "rtc_base/checks.h"
#include "rtc_base/system/rtc_export.h"
namespace webrtc {
@ -73,7 +74,7 @@ class EncodedImageCallback {
virtual void OnDroppedFrame(DropReason reason) {}
};
class VideoEncoder {
class RTC_EXPORT VideoEncoder {
public:
struct QpThresholds {
QpThresholds(int l, int h) : low(l), high(h) {}

View File

@ -42,6 +42,7 @@ rtc_source_set("rtc_h264_profile_id") {
"..:webrtc_common",
"../rtc_base:rtc_base",
"../rtc_base:rtc_base_approved",
"../rtc_base/system:rtc_export",
"//third_party/abseil-cpp/absl/types:optional",
]
}
@ -218,6 +219,7 @@ rtc_static_library("rtc_internal_video_codecs") {
"../rtc_base:checks",
"../rtc_base:rtc_base_approved",
"../rtc_base:sequenced_task_checker",
"../rtc_base/system:rtc_export",
"../system_wrappers",
"//third_party/abseil-cpp/absl/types:optional",
"//third_party/libyuv",
@ -239,6 +241,7 @@ rtc_static_library("rtc_audio_video") {
"../modules/video_coding:video_coding_utility",
"../rtc_base:audio_format_to_string",
"../rtc_base:checks",
"../rtc_base/system:rtc_export",
"../rtc_base/third_party/base64",
"../system_wrappers:field_trial",
"../system_wrappers:metrics",

View File

@ -16,6 +16,7 @@
#include "absl/types/optional.h"
#include "common_types.h" // NOLINT(build/include)
#include "rtc_base/system/rtc_export.h"
namespace webrtc {
namespace H264 {
@ -68,7 +69,8 @@ absl::optional<ProfileLevelId> ParseSdpProfileLevelId(
// given number of frames per second, return the highest H.264 level where it
// can guarantee that it will be able to support all valid encoded streams that
// are within that level.
absl::optional<Level> SupportedLevel(int max_frame_pixel_count, float max_fps);
RTC_EXPORT absl::optional<Level> SupportedLevel(int max_frame_pixel_count,
float max_fps);
// Returns canonical string representation as three hex bytes of the profile
// level id, or returns nothing for invalid profile level ids.

View File

@ -13,6 +13,8 @@
#include <memory>
#include "rtc_base/system/rtc_export.h"
namespace webrtc {
class VideoEncoderFactory;
class VideoDecoderFactory;
@ -27,10 +29,12 @@ class WebRtcVideoDecoderFactory;
// new type of codec factories. The purpose of these functions is to provide an
// easy way for clients to migrate to the API with new factory types.
// TODO(magjed): Remove once old factories are gone, webrtc:7925.
std::unique_ptr<webrtc::VideoEncoderFactory> ConvertVideoEncoderFactory(
RTC_EXPORT std::unique_ptr<webrtc::VideoEncoderFactory>
ConvertVideoEncoderFactory(
std::unique_ptr<WebRtcVideoEncoderFactory> external_encoder_factory);
std::unique_ptr<webrtc::VideoDecoderFactory> ConvertVideoDecoderFactory(
RTC_EXPORT std::unique_ptr<webrtc::VideoDecoderFactory>
ConvertVideoDecoderFactory(
std::unique_ptr<WebRtcVideoDecoderFactory> external_decoder_factory);
} // namespace cricket

View File

@ -16,6 +16,7 @@
#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 {
// Multiplex codec is a completely modular/optional codec that allows users to
@ -36,7 +37,7 @@ namespace webrtc {
// and decoder instance(s) using these factories.
// - Use Multiplex*coderFactory classes in CreatePeerConnectionFactory() calls.
// - Select "multiplex" codec in SDP negotiation.
class MultiplexEncoderFactory : public VideoEncoderFactory {
class RTC_EXPORT MultiplexEncoderFactory : public VideoEncoderFactory {
public:
// |supports_augmenting_data| defines if the encoder would support augmenting
// data. If set, the encoder expects to receive video frame buffers of type
@ -54,7 +55,7 @@ class MultiplexEncoderFactory : public VideoEncoderFactory {
const bool supports_augmenting_data_;
};
class MultiplexDecoderFactory : public VideoDecoderFactory {
class RTC_EXPORT MultiplexDecoderFactory : public VideoDecoderFactory {
public:
// |supports_augmenting_data| defines if the decoder would support augmenting
// data. If set, the decoder is expected to output video frame buffers of type

View File

@ -16,6 +16,7 @@
#include "common_types.h" // NOLINT(build/include)
#include "media/base/codec.h"
#include "rtc_base/refcount.h"
#include "rtc_base/system/rtc_export.h"
namespace webrtc {
class VideoDecoder;
@ -29,7 +30,7 @@ struct VideoDecoderParams {
// Deprecated. Use webrtc::VideoDecoderFactory instead.
// https://bugs.chromium.org/p/webrtc/issues/detail?id=7925
class WebRtcVideoDecoderFactory {
class RTC_EXPORT WebRtcVideoDecoderFactory {
public:
// Caller takes the ownership of the returned object and it should be released
// by calling DestroyVideoDecoder().

View File

@ -54,6 +54,7 @@ rtc_source_set("module_api") {
"../api:libjingle_peerconnection_api",
"../modules/rtp_rtcp:rtp_video_header",
"../rtc_base:safe_conversions",
"../rtc_base/system:rtc_export",
]
}

View File

@ -19,6 +19,7 @@
#include "modules/include/module_common_types_public.h"
#include "modules/include/module_fec_types.h"
#include "modules/rtp_rtcp/source/rtp_video_header.h"
#include "rtc_base/system/rtc_export.h"
namespace webrtc {
@ -33,7 +34,7 @@ struct WebRtcRTPHeader {
int64_t ntp_time_ms;
};
class RTPFragmentationHeader {
class RTC_EXPORT RTPFragmentationHeader {
public:
RTPFragmentationHeader();
RTPFragmentationHeader(const RTPFragmentationHeader&) = delete;

View File

@ -303,6 +303,7 @@ rtc_static_library("webrtc_h264") {
"../../media:rtc_media_base",
"../../rtc_base:checks",
"../../rtc_base:rtc_base",
"../../rtc_base/system:rtc_export",
"../../system_wrappers:metrics",
"//third_party/abseil-cpp/absl/memory",
"//third_party/libyuv",

View File

@ -17,6 +17,7 @@
#include "media/base/codec.h"
#include "modules/video_coding/include/video_codec_interface.h"
#include "rtc_base/system/rtc_export.h"
namespace webrtc {
@ -26,13 +27,13 @@ struct SdpVideoFormat;
// |rtc_use_h264| build flag is true (if false, this function does nothing).
// This function should only be called before or during WebRTC initialization
// and is not thread-safe.
void DisableRtcUseH264();
RTC_EXPORT void DisableRtcUseH264();
// Returns a vector with all supported internal H264 profiles that we can
// negotiate in SDP, in order of preference.
std::vector<SdpVideoFormat> SupportedH264Codecs();
class H264Encoder : public VideoEncoder {
class RTC_EXPORT H264Encoder : public VideoEncoder {
public:
static std::unique_ptr<H264Encoder> Create(const cricket::VideoCodec& codec);
// If H.264 is supported (any implementation).
@ -41,7 +42,7 @@ class H264Encoder : public VideoEncoder {
~H264Encoder() override {}
};
class H264Decoder : public VideoDecoder {
class RTC_EXPORT H264Decoder : public VideoDecoder {
public:
static std::unique_ptr<H264Decoder> Create();
static bool IsSupported();