Reformat the WebRTC code base
Running clang-format with chromium's style guide. The goal is n-fold: * providing consistency and readability (that's what code guidelines are for) * preventing noise with presubmit checks and git cl format * building on the previous point: making it easier to automatically fix format issues * you name it Please consider using git-hyper-blame to ignore this commit. Bug: webrtc:9340 Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87 Reviewed-on: https://webrtc-review.googlesource.com/81185 Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23660}
This commit is contained in:
@ -22,11 +22,11 @@
|
||||
|
||||
/** Initialize an RTCAudioSource from a native AudioSourceInterface. */
|
||||
- (instancetype)initWithNativeAudioSource:
|
||||
(rtc::scoped_refptr<webrtc::AudioSourceInterface>)nativeAudioSource
|
||||
(rtc::scoped_refptr<webrtc::AudioSourceInterface>)nativeAudioSource
|
||||
NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
- (instancetype)initWithNativeMediaSource:
|
||||
(rtc::scoped_refptr<webrtc::MediaSourceInterface>)nativeMediaSource
|
||||
(rtc::scoped_refptr<webrtc::MediaSourceInterface>)nativeMediaSource
|
||||
type:(RTCMediaSourceType)type NS_UNAVAILABLE;
|
||||
|
||||
@end
|
||||
|
@ -18,8 +18,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@interface RTCAudioTrack ()
|
||||
|
||||
/** AudioTrackInterface created or passed in at construction. */
|
||||
@property(nonatomic, readonly)
|
||||
rtc::scoped_refptr<webrtc::AudioTrackInterface> nativeAudioTrack;
|
||||
@property(nonatomic, readonly) rtc::scoped_refptr<webrtc::AudioTrackInterface> nativeAudioTrack;
|
||||
|
||||
/** Initialize an RTCAudioTrack with an id. */
|
||||
- (instancetype)initWithFactory:(RTCPeerConnectionFactory *)factory
|
||||
|
@ -18,9 +18,10 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/** Optional TurnCustomizer.
|
||||
* With this class one can modify outgoing TURN messages.
|
||||
* The object passed in must remain valid until PeerConnection::Close() is called.
|
||||
* The object passed in must remain valid until PeerConnection::Close() is
|
||||
* called.
|
||||
*/
|
||||
@property(nonatomic, nullable) webrtc::TurnCustomizer *turnCustomizer;
|
||||
@property(nonatomic, nullable) webrtc::TurnCustomizer* turnCustomizer;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -16,43 +16,43 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface RTCConfiguration ()
|
||||
|
||||
+ (webrtc::PeerConnectionInterface::IceTransportsType)
|
||||
nativeTransportsTypeForTransportPolicy:(RTCIceTransportPolicy)policy;
|
||||
+ (webrtc::PeerConnectionInterface::IceTransportsType)nativeTransportsTypeForTransportPolicy:
|
||||
(RTCIceTransportPolicy)policy;
|
||||
|
||||
+ (RTCIceTransportPolicy)transportPolicyForTransportsType:
|
||||
(webrtc::PeerConnectionInterface::IceTransportsType)nativeType;
|
||||
(webrtc::PeerConnectionInterface::IceTransportsType)nativeType;
|
||||
|
||||
+ (NSString *)stringForTransportPolicy:(RTCIceTransportPolicy)policy;
|
||||
|
||||
+ (webrtc::PeerConnectionInterface::BundlePolicy)nativeBundlePolicyForPolicy:
|
||||
(RTCBundlePolicy)policy;
|
||||
(RTCBundlePolicy)policy;
|
||||
|
||||
+ (RTCBundlePolicy)bundlePolicyForNativePolicy:
|
||||
(webrtc::PeerConnectionInterface::BundlePolicy)nativePolicy;
|
||||
(webrtc::PeerConnectionInterface::BundlePolicy)nativePolicy;
|
||||
|
||||
+ (NSString *)stringForBundlePolicy:(RTCBundlePolicy)policy;
|
||||
|
||||
+ (webrtc::PeerConnectionInterface::RtcpMuxPolicy)nativeRtcpMuxPolicyForPolicy:
|
||||
(RTCRtcpMuxPolicy)policy;
|
||||
(RTCRtcpMuxPolicy)policy;
|
||||
|
||||
+ (RTCRtcpMuxPolicy)rtcpMuxPolicyForNativePolicy:
|
||||
(webrtc::PeerConnectionInterface::RtcpMuxPolicy)nativePolicy;
|
||||
(webrtc::PeerConnectionInterface::RtcpMuxPolicy)nativePolicy;
|
||||
|
||||
+ (NSString *)stringForRtcpMuxPolicy:(RTCRtcpMuxPolicy)policy;
|
||||
|
||||
+ (webrtc::PeerConnectionInterface::TcpCandidatePolicy)
|
||||
nativeTcpCandidatePolicyForPolicy:(RTCTcpCandidatePolicy)policy;
|
||||
+ (webrtc::PeerConnectionInterface::TcpCandidatePolicy)nativeTcpCandidatePolicyForPolicy:
|
||||
(RTCTcpCandidatePolicy)policy;
|
||||
|
||||
+ (RTCTcpCandidatePolicy)tcpCandidatePolicyForNativePolicy:
|
||||
(webrtc::PeerConnectionInterface::TcpCandidatePolicy)nativePolicy;
|
||||
(webrtc::PeerConnectionInterface::TcpCandidatePolicy)nativePolicy;
|
||||
|
||||
+ (NSString *)stringForTcpCandidatePolicy:(RTCTcpCandidatePolicy)policy;
|
||||
|
||||
+ (webrtc::PeerConnectionInterface::CandidateNetworkPolicy)
|
||||
nativeCandidateNetworkPolicyForPolicy:(RTCCandidateNetworkPolicy)policy;
|
||||
+ (webrtc::PeerConnectionInterface::CandidateNetworkPolicy)nativeCandidateNetworkPolicyForPolicy:
|
||||
(RTCCandidateNetworkPolicy)policy;
|
||||
|
||||
+ (RTCCandidateNetworkPolicy)candidateNetworkPolicyForNativePolicy:
|
||||
(webrtc::PeerConnectionInterface::CandidateNetworkPolicy)nativePolicy;
|
||||
(webrtc::PeerConnectionInterface::CandidateNetworkPolicy)nativePolicy;
|
||||
|
||||
+ (NSString *)stringForCandidateNetworkPolicy:(RTCCandidateNetworkPolicy)policy;
|
||||
|
||||
@ -71,7 +71,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
- (nullable webrtc::PeerConnectionInterface::RTCConfiguration *)createNativeConfiguration;
|
||||
|
||||
- (instancetype)initWithNativeConfiguration:
|
||||
(const webrtc::PeerConnectionInterface::RTCConfiguration &)config NS_DESIGNATED_INITIALIZER;
|
||||
(const webrtc::PeerConnectionInterface::RTCConfiguration &)config NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -24,23 +24,22 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property(nonatomic, readonly) const webrtc::DataBuffer *nativeDataBuffer;
|
||||
|
||||
/** Initialize an RTCDataBuffer from a native DataBuffer. */
|
||||
- (instancetype)initWithNativeBuffer:(const webrtc::DataBuffer&)nativeBuffer;
|
||||
- (instancetype)initWithNativeBuffer:(const webrtc::DataBuffer &)nativeBuffer;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface RTCDataChannel ()
|
||||
|
||||
/** Initialize an RTCDataChannel from a native DataChannelInterface. */
|
||||
- (instancetype)initWithNativeDataChannel:
|
||||
(rtc::scoped_refptr<webrtc::DataChannelInterface>)nativeDataChannel
|
||||
(rtc::scoped_refptr<webrtc::DataChannelInterface>)nativeDataChannel
|
||||
NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
+ (webrtc::DataChannelInterface::DataState)
|
||||
nativeDataChannelStateForState:(RTCDataChannelState)state;
|
||||
+ (webrtc::DataChannelInterface::DataState)nativeDataChannelStateForState:
|
||||
(RTCDataChannelState)state;
|
||||
|
||||
+ (RTCDataChannelState)dataChannelStateForNativeState:
|
||||
(webrtc::DataChannelInterface::DataState)nativeState;
|
||||
(webrtc::DataChannelInterface::DataState)nativeState;
|
||||
|
||||
+ (NSString *)stringForState:(RTCDataChannelState)state;
|
||||
|
||||
|
@ -22,15 +22,13 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
* The native IceCandidateInterface representation of this RTCIceCandidate
|
||||
* object. This is needed to pass to the underlying C++ APIs.
|
||||
*/
|
||||
@property(nonatomic, readonly)
|
||||
std::unique_ptr<webrtc::IceCandidateInterface> nativeCandidate;
|
||||
@property(nonatomic, readonly) std::unique_ptr<webrtc::IceCandidateInterface> nativeCandidate;
|
||||
|
||||
/**
|
||||
* Initialize an RTCIceCandidate from a native IceCandidateInterface. No
|
||||
* ownership is taken of the native candidate.
|
||||
*/
|
||||
- (instancetype)initWithNativeCandidate:
|
||||
(const webrtc::IceCandidateInterface *)candidate;
|
||||
- (instancetype)initWithNativeCandidate:(const webrtc::IceCandidateInterface *)candidate;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -20,12 +20,10 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
* IceServer struct representation of this RTCIceServer object's data.
|
||||
* This is needed to pass to the underlying C++ APIs.
|
||||
*/
|
||||
@property(nonatomic, readonly)
|
||||
webrtc::PeerConnectionInterface::IceServer nativeServer;
|
||||
@property(nonatomic, readonly) webrtc::PeerConnectionInterface::IceServer nativeServer;
|
||||
|
||||
/** Initialize an RTCIceServer from a native IceServer. */
|
||||
- (instancetype)initWithNativeServer:
|
||||
(webrtc::PeerConnectionInterface::IceServer)nativeServer;
|
||||
- (instancetype)initWithNativeServer:(webrtc::PeerConnectionInterface::IceServer)nativeServer;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -16,12 +16,10 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface RTCIntervalRange ()
|
||||
|
||||
@property(nonatomic, readonly)
|
||||
std::unique_ptr<rtc::IntervalRange> nativeIntervalRange;
|
||||
@property(nonatomic, readonly) std::unique_ptr<rtc::IntervalRange> nativeIntervalRange;
|
||||
|
||||
- (instancetype)initWithNativeIntervalRange:(const rtc::IntervalRange &)config;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
|
@ -20,9 +20,8 @@ class MediaConstraints : public MediaConstraintsInterface {
|
||||
public:
|
||||
virtual ~MediaConstraints();
|
||||
MediaConstraints();
|
||||
MediaConstraints(
|
||||
const MediaConstraintsInterface::Constraints& mandatory,
|
||||
const MediaConstraintsInterface::Constraints& optional);
|
||||
MediaConstraints(const MediaConstraintsInterface::Constraints& mandatory,
|
||||
const MediaConstraintsInterface::Constraints& optional);
|
||||
virtual const Constraints& GetMandatory() const;
|
||||
virtual const Constraints& GetOptional() const;
|
||||
|
||||
@ -33,7 +32,6 @@ class MediaConstraints : public MediaConstraintsInterface {
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface RTCMediaConstraints ()
|
||||
@ -45,9 +43,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
- (std::unique_ptr<webrtc::MediaConstraints>)nativeConstraints;
|
||||
|
||||
/** Return a native Constraints object representing these constraints */
|
||||
+ (webrtc::MediaConstraintsInterface::Constraints)
|
||||
nativeConstraintsForConstraints:
|
||||
(NSDictionary<NSString *, NSString *> *)constraints;
|
||||
+ (webrtc::MediaConstraintsInterface::Constraints)nativeConstraintsForConstraints:
|
||||
(NSDictionary<NSString*, NSString*>*)constraints;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -21,19 +21,15 @@ typedef NS_ENUM(NSInteger, RTCMediaSourceType) {
|
||||
|
||||
@interface RTCMediaSource ()
|
||||
|
||||
@property(nonatomic, readonly)
|
||||
rtc::scoped_refptr<webrtc::MediaSourceInterface> nativeMediaSource;
|
||||
@property(nonatomic, readonly) rtc::scoped_refptr<webrtc::MediaSourceInterface> nativeMediaSource;
|
||||
|
||||
- (instancetype)initWithNativeMediaSource:
|
||||
(rtc::scoped_refptr<webrtc::MediaSourceInterface>)nativeMediaSource
|
||||
type:(RTCMediaSourceType)type
|
||||
NS_DESIGNATED_INITIALIZER;
|
||||
(rtc::scoped_refptr<webrtc::MediaSourceInterface>)nativeMediaSource
|
||||
type:(RTCMediaSourceType)type NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
+ (webrtc::MediaSourceInterface::SourceState)nativeSourceStateForState:
|
||||
(RTCSourceState)state;
|
||||
+ (webrtc::MediaSourceInterface::SourceState)nativeSourceStateForState:(RTCSourceState)state;
|
||||
|
||||
+ (RTCSourceState)sourceStateForNativeState:
|
||||
(webrtc::MediaSourceInterface::SourceState)nativeState;
|
||||
+ (RTCSourceState)sourceStateForNativeState:(webrtc::MediaSourceInterface::SourceState)nativeState;
|
||||
|
||||
+ (NSString *)stringForState:(RTCSourceState)state;
|
||||
|
||||
|
@ -20,16 +20,14 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
* MediaStreamInterface representation of this RTCMediaStream object. This is
|
||||
* needed to pass to the underlying C++ APIs.
|
||||
*/
|
||||
@property(nonatomic, readonly)
|
||||
rtc::scoped_refptr<webrtc::MediaStreamInterface> nativeMediaStream;
|
||||
@property(nonatomic, readonly) rtc::scoped_refptr<webrtc::MediaStreamInterface> nativeMediaStream;
|
||||
|
||||
/** Initialize an RTCMediaStream with an id. */
|
||||
- (instancetype)initWithFactory:(RTCPeerConnectionFactory *)factory
|
||||
streamId:(NSString *)streamId;
|
||||
- (instancetype)initWithFactory:(RTCPeerConnectionFactory *)factory streamId:(NSString *)streamId;
|
||||
|
||||
/** Initialize an RTCMediaStream from a native MediaStreamInterface. */
|
||||
- (instancetype)initWithNativeMediaStream:
|
||||
(rtc::scoped_refptr<webrtc::MediaStreamInterface>)nativeMediaStream;
|
||||
(rtc::scoped_refptr<webrtc::MediaStreamInterface>)nativeMediaStream;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -25,27 +25,25 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
* The native MediaStreamTrackInterface passed in or created during
|
||||
* construction.
|
||||
*/
|
||||
@property(nonatomic, readonly)
|
||||
rtc::scoped_refptr<webrtc::MediaStreamTrackInterface> nativeTrack;
|
||||
@property(nonatomic, readonly) rtc::scoped_refptr<webrtc::MediaStreamTrackInterface> nativeTrack;
|
||||
|
||||
/**
|
||||
* Initialize an RTCMediaStreamTrack from a native MediaStreamTrackInterface.
|
||||
*/
|
||||
- (instancetype)initWithNativeTrack:
|
||||
(rtc::scoped_refptr<webrtc::MediaStreamTrackInterface>)nativeTrack
|
||||
type:(RTCMediaStreamTrackType)type
|
||||
NS_DESIGNATED_INITIALIZER;
|
||||
(rtc::scoped_refptr<webrtc::MediaStreamTrackInterface>)nativeTrack
|
||||
type:(RTCMediaStreamTrackType)type NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
- (instancetype)initWithNativeTrack:
|
||||
(rtc::scoped_refptr<webrtc::MediaStreamTrackInterface>)nativeTrack;
|
||||
(rtc::scoped_refptr<webrtc::MediaStreamTrackInterface>)nativeTrack;
|
||||
|
||||
- (BOOL)isEqualToTrack:(RTCMediaStreamTrack *)track;
|
||||
|
||||
+ (webrtc::MediaStreamTrackInterface::TrackState)nativeTrackStateForState:
|
||||
(RTCMediaStreamTrackState)state;
|
||||
(RTCMediaStreamTrackState)state;
|
||||
|
||||
+ (RTCMediaStreamTrackState)trackStateForNativeState:
|
||||
(webrtc::MediaStreamTrackInterface::TrackState)nativeState;
|
||||
(webrtc::MediaStreamTrackInterface::TrackState)nativeState;
|
||||
|
||||
+ (NSString *)stringForState:(RTCMediaStreamTrackState)state;
|
||||
|
||||
|
@ -20,8 +20,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@interface RTCMetricsSampleInfo ()
|
||||
|
||||
/** Initialize an RTCMetricsSampleInfo object from native SampleInfo. */
|
||||
- (instancetype)initWithNativeSampleInfo:
|
||||
(const webrtc::metrics::SampleInfo &)info;
|
||||
- (instancetype)initWithNativeSampleInfo:(const webrtc::metrics::SampleInfo &)info;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -21,13 +21,11 @@ namespace webrtc {
|
||||
* id<RTCPeerConnectionDelegate> and call methods on that interface.
|
||||
*/
|
||||
class PeerConnectionDelegateAdapter : public PeerConnectionObserver {
|
||||
|
||||
public:
|
||||
PeerConnectionDelegateAdapter(RTCPeerConnection *peerConnection);
|
||||
virtual ~PeerConnectionDelegateAdapter();
|
||||
|
||||
void OnSignalingChange(
|
||||
PeerConnectionInterface::SignalingState new_state) override;
|
||||
void OnSignalingChange(PeerConnectionInterface::SignalingState new_state) override;
|
||||
|
||||
void OnAddStream(rtc::scoped_refptr<MediaStreamInterface> stream) override;
|
||||
|
||||
@ -35,77 +33,68 @@ class PeerConnectionDelegateAdapter : public PeerConnectionObserver {
|
||||
|
||||
void OnTrack(rtc::scoped_refptr<RtpTransceiverInterface> transceiver) override;
|
||||
|
||||
void OnDataChannel(
|
||||
rtc::scoped_refptr<DataChannelInterface> data_channel) override;
|
||||
void OnDataChannel(rtc::scoped_refptr<DataChannelInterface> data_channel) override;
|
||||
|
||||
void OnRenegotiationNeeded() override;
|
||||
|
||||
void OnIceConnectionChange(
|
||||
PeerConnectionInterface::IceConnectionState new_state) override;
|
||||
void OnIceConnectionChange(PeerConnectionInterface::IceConnectionState new_state) override;
|
||||
|
||||
void OnIceGatheringChange(
|
||||
PeerConnectionInterface::IceGatheringState new_state) override;
|
||||
void OnIceGatheringChange(PeerConnectionInterface::IceGatheringState new_state) override;
|
||||
|
||||
void OnIceCandidate(const IceCandidateInterface *candidate) override;
|
||||
|
||||
void OnIceCandidatesRemoved(
|
||||
const std::vector<cricket::Candidate>& candidates) override;
|
||||
void OnIceCandidatesRemoved(const std::vector<cricket::Candidate> &candidates) override;
|
||||
|
||||
void OnAddTrack(rtc::scoped_refptr<RtpReceiverInterface> receiver,
|
||||
const std::vector<rtc::scoped_refptr<MediaStreamInterface>>& streams) override;
|
||||
const std::vector<rtc::scoped_refptr<MediaStreamInterface>> &streams) override;
|
||||
|
||||
private:
|
||||
__weak RTCPeerConnection *peer_connection_;
|
||||
};
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@interface RTCPeerConnection ()
|
||||
|
||||
/** The native PeerConnectionInterface created during construction. */
|
||||
@property(nonatomic, readonly)
|
||||
rtc::scoped_refptr<webrtc::PeerConnectionInterface> nativePeerConnection;
|
||||
@property(nonatomic, readonly) rtc::scoped_refptr<webrtc::PeerConnectionInterface>
|
||||
nativePeerConnection;
|
||||
|
||||
/** Initialize an RTCPeerConnection with a configuration, constraints, and
|
||||
* delegate.
|
||||
*/
|
||||
- (instancetype)initWithFactory:
|
||||
(RTCPeerConnectionFactory *)factory
|
||||
configuration:
|
||||
(RTCConfiguration *)configuration
|
||||
constraints:
|
||||
(RTCMediaConstraints *)constraints
|
||||
delegate:
|
||||
(nullable id<RTCPeerConnectionDelegate>)delegate
|
||||
- (instancetype)initWithFactory:(RTCPeerConnectionFactory *)factory
|
||||
configuration:(RTCConfiguration *)configuration
|
||||
constraints:(RTCMediaConstraints *)constraints
|
||||
delegate:(nullable id<RTCPeerConnectionDelegate>)delegate
|
||||
NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
+ (webrtc::PeerConnectionInterface::SignalingState)nativeSignalingStateForState:
|
||||
(RTCSignalingState)state;
|
||||
(RTCSignalingState)state;
|
||||
|
||||
+ (RTCSignalingState)signalingStateForNativeState:
|
||||
(webrtc::PeerConnectionInterface::SignalingState)nativeState;
|
||||
(webrtc::PeerConnectionInterface::SignalingState)nativeState;
|
||||
|
||||
+ (NSString *)stringForSignalingState:(RTCSignalingState)state;
|
||||
|
||||
+ (webrtc::PeerConnectionInterface::IceConnectionState)
|
||||
nativeIceConnectionStateForState:(RTCIceConnectionState)state;
|
||||
+ (webrtc::PeerConnectionInterface::IceConnectionState)nativeIceConnectionStateForState:
|
||||
(RTCIceConnectionState)state;
|
||||
|
||||
+ (RTCIceConnectionState)iceConnectionStateForNativeState:
|
||||
(webrtc::PeerConnectionInterface::IceConnectionState)nativeState;
|
||||
(webrtc::PeerConnectionInterface::IceConnectionState)nativeState;
|
||||
|
||||
+ (NSString *)stringForIceConnectionState:(RTCIceConnectionState)state;
|
||||
|
||||
+ (webrtc::PeerConnectionInterface::IceGatheringState)
|
||||
nativeIceGatheringStateForState:(RTCIceGatheringState)state;
|
||||
+ (webrtc::PeerConnectionInterface::IceGatheringState)nativeIceGatheringStateForState:
|
||||
(RTCIceGatheringState)state;
|
||||
|
||||
+ (RTCIceGatheringState)iceGatheringStateForNativeState:
|
||||
(webrtc::PeerConnectionInterface::IceGatheringState)nativeState;
|
||||
(webrtc::PeerConnectionInterface::IceGatheringState)nativeState;
|
||||
|
||||
+ (NSString *)stringForIceGatheringState:(RTCIceGatheringState)state;
|
||||
|
||||
+ (webrtc::PeerConnectionInterface::StatsOutputLevel)
|
||||
nativeStatsOutputLevelForLevel:(RTCStatsOutputLevel)level;
|
||||
+ (webrtc::PeerConnectionInterface::StatsOutputLevel)nativeStatsOutputLevelForLevel:
|
||||
(RTCStatsOutputLevel)level;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -23,7 +23,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
* C++ APIs.
|
||||
*/
|
||||
@property(nonatomic, readonly)
|
||||
rtc::scoped_refptr<webrtc::PeerConnectionFactoryInterface> nativeFactory;
|
||||
rtc::scoped_refptr<webrtc::PeerConnectionFactoryInterface>
|
||||
nativeFactory;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -20,8 +20,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property(nonatomic, readonly) webrtc::RtpCodecParameters nativeParameters;
|
||||
|
||||
/** Initialize the object with a native RtpCodecParameters structure. */
|
||||
- (instancetype)initWithNativeParameters:
|
||||
(const webrtc::RtpCodecParameters &)nativeParameters;
|
||||
- (instancetype)initWithNativeParameters:(const webrtc::RtpCodecParameters &)nativeParameters;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -20,8 +20,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property(nonatomic, readonly) webrtc::RtpEncodingParameters nativeParameters;
|
||||
|
||||
/** Initialize the object with a native RtpEncodingParameters structure. */
|
||||
- (instancetype)initWithNativeParameters:
|
||||
(const webrtc::RtpEncodingParameters &)nativeParameters;
|
||||
- (instancetype)initWithNativeParameters:(const webrtc::RtpEncodingParameters &)nativeParameters;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -20,8 +20,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property(nonatomic, readonly) webrtc::RtpParameters nativeParameters;
|
||||
|
||||
/** Initialize the object with a native RtpParameters structure. */
|
||||
- (instancetype)initWithNativeParameters:
|
||||
(const webrtc::RtpParameters &)nativeParameters;
|
||||
- (instancetype)initWithNativeParameters:(const webrtc::RtpParameters &)nativeParameters;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -30,12 +30,11 @@ class RtpReceiverDelegateAdapter : public RtpReceiverObserverInterface {
|
||||
|
||||
@interface RTCRtpReceiver ()
|
||||
|
||||
@property(nonatomic, readonly)
|
||||
rtc::scoped_refptr<webrtc::RtpReceiverInterface> nativeRtpReceiver;
|
||||
@property(nonatomic, readonly) rtc::scoped_refptr<webrtc::RtpReceiverInterface> nativeRtpReceiver;
|
||||
|
||||
/** Initialize an RTCRtpReceiver with a native RtpReceiverInterface. */
|
||||
- (instancetype)initWithNativeRtpReceiver:
|
||||
(rtc::scoped_refptr<webrtc::RtpReceiverInterface>)nativeRtpReceiver
|
||||
(rtc::scoped_refptr<webrtc::RtpReceiverInterface>)nativeRtpReceiver
|
||||
NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
+ (RTCRtpMediaType)mediaTypeForNativeMediaType:(cricket::MediaType)nativeMediaType;
|
||||
|
@ -16,13 +16,11 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface RTCRtpSender ()
|
||||
|
||||
@property(nonatomic, readonly)
|
||||
rtc::scoped_refptr<webrtc::RtpSenderInterface> nativeRtpSender;
|
||||
@property(nonatomic, readonly) rtc::scoped_refptr<webrtc::RtpSenderInterface> nativeRtpSender;
|
||||
|
||||
/** Initialize an RTCRtpSender with a native RtpSenderInterface. */
|
||||
- (instancetype)initWithNativeRtpSender:
|
||||
(rtc::scoped_refptr<webrtc::RtpSenderInterface>)nativeRtpSender
|
||||
NS_DESIGNATED_INITIALIZER;
|
||||
(rtc::scoped_refptr<webrtc::RtpSenderInterface>)nativeRtpSender NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -29,7 +29,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
* description.
|
||||
*/
|
||||
- (instancetype)initWithNativeDescription:
|
||||
(const webrtc::SessionDescriptionInterface *)nativeDescription;
|
||||
(const webrtc::SessionDescriptionInterface *)nativeDescription;
|
||||
|
||||
+ (std::string)stdStringForType:(RTCSdpType)type;
|
||||
|
||||
|
@ -30,8 +30,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
* to this interface will be adapted and passed to the RTCVideoRenderer supplied
|
||||
* during construction. This pointer is unsafe and owned by this class.
|
||||
*/
|
||||
@property(nonatomic, readonly)
|
||||
rtc::VideoSinkInterface<webrtc::VideoFrame> *nativeVideoRenderer;
|
||||
@property(nonatomic, readonly) rtc::VideoSinkInterface<webrtc::VideoFrame> *nativeVideoRenderer;
|
||||
|
||||
/** Initialize an RTCVideoRendererAdapter with an RTCVideoRenderer. */
|
||||
- (instancetype)initWithNativeRenderer:(id<RTCVideoRenderer>)videoRenderer
|
||||
|
@ -22,17 +22,16 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
* The VideoTrackSourceInterface object passed to this RTCVideoSource during
|
||||
* construction.
|
||||
*/
|
||||
@property(nonatomic, readonly)
|
||||
rtc::scoped_refptr<webrtc::VideoTrackSourceInterface>
|
||||
nativeVideoSource;
|
||||
@property(nonatomic, readonly) rtc::scoped_refptr<webrtc::VideoTrackSourceInterface>
|
||||
nativeVideoSource;
|
||||
|
||||
/** Initialize an RTCVideoSource from a native VideoTrackSourceInterface. */
|
||||
- (instancetype)initWithNativeVideoSource:
|
||||
(rtc::scoped_refptr<webrtc::VideoTrackSourceInterface>)nativeVideoSource
|
||||
(rtc::scoped_refptr<webrtc::VideoTrackSourceInterface>)nativeVideoSource
|
||||
NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
- (instancetype)initWithNativeMediaSource:
|
||||
(rtc::scoped_refptr<webrtc::MediaSourceInterface>)nativeMediaSource
|
||||
(rtc::scoped_refptr<webrtc::MediaSourceInterface>)nativeMediaSource
|
||||
type:(RTCMediaSourceType)type NS_UNAVAILABLE;
|
||||
|
||||
- (instancetype)initWithSignalingThread:(rtc::Thread *)signalingThread
|
||||
|
@ -17,8 +17,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@interface RTCVideoTrack ()
|
||||
|
||||
/** VideoTrackInterface created or passed in at construction. */
|
||||
@property(nonatomic, readonly)
|
||||
rtc::scoped_refptr<webrtc::VideoTrackInterface> nativeVideoTrack;
|
||||
@property(nonatomic, readonly) rtc::scoped_refptr<webrtc::VideoTrackInterface> nativeVideoTrack;
|
||||
|
||||
/** Initialize an RTCVideoTrack with its source and an id. */
|
||||
- (instancetype)initWithFactory:(RTCPeerConnectionFactory *)factory
|
||||
|
Reference in New Issue
Block a user