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}
diff --git a/api/audio_codecs/BUILD.gn b/api/audio_codecs/BUILD.gn
index a7060a2..29c8fe2 100644
--- a/api/audio_codecs/BUILD.gn
+++ b/api/audio_codecs/BUILD.gn
@@ -35,6 +35,7 @@
"../../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",
]
diff --git a/api/audio_codecs/audio_format.h b/api/audio_codecs/audio_format.h
index 7748812..6638ea3 100644
--- a/api/audio_codecs/audio_format.h
+++ b/api/audio_codecs/audio_format.h
@@ -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&);
diff --git a/api/jsep.h b/api/jsep.h
index 03ce6d7..1c50455 100644
--- a/api/jsep.h
+++ b/api/jsep.h
@@ -207,7 +207,8 @@
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 @@
};
// 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.
diff --git a/api/peerconnectioninterface.h b/api/peerconnectioninterface.h
index a8063b1..021be7d 100644
--- a/api/peerconnectioninterface.h
+++ b/api/peerconnectioninterface.h
@@ -294,7 +294,7 @@
// 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
diff --git a/api/rtpparameters.h b/api/rtpparameters.h
index 377fb78..4d99acf 100644
--- a/api/rtpparameters.h
+++ b/api/rtpparameters.h
@@ -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 @@
bool operator!=(const RtcpParameters& o) const { return !(*this == o); }
};
-struct RtpParameters {
+struct RTC_EXPORT RtpParameters {
RtpParameters();
RtpParameters(const RtpParameters&);
~RtpParameters();
diff --git a/api/video/BUILD.gn b/api/video/BUILD.gn
index 3f71007..be69580 100644
--- a/api/video/BUILD.gn
+++ b/api/video/BUILD.gn
@@ -31,6 +31,7 @@
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 @@
"../..:webrtc_common",
"../../rtc_base:checks",
"../../rtc_base:rtc_base_approved",
+ "../../rtc_base/system:rtc_export",
"//third_party/abseil-cpp/absl/types:optional",
]
}
diff --git a/api/video/encoded_image.h b/api/video/encoded_image.h
index ed58d96..bda9121 100644
--- a/api/video/encoded_image.h
+++ b/api/video/encoded_image.h
@@ -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;
diff --git a/api/video/video_frame.h b/api/video/video_frame.h
index dcb533e..b62ef53 100644
--- a/api/video/video_frame.h
+++ b/api/video/video_frame.h
@@ -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 {
diff --git a/api/video/video_source_interface.h b/api/video/video_source_interface.h
index 4ee4719..2bf7370 100644
--- a/api/video/video_source_interface.h
+++ b/api/video/video_source_interface.h
@@ -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();
diff --git a/api/video_codecs/BUILD.gn b/api/video_codecs/BUILD.gn
index 3e07298..129336b 100644
--- a/api/video_codecs/BUILD.gn
+++ b/api/video_codecs/BUILD.gn
@@ -59,6 +59,7 @@
":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 @@
"../../media:rtc_internal_video_codecs",
"../../media:rtc_media_base",
"../../rtc_base:ptr_util",
+ "../../rtc_base/system:rtc_export",
"//third_party/abseil-cpp/absl/memory",
]
}
diff --git a/api/video_codecs/builtin_video_decoder_factory.h b/api/video_codecs/builtin_video_decoder_factory.h
index 1f8e75c..d516077 100644
--- a/api/video_codecs/builtin_video_decoder_factory.h
+++ b/api/video_codecs/builtin_video_decoder_factory.h
@@ -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
diff --git a/api/video_codecs/builtin_video_encoder_factory.h b/api/video_codecs/builtin_video_encoder_factory.h
index 6a6618f..2c45372 100644
--- a/api/video_codecs/builtin_video_encoder_factory.h
+++ b/api/video_codecs/builtin_video_encoder_factory.h
@@ -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
diff --git a/api/video_codecs/sdp_video_format.h b/api/video_codecs/sdp_video_format.h
index c25b857..edb7819 100644
--- a/api/video_codecs/sdp_video_format.h
+++ b/api/video_codecs/sdp_video_format.h
@@ -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);
diff --git a/api/video_codecs/video_codec.h b/api/video_codecs/video_codec.h
index c5758a4..cbbb649 100644
--- a/api/video_codecs/video_codec.h
+++ b/api/video_codecs/video_codec.h
@@ -87,8 +87,8 @@
};
// 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;