From a2f7798ec2fe29652bade4ba6b3f29c65328360e Mon Sep 17 00:00:00 2001 From: hjon Date: Fri, 4 Mar 2016 07:09:09 -0800 Subject: [PATCH] Tweaks for new Objective-C API. BUG= Review URL: https://codereview.webrtc.org/1696673003 Cr-Commit-Position: refs/heads/master@{#11872} --- webrtc/api/api.gyp | 7 +++++ webrtc/api/objc/RTCAVFoundationVideoSource.h | 2 +- webrtc/api/objc/RTCConfiguration.mm | 2 +- webrtc/api/objc/RTCDataChannel.h | 2 +- webrtc/api/objc/RTCDataChannel.mm | 4 +-- webrtc/api/objc/RTCDataChannelConfiguration.h | 10 +++---- webrtc/api/objc/RTCIceServer+Private.h | 2 +- webrtc/api/objc/RTCIceServer.h | 8 ++--- webrtc/api/objc/RTCIceServer.mm | 2 +- webrtc/api/objc/RTCMediaStream.h | 5 ++++ webrtc/api/objc/RTCMediaStream.mm | 11 +++++++ webrtc/api/objc/RTCMediaStreamTrack.h | 2 +- webrtc/api/objc/RTCPeerConnection.h | 2 +- webrtc/api/objc/RTCPeerConnection.mm | 8 ++--- .../api/objc/RTCSessionDescription+Private.h | 4 +-- webrtc/api/objc/RTCSessionDescription.h | 4 +++ webrtc/api/objc/RTCSessionDescription.mm | 22 ++++++++++---- webrtc/api/objc/RTCVideoRenderer.h | 2 +- webrtc/api/objc/RTCVideoTrack.mm | 30 ++++++++++++------- webrtc/api/objctests/RTCIceServerTest.mm | 6 ++-- .../objctests/RTCSessionDescriptionTest.mm | 4 +-- webrtc/base/objc/RTCSSLAdapter.h | 6 ++-- 22 files changed, 97 insertions(+), 48 deletions(-) diff --git a/webrtc/api/api.gyp b/webrtc/api/api.gyp index 4fe8ce8458..7f571c041d 100644 --- a/webrtc/api/api.gyp +++ b/webrtc/api/api.gyp @@ -192,6 +192,13 @@ 'objc/RTCVideoTrack.h', 'objc/RTCVideoTrack.mm', ], + # TODO(hjon): Make this compile without linking to libstdc++ + # See https://bugs.chromium.org/p/webrtc/issues/detail?id=5593 + 'link_settings': { + 'libraries': [ + '-lstdc++', + ], + }, 'conditions': [ ['OS=="ios"', { 'sources': [ diff --git a/webrtc/api/objc/RTCAVFoundationVideoSource.h b/webrtc/api/objc/RTCAVFoundationVideoSource.h index 1fa19c5d38..e3404441cc 100644 --- a/webrtc/api/objc/RTCAVFoundationVideoSource.h +++ b/webrtc/api/objc/RTCAVFoundationVideoSource.h @@ -26,7 +26,7 @@ NS_ASSUME_NONNULL_BEGIN @interface RTCAVFoundationVideoSource : RTCVideoSource - (instancetype)initWithFactory:(RTCPeerConnectionFactory *)factory - constraints:(RTCMediaConstraints *)constraints; + constraints:(nullable RTCMediaConstraints *)constraints; /** Switches the camera being used (either front or back). */ @property(nonatomic, assign) BOOL useBackCamera; diff --git a/webrtc/api/objc/RTCConfiguration.mm b/webrtc/api/objc/RTCConfiguration.mm index 2c39118752..2d44d01567 100644 --- a/webrtc/api/objc/RTCConfiguration.mm +++ b/webrtc/api/objc/RTCConfiguration.mm @@ -70,7 +70,7 @@ webrtc::PeerConnectionInterface::RTCConfiguration nativeConfig; for (RTCIceServer *iceServer in _iceServers) { - nativeConfig.servers.push_back(iceServer.iceServer); + nativeConfig.servers.push_back(iceServer.nativeServer); } nativeConfig.type = [[self class] nativeTransportsTypeForTransportPolicy:_iceTransportPolicy]; diff --git a/webrtc/api/objc/RTCDataChannel.h b/webrtc/api/objc/RTCDataChannel.h index 61d41bab73..8ab4b34be7 100644 --- a/webrtc/api/objc/RTCDataChannel.h +++ b/webrtc/api/objc/RTCDataChannel.h @@ -93,7 +93,7 @@ typedef NS_ENUM(NSInteger, RTCDataChannelState) { @property(nonatomic, readonly) BOOL isNegotiated; /** The identifier for this data channel. */ -@property(nonatomic, readonly) int id; +@property(nonatomic, readonly) int channelId; /** The state of the data channel. */ @property(nonatomic, readonly) RTCDataChannelState readyState; diff --git a/webrtc/api/objc/RTCDataChannel.mm b/webrtc/api/objc/RTCDataChannel.mm index a1f484a1a2..5778cb5b7a 100644 --- a/webrtc/api/objc/RTCDataChannel.mm +++ b/webrtc/api/objc/RTCDataChannel.mm @@ -123,7 +123,7 @@ class DataChannelDelegateAdapter : public DataChannelObserver { return _nativDataChannel->negotiated(); } -- (int)id { +- (int)channelId { return _nativDataChannel->id(); } @@ -161,7 +161,7 @@ class DataChannelDelegateAdapter : public DataChannelObserver { - (NSString *)description { return [NSString stringWithFormat:@"RTCDataChannel:\n%ld\n%@\n%@", - (long)self.id, + (long)self.channelId, self.label, [[self class] stringForState:self.readyState]]; diff --git a/webrtc/api/objc/RTCDataChannelConfiguration.h b/webrtc/api/objc/RTCDataChannelConfiguration.h index c343eb54c0..ef0562ed0a 100644 --- a/webrtc/api/objc/RTCDataChannelConfiguration.h +++ b/webrtc/api/objc/RTCDataChannelConfiguration.h @@ -15,24 +15,24 @@ NS_ASSUME_NONNULL_BEGIN @interface RTCDataChannelConfiguration : NSObject /** Set to YES if ordered delivery is required. */ -@property(nonatomic) BOOL isOrdered; +@property(nonatomic, assign) BOOL isOrdered; /** * Max period in milliseconds in which retransmissions will be sent. After this * time, no more retransmissions will be sent. -1 if unset. */ -@property(nonatomic) int maxPacketLifeTime; +@property(nonatomic, assign) int maxPacketLifeTime; /** The max number of retransmissions. -1 if unset. */ -@property(nonatomic) int maxRetransmits; +@property(nonatomic, assign) int maxRetransmits; /** Set to YES if the channel has been externally negotiated and we do not send * an in-band signalling in the form of an "open" message. */ -@property(nonatomic) BOOL isNegotiated; +@property(nonatomic, assign) BOOL isNegotiated; /** The stream id, or SID, for SCTP data channels. -1 if unset. */ -@property(nonatomic) int streamId; +@property(nonatomic, assign) int streamId; /** Set by the application and opaque to the WebRTC implementation. */ @property(nonatomic) NSString *protocol; diff --git a/webrtc/api/objc/RTCIceServer+Private.h b/webrtc/api/objc/RTCIceServer+Private.h index 556936de81..8098bee8f8 100644 --- a/webrtc/api/objc/RTCIceServer+Private.h +++ b/webrtc/api/objc/RTCIceServer+Private.h @@ -21,7 +21,7 @@ NS_ASSUME_NONNULL_BEGIN * This is needed to pass to the underlying C++ APIs. */ @property(nonatomic, readonly) - webrtc::PeerConnectionInterface::IceServer iceServer; + webrtc::PeerConnectionInterface::IceServer nativeServer; /** Initialize an RTCIceServer from a native IceServer. */ - (instancetype)initWithNativeServer: diff --git a/webrtc/api/objc/RTCIceServer.h b/webrtc/api/objc/RTCIceServer.h index 94e3497aea..8ca179f6a0 100644 --- a/webrtc/api/objc/RTCIceServer.h +++ b/webrtc/api/objc/RTCIceServer.h @@ -16,14 +16,14 @@ NS_ASSUME_NONNULL_BEGIN @interface RTCIceServer : NSObject /** URI(s) for this server represented as NSStrings. */ -@property(nonatomic, copy, readonly, nonnull) NSArray *urlStrings; -// @property(nonatomic, copy, readonly) NSArray *urlStrings; +@property(nonatomic, readonly, nonnull) NSArray *urlStrings; +// @property(nonatomic, readonly) NSArray *urlStrings; /** Username to use if this RTCIceServer object is a TURN server. */ -@property(nonatomic, copy, readonly, nullable) NSString *username; +@property(nonatomic, readonly, nullable) NSString *username; /** Credential to use if this RTCIceServer object is a TURN server. */ -@property(nonatomic, copy, readonly, nullable) NSString *credential; +@property(nonatomic, readonly, nullable) NSString *credential; - (nonnull instancetype)init NS_UNAVAILABLE; diff --git a/webrtc/api/objc/RTCIceServer.mm b/webrtc/api/objc/RTCIceServer.mm index bdac700e55..9fc215429f 100644 --- a/webrtc/api/objc/RTCIceServer.mm +++ b/webrtc/api/objc/RTCIceServer.mm @@ -50,7 +50,7 @@ #pragma mark - Private -- (webrtc::PeerConnectionInterface::IceServer)iceServer { +- (webrtc::PeerConnectionInterface::IceServer)nativeServer { __block webrtc::PeerConnectionInterface::IceServer iceServer; iceServer.username = [NSString stdStringForString:_username]; diff --git a/webrtc/api/objc/RTCMediaStream.h b/webrtc/api/objc/RTCMediaStream.h index b314360434..7df1ea8ea8 100644 --- a/webrtc/api/objc/RTCMediaStream.h +++ b/webrtc/api/objc/RTCMediaStream.h @@ -14,6 +14,7 @@ NS_ASSUME_NONNULL_BEGIN // TODO(hjon): Update nullability types. See http://crbug/webrtc/5592 @class RTCAudioTrack; +@class RTCPeerConnectionFactory; @class RTCVideoTrack; @interface RTCMediaStream : NSObject @@ -31,6 +32,10 @@ NS_ASSUME_NONNULL_BEGIN - (instancetype)init NS_UNAVAILABLE; +/** Initialize an RTCMediaStream with an id. */ +- (instancetype)initWithFactory:(RTCPeerConnectionFactory *)factory + streamId:(NSString *)streamId; + /** Adds the given audio track to this media stream. */ - (void)addAudioTrack:(RTCAudioTrack *)audioTrack; diff --git a/webrtc/api/objc/RTCMediaStream.mm b/webrtc/api/objc/RTCMediaStream.mm index dcdef9d1a4..3c3e4d9064 100644 --- a/webrtc/api/objc/RTCMediaStream.mm +++ b/webrtc/api/objc/RTCMediaStream.mm @@ -15,6 +15,7 @@ #import "webrtc/api/objc/RTCAudioTrack+Private.h" #import "webrtc/api/objc/RTCMediaStream+Private.h" #import "webrtc/api/objc/RTCMediaStreamTrack+Private.h" +#import "webrtc/api/objc/RTCPeerConnectionFactory+Private.h" #import "webrtc/api/objc/RTCVideoTrack+Private.h" #import "webrtc/base/objc/NSString+StdString.h" @@ -26,6 +27,16 @@ rtc::scoped_refptr _nativeMediaStream; } +- (instancetype)initWithFactory:(RTCPeerConnectionFactory *)factory + streamId:(NSString *)streamId { + NSParameterAssert(factory); + NSParameterAssert(streamId.length); + std::string nativeId = [NSString stdStringForString:streamId]; + rtc::scoped_refptr stream = + factory.nativeFactory->CreateLocalMediaStream(nativeId); + return [self initWithNativeMediaStream:stream]; +} + - (NSArray *)audioTracks { // - (NSArray *)audioTracks { return [_audioTracks copy]; diff --git a/webrtc/api/objc/RTCMediaStreamTrack.h b/webrtc/api/objc/RTCMediaStreamTrack.h index beb48d3b6f..78838439c7 100644 --- a/webrtc/api/objc/RTCMediaStreamTrack.h +++ b/webrtc/api/objc/RTCMediaStreamTrack.h @@ -35,7 +35,7 @@ NS_ASSUME_NONNULL_BEGIN @property(nonatomic, readonly) NSString *trackId; /** The enabled state of the track. */ -@property(nonatomic) BOOL isEnabled; +@property(nonatomic, assign) BOOL isEnabled; /** The state of the track. */ @property(nonatomic, readonly) RTCMediaStreamTrackState readyState; diff --git a/webrtc/api/objc/RTCPeerConnection.h b/webrtc/api/objc/RTCPeerConnection.h index 86668a5b21..72645b523f 100644 --- a/webrtc/api/objc/RTCPeerConnection.h +++ b/webrtc/api/objc/RTCPeerConnection.h @@ -181,7 +181,7 @@ typedef NS_ENUM(NSInteger, RTCStatsOutputLevel) { * statistics are gathered for all tracks. */ - (void)statsForTrack: - (nonnull RTCMediaStreamTrack *)mediaStreamTrack + (nullable RTCMediaStreamTrack *)mediaStreamTrack statsOutputLevel:(RTCStatsOutputLevel)statsOutputLevel completionHandler: (nullable void (^)(NSArray * _Nonnull stats))completionHandler; diff --git a/webrtc/api/objc/RTCPeerConnection.mm b/webrtc/api/objc/RTCPeerConnection.mm index f75d6636fa..35ac07aeb7 100644 --- a/webrtc/api/objc/RTCPeerConnection.mm +++ b/webrtc/api/objc/RTCPeerConnection.mm @@ -199,11 +199,11 @@ void PeerConnectionDelegateAdapter::OnIceCandidate( _observer.reset(new webrtc::PeerConnectionDelegateAdapter(self)); webrtc::PeerConnectionInterface::RTCConfiguration config = configuration.nativeConfiguration; - webrtc::MediaConstraints *nativeConstraints = - constraints.nativeConstraints.get(); + rtc::scoped_ptr nativeConstraints = + constraints.nativeConstraints; _peerConnection = factory.nativeFactory->CreatePeerConnection(config, - nativeConstraints, + nativeConstraints.get(), nullptr, nullptr, _observer.get()); @@ -259,7 +259,7 @@ void PeerConnectionDelegateAdapter::OnIceCandidate( } - (void)addStream:(RTCMediaStream *)stream { - if (_peerConnection->AddStream(stream.nativeMediaStream)) { + if (!_peerConnection->AddStream(stream.nativeMediaStream)) { RTCLogError(@"Failed to add stream: %@", stream); return; } diff --git a/webrtc/api/objc/RTCSessionDescription+Private.h b/webrtc/api/objc/RTCSessionDescription+Private.h index 2a9601d4d1..9de8f0e943 100644 --- a/webrtc/api/objc/RTCSessionDescription+Private.h +++ b/webrtc/api/objc/RTCSessionDescription+Private.h @@ -32,9 +32,9 @@ NS_ASSUME_NONNULL_BEGIN - (instancetype)initWithNativeDescription: (const webrtc::SessionDescriptionInterface *)nativeDescription; -+ (std::string)stringForType:(RTCSdpType)type; ++ (std::string)stdStringForType:(RTCSdpType)type; -+ (RTCSdpType)typeForString:(const std::string &)string; ++ (RTCSdpType)typeForStdString:(const std::string &)string; @end diff --git a/webrtc/api/objc/RTCSessionDescription.h b/webrtc/api/objc/RTCSessionDescription.h index 5f00b1c9f4..2635633f39 100644 --- a/webrtc/api/objc/RTCSessionDescription.h +++ b/webrtc/api/objc/RTCSessionDescription.h @@ -36,6 +36,10 @@ NS_ASSUME_NONNULL_BEGIN - (instancetype)initWithType:(RTCSdpType)type sdp:(NSString *)sdp NS_DESIGNATED_INITIALIZER; ++ (NSString *)stringForType:(RTCSdpType)type; + ++ (RTCSdpType)typeForString:(NSString *)string; + @end NS_ASSUME_NONNULL_END diff --git a/webrtc/api/objc/RTCSessionDescription.mm b/webrtc/api/objc/RTCSessionDescription.mm index e401fbc3fb..94c1a3f2d9 100644 --- a/webrtc/api/objc/RTCSessionDescription.mm +++ b/webrtc/api/objc/RTCSessionDescription.mm @@ -21,6 +21,16 @@ @synthesize type = _type; @synthesize sdp = _sdp; ++ (NSString *)stringForType:(RTCSdpType)type { + std::string string = [[self class] stdStringForType:type]; + return [NSString stringForStdString:string]; +} + ++ (RTCSdpType)typeForString:(NSString *)string { + std::string typeString = string.stdString; + return [[self class] typeForStdString:typeString]; +} + - (instancetype)initWithType:(RTCSdpType)type sdp:(NSString *)sdp { NSParameterAssert(sdp.length); if (self = [super init]) { @@ -31,8 +41,8 @@ } - (NSString *)description { - return [NSString stringWithFormat:@"RTCSessionDescription:\n%s\n%@", - [[self class] stringForType:_type].c_str(), + return [NSString stringWithFormat:@"RTCSessionDescription:\n%@\n%@", + [[self class] stringForType:_type], _sdp]; } @@ -42,7 +52,7 @@ webrtc::SdpParseError error; webrtc::SessionDescriptionInterface *description = - webrtc::CreateSessionDescription([[self class] stringForType:_type], + webrtc::CreateSessionDescription([[self class] stdStringForType:_type], _sdp.stdString, &error); @@ -60,13 +70,13 @@ NSParameterAssert(nativeDescription); std::string sdp; nativeDescription->ToString(&sdp); - RTCSdpType type = [[self class] typeForString:nativeDescription->type()]; + RTCSdpType type = [[self class] typeForStdString:nativeDescription->type()]; return [self initWithType:type sdp:[NSString stringForStdString:sdp]]; } -+ (std::string)stringForType:(RTCSdpType)type { ++ (std::string)stdStringForType:(RTCSdpType)type { switch (type) { case RTCSdpTypeOffer: return webrtc::SessionDescriptionInterface::kOffer; @@ -77,7 +87,7 @@ } } -+ (RTCSdpType)typeForString:(const std::string &)string { ++ (RTCSdpType)typeForStdString:(const std::string &)string { if (string == webrtc::SessionDescriptionInterface::kOffer) { return RTCSdpTypeOffer; } else if (string == webrtc::SessionDescriptionInterface::kPrAnswer) { diff --git a/webrtc/api/objc/RTCVideoRenderer.h b/webrtc/api/objc/RTCVideoRenderer.h index a97456275a..2fe4efb45d 100644 --- a/webrtc/api/objc/RTCVideoRenderer.h +++ b/webrtc/api/objc/RTCVideoRenderer.h @@ -23,7 +23,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)setSize:(CGSize)size; /** The frame to be displayed. */ -- (void)renderFrame:(RTCVideoFrame *)frame; +- (void)renderFrame:(nullable RTCVideoFrame *)frame; @end diff --git a/webrtc/api/objc/RTCVideoTrack.mm b/webrtc/api/objc/RTCVideoTrack.mm index 7422eff926..8a9e3d7fd6 100644 --- a/webrtc/api/objc/RTCVideoTrack.mm +++ b/webrtc/api/objc/RTCVideoTrack.mm @@ -33,21 +33,19 @@ rtc::scoped_refptr track = factory.nativeFactory->CreateVideoTrack(nativeId, source.nativeVideoSource); - return [self initWithNativeTrack:track type:RTCMediaStreamTrackTypeVideo]; + if ([self initWithNativeTrack:track type:RTCMediaStreamTrackTypeVideo]) { + _source = source; + } + return self; } -- (instancetype)initWithNativeMediaTrack: +- (instancetype)initWithNativeTrack: (rtc::scoped_refptr)nativeMediaTrack - type:(RTCMediaStreamTrackType)type { + type:(RTCMediaStreamTrackType)type { NSParameterAssert(nativeMediaTrack); NSParameterAssert(type == RTCMediaStreamTrackTypeVideo); if (self = [super initWithNativeTrack:nativeMediaTrack type:type]) { _adapters = [NSMutableArray array]; - rtc::scoped_refptr source = - self.nativeVideoTrack->GetSource(); - if (source) { - _source = [[RTCVideoSource alloc] initWithNativeVideoSource:source.get()]; - } } return self; } @@ -58,6 +56,17 @@ } } +- (RTCVideoSource *)source { + if (!_source) { + rtc::scoped_refptr source = + self.nativeVideoTrack->GetSource(); + if (source) { + _source = [[RTCVideoSource alloc] initWithNativeVideoSource:source.get()]; + } + } + return _source; +} + - (void)addRenderer:(id)renderer { // Make sure we don't have this renderer yet. for (RTCVideoRendererAdapter *adapter in _adapters) { @@ -74,7 +83,6 @@ } - (void)removeRenderer:(id)renderer { - RTCVideoRendererAdapter *adapter; __block NSUInteger indexToRemove = NSNotFound; [_adapters enumerateObjectsUsingBlock:^(RTCVideoRendererAdapter *adapter, NSUInteger idx, @@ -87,7 +95,9 @@ if (indexToRemove == NSNotFound) { return; } - self.nativeVideoTrack->RemoveRenderer(adapter.nativeVideoRenderer); + RTCVideoRendererAdapter *adapterToRemove = + [_adapters objectAtIndex:indexToRemove]; + self.nativeVideoTrack->RemoveRenderer(adapterToRemove.nativeVideoRenderer); [_adapters removeObjectAtIndex:indexToRemove]; } diff --git a/webrtc/api/objctests/RTCIceServerTest.mm b/webrtc/api/objctests/RTCIceServerTest.mm index 2e6fb25486..5116ba0c18 100644 --- a/webrtc/api/objctests/RTCIceServerTest.mm +++ b/webrtc/api/objctests/RTCIceServerTest.mm @@ -31,7 +31,7 @@ RTCIceServer *server = [[RTCIceServer alloc] initWithURLStrings:@[ @"stun:stun1.example.net" ]]; - webrtc::PeerConnectionInterface::IceServer iceStruct = server.iceServer; + webrtc::PeerConnectionInterface::IceServer iceStruct = server.nativeServer; EXPECT_EQ(1u, iceStruct.urls.size()); EXPECT_EQ("stun:stun1.example.net", iceStruct.urls.front()); EXPECT_EQ("", iceStruct.username); @@ -42,7 +42,7 @@ RTCIceServer *server = [[RTCIceServer alloc] initWithURLStrings:@[ @"turn1:turn1.example.net", @"turn2:turn2.example.net" ]]; - webrtc::PeerConnectionInterface::IceServer iceStruct = server.iceServer; + webrtc::PeerConnectionInterface::IceServer iceStruct = server.nativeServer; EXPECT_EQ(2u, iceStruct.urls.size()); EXPECT_EQ("turn1:turn1.example.net", iceStruct.urls.front()); EXPECT_EQ("turn2:turn2.example.net", iceStruct.urls.back()); @@ -55,7 +55,7 @@ initWithURLStrings:@[ @"turn1:turn1.example.net" ] username:@"username" credential:@"credential"]; - webrtc::PeerConnectionInterface::IceServer iceStruct = server.iceServer; + webrtc::PeerConnectionInterface::IceServer iceStruct = server.nativeServer; EXPECT_EQ(1u, iceStruct.urls.size()); EXPECT_EQ("turn1:turn1.example.net", iceStruct.urls.front()); EXPECT_EQ("username", iceStruct.username); diff --git a/webrtc/api/objctests/RTCSessionDescriptionTest.mm b/webrtc/api/objctests/RTCSessionDescriptionTest.mm index 2404dedd3a..605c5f1a9a 100644 --- a/webrtc/api/objctests/RTCSessionDescriptionTest.mm +++ b/webrtc/api/objctests/RTCSessionDescriptionTest.mm @@ -36,7 +36,7 @@ description.nativeDescription; EXPECT_EQ(RTCSdpTypeAnswer, - [RTCSessionDescription typeForString:nativeDescription->type()]); + [RTCSessionDescription typeForStdString:nativeDescription->type()]); std::string sdp; nativeDescription->ToString(&sdp); @@ -55,7 +55,7 @@ [[RTCSessionDescription alloc] initWithNativeDescription: nativeDescription]; EXPECT_EQ(webrtc::SessionDescriptionInterface::kAnswer, - [RTCSessionDescription stringForType:description.type]); + [RTCSessionDescription stdStringForType:description.type]); EXPECT_TRUE([[self sdp] isEqualToString:description.sdp]); } diff --git a/webrtc/base/objc/RTCSSLAdapter.h b/webrtc/base/objc/RTCSSLAdapter.h index 11ac8af08a..34db8432c2 100644 --- a/webrtc/base/objc/RTCSSLAdapter.h +++ b/webrtc/base/objc/RTCSSLAdapter.h @@ -10,9 +10,11 @@ #import +#import "webrtc/base/objc/RTCMacros.h" + /** * Initialize and clean up the SSL library. Failure is fatal. These call the * corresponding functions in webrtc/base/ssladapter.h. */ -BOOL RTCInitializeSSL(); -BOOL RTCCleanupSSL(); +RTC_EXPORT BOOL RTCInitializeSSL(); +RTC_EXPORT BOOL RTCCleanupSSL();