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

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: I12ef6f85ccef7dae3afe9ecff99725af13d551e2
Reviewed-on: https://webrtc-review.googlesource.com/c/106684
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25246}
This commit is contained in:
Mirko Bonadei 2018-10-17 16:50:07 +02:00 committed by Commit Bot
parent 9d24795ef3
commit d65d179a50
7 changed files with 23 additions and 14 deletions

View file

@ -20,6 +20,7 @@
#include "api/video_codecs/sdp_video_format.h"
#include "common_types.h" // NOLINT(build/include)
#include "media/base/mediaconstants.h"
#include "rtc_base/system/rtc_export.h"
namespace cricket {
@ -62,7 +63,7 @@ class FeedbackParams {
std::vector<FeedbackParam> params_;
};
struct Codec {
struct RTC_EXPORT Codec {
int id;
std::string name;
int clockrate;
@ -142,7 +143,7 @@ struct AudioCodec : public Codec {
bool operator!=(const AudioCodec& c) const { return !(*this == c); }
};
struct VideoCodec : public Codec {
struct RTC_EXPORT VideoCodec : public Codec {
// Creates a codec with the given parameters.
VideoCodec(int id, const std::string& name);
// Creates a codec with the given name and empty id.
@ -215,8 +216,9 @@ const Codec* FindCodecById(const std::vector<Codec>& codecs, int payload_type) {
return nullptr;
}
bool CodecNamesEq(const std::string& name1, const std::string& name2);
bool CodecNamesEq(const char* name1, const char* name2);
RTC_EXPORT bool CodecNamesEq(const std::string& name1,
const std::string& name2);
RTC_EXPORT bool CodecNamesEq(const char* name1, const char* name2);
bool HasNack(const Codec& codec);
bool HasRemb(const Codec& codec);
bool HasRrtr(const Codec& codec);

View file

@ -62,7 +62,7 @@ absl::optional<ProfileLevelId> ParseProfileLevelId(const char* str);
// contained in an SDP key-value map. A default profile level id will be
// returned if the profile-level-id key is missing. Nothing will be returned if
// the key is present but the string is invalid.
absl::optional<ProfileLevelId> ParseSdpProfileLevelId(
RTC_EXPORT absl::optional<ProfileLevelId> ParseSdpProfileLevelId(
const CodecParameterMap& params);
// Given that a decoder supports up to a given frame size (in pixels) at up to a
@ -74,7 +74,7 @@ RTC_EXPORT absl::optional<Level> SupportedLevel(int max_frame_pixel_count,
// Returns canonical string representation as three hex bytes of the profile
// level id, or returns nothing for invalid profile level ids.
absl::optional<std::string> ProfileLevelIdToString(
RTC_EXPORT absl::optional<std::string> ProfileLevelIdToString(
const ProfileLevelId& profile_level_id);
// Generate codec parameters that will be used as answer in an SDP negotiation

View file

@ -13,6 +13,8 @@
#include <string>
#include "rtc_base/system/rtc_export.h"
// This file contains constants related to media.
namespace cricket {
@ -127,12 +129,12 @@ extern const char kComfortNoiseCodecName[];
extern const char kVp8CodecName[];
extern const char kVp9CodecName[];
extern const char kH264CodecName[];
RTC_EXPORT extern const char kH264CodecName[];
// RFC 6184 RTP Payload Format for H.264 video
extern const char kH264FmtpProfileLevelId[];
extern const char kH264FmtpLevelAsymmetryAllowed[];
extern const char kH264FmtpPacketizationMode[];
RTC_EXPORT extern const char kH264FmtpProfileLevelId[];
RTC_EXPORT extern const char kH264FmtpLevelAsymmetryAllowed[];
RTC_EXPORT extern const char kH264FmtpPacketizationMode[];
extern const char kH264FmtpSpropParameterSets[];
extern const char kH264ProfileLevelConstrainedBaseline[];

View file

@ -26,6 +26,7 @@
#include "media/base/videocommon.h"
#include "rtc_base/constructormagic.h"
#include "rtc_base/criticalsection.h"
#include "rtc_base/system/rtc_export.h"
#include "rtc_base/third_party/sigslot/sigslot.h"
#include "rtc_base/thread_checker.h"
#include "rtc_base/timestampaligner.h"
@ -72,8 +73,9 @@ enum CaptureState {
// media engine thread). Hence, the VideoCapture subclasses dont need to be
// thread safe.
//
class VideoCapturer : public sigslot::has_slots<>,
public rtc::VideoSourceInterface<webrtc::VideoFrame> {
class RTC_EXPORT VideoCapturer
: public sigslot::has_slots<>,
public rtc::VideoSourceInterface<webrtc::VideoFrame> {
public:
VideoCapturer();

View file

@ -16,6 +16,7 @@
#include "common_types.h" // NOLINT(build/include)
#include "media/base/codec.h"
#include "rtc_base/system/rtc_export.h"
namespace webrtc {
class VideoEncoder;
@ -25,7 +26,7 @@ namespace cricket {
// Deprecated. Use webrtc::VideoEncoderFactory instead.
// https://bugs.chromium.org/p/webrtc/issues/detail?id=7925
class WebRtcVideoEncoderFactory {
class RTC_EXPORT WebRtcVideoEncoderFactory {
public:
virtual ~WebRtcVideoEncoderFactory() {}

View file

@ -211,6 +211,7 @@ rtc_static_library("libstunprober") {
"..:webrtc_common",
"../rtc_base:checks",
"../rtc_base:rtc_base",
"../rtc_base/system:rtc_export",
]
}

View file

@ -22,6 +22,7 @@
#include "rtc_base/ipaddress.h"
#include "rtc_base/network.h"
#include "rtc_base/socketaddress.h"
#include "rtc_base/system/rtc_export.h"
#include "rtc_base/thread.h"
#include "rtc_base/thread_checker.h"
@ -49,7 +50,7 @@ enum NatType {
NATTYPE_NON_SYMMETRIC // Behind a non-symmetric NAT.
};
class StunProber : public sigslot::has_slots<> {
class RTC_EXPORT StunProber : public sigslot::has_slots<> {
public:
enum Status { // Used in UMA_HISTOGRAM_ENUMERATION.
SUCCESS, // Successfully received bytes from the server.