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:
Yves Gerey
2018-06-19 15:03:05 +02:00
parent b602123a5a
commit 665174fdbb
1569 changed files with 30495 additions and 30309 deletions

View File

@ -77,14 +77,12 @@ NS_ASSUME_NONNULL_BEGIN
- (NSError *)configurationErrorWithDescription:(NSString *)description;
// Properties and methods for tests.
@property(nonatomic, readonly)
std::vector<__weak id<RTCAudioSessionDelegate> > delegates;
@property(nonatomic, readonly) std::vector<__weak id<RTCAudioSessionDelegate> > delegates;
- (void)notifyDidBeginInterruption;
- (void)notifyDidEndInterruptionWithShouldResumeSession:
(BOOL)shouldResumeSession;
- (void)notifyDidEndInterruptionWithShouldResumeSession:(BOOL)shouldResumeSession;
- (void)notifyDidChangeRouteWithReason:(AVAudioSessionRouteChangeReason)reason
previousRoute:(AVAudioSessionRouteDescription *)previousRoute;
previousRoute:(AVAudioSessionRouteDescription *)previousRoute;
- (void)notifyMediaServicesWereLost;
- (void)notifyMediaServicesWereReset;
- (void)notifyDidChangeCanPlayOrRecord:(BOOL)canPlayOrRecord;

View File

@ -26,8 +26,7 @@ class AudioSessionObserver;
/** |observer| is a raw pointer and should be kept alive
* for this object's lifetime.
*/
- (instancetype)initWithObserver:(webrtc::AudioSessionObserver *)observer
NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithObserver:(webrtc::AudioSessionObserver *)observer NS_DESIGNATED_INITIALIZER;
@end

View File

@ -19,7 +19,7 @@ NS_ASSUME_NONNULL_BEGIN
@property(nonatomic, readonly) std::string stdString;
+ (std::string)stdStringForString:(NSString *)nsString;
+ (NSString *)stringForStdString:(const std::string&)stdString;
+ (NSString *)stringForStdString:(const std::string &)stdString;
@end

View File

@ -18,7 +18,7 @@ namespace ios {
bool CheckAndLogError(BOOL success, NSError* error);
NSString *NSStringFromStdString(const std::string& stdString);
NSString* NSStringFromStdString(const std::string& stdString);
std::string StdStringFromNSString(NSString* nsString);
// Return thread ID as a string.

View File

@ -13,7 +13,8 @@
#import "RTCMTLRenderer.h"
/** @abstract RGB/BGR renderer.
* @discussion This renderer handles both kCVPixelFormatType_32BGRA and kCVPixelFormatType_32ARGB.
* @discussion This renderer handles both kCVPixelFormatType_32BGRA and
* kCVPixelFormatType_32ARGB.
*/
NS_AVAILABLE(10_11, 9_0)
@interface RTCMTLRGBRenderer : RTCMTLRenderer

View File

@ -21,7 +21,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Protocol defining ability to render RTCVideoFrame in Metal enabled views.
*/
@protocol RTCMTLRenderer<NSObject>
@protocol RTCMTLRenderer <NSObject>
/**
* Method to be implemented to perform actual rendering of the provided frame.
@ -49,7 +49,7 @@ NS_ASSUME_NONNULL_BEGIN
* Implementation of RTCMTLRenderer protocol.
*/
NS_AVAILABLE(10_11, 9_0)
@interface RTCMTLRenderer : NSObject<RTCMTLRenderer>
@interface RTCMTLRenderer : NSObject <RTCMTLRenderer>
/** @abstract A wrapped RTCVideoRotation, or nil.
@discussion When not nil, the rotation of the actual frame is ignored when rendering.

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -29,7 +29,7 @@ NS_ASSUME_NONNULL_BEGIN
* description.
*/
- (instancetype)initWithNativeDescription:
(const webrtc::SessionDescriptionInterface *)nativeDescription;
(const webrtc::SessionDescriptionInterface *)nativeDescription;
+ (std::string)stdStringForType:(RTCSdpType)type;

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -12,9 +12,10 @@
RTC_EXTERN const char kRTCVertexShaderSource[];
RTC_EXTERN GLuint RTCCreateShader(GLenum type, const GLchar *source);
RTC_EXTERN GLuint RTCCreateShader(GLenum type, const GLchar* source);
RTC_EXTERN GLuint RTCCreateProgram(GLuint vertexShader, GLuint fragmentShader);
RTC_EXTERN GLuint RTCCreateProgramFromFragmentSource(const char fragmentShaderSource[]);
RTC_EXTERN GLuint
RTCCreateProgramFromFragmentSource(const char fragmentShaderSource[]);
RTC_EXTERN BOOL RTCCreateVertexBuffer(GLuint* vertexBuffer,
GLuint* vertexArray);
RTC_EXTERN void RTCSetVertexData(RTCVideoRotation rotation);

View File

@ -33,7 +33,7 @@ bool H264CMSampleBufferToAnnexBBuffer(
CMSampleBufferRef avcc_sample_buffer,
bool is_keyframe,
rtc::Buffer* annexb_buffer,
std::unique_ptr<RTPFragmentationHeader> *out_header) {
std::unique_ptr<RTPFragmentationHeader>* out_header) {
RTC_DCHECK(avcc_sample_buffer);
RTC_DCHECK(out_header);
out_header->reset(nullptr);

View File

@ -33,7 +33,7 @@ bool H264CMSampleBufferToAnnexBBuffer(
CMSampleBufferRef avcc_sample_buffer,
bool is_keyframe,
rtc::Buffer* annexb_buffer,
std::unique_ptr<RTPFragmentationHeader> *out_header);
std::unique_ptr<RTPFragmentationHeader>* out_header);
// Converts a buffer received from RTP into a sample buffer suitable for the
// VideoToolbox decoder. The RTP buffer is in annex b format whereas the sample

View File

@ -25,14 +25,11 @@ static const uint8_t NALU_TEST_DATA_1[] = {0xDE, 0xAD, 0xBE, 0xEF};
TEST(H264VideoToolboxNaluTest, TestCreateVideoFormatDescription) {
const uint8_t sps_pps_buffer[] = {
// SPS nalu.
0x00, 0x00, 0x00, 0x01,
0x27, 0x42, 0x00, 0x1E, 0xAB, 0x40, 0xF0, 0x28, 0xD3, 0x70, 0x20, 0x20,
0x20, 0x20,
// PPS nalu.
0x00, 0x00, 0x00, 0x01,
0x28, 0xCE, 0x3C, 0x30
};
// SPS nalu.
0x00, 0x00, 0x00, 0x01, 0x27, 0x42, 0x00, 0x1E, 0xAB, 0x40, 0xF0, 0x28,
0xD3, 0x70, 0x20, 0x20, 0x20, 0x20,
// PPS nalu.
0x00, 0x00, 0x00, 0x01, 0x28, 0xCE, 0x3C, 0x30};
CMVideoFormatDescriptionRef description =
CreateVideoFormatDescription(sps_pps_buffer, arraysize(sps_pps_buffer));
EXPECT_TRUE(description);
@ -59,8 +56,8 @@ TEST(H264VideoToolboxNaluTest, TestCreateVideoFormatDescription) {
}
const uint8_t other_buffer[] = {0x00, 0x00, 0x00, 0x01, 0x28};
EXPECT_FALSE(CreateVideoFormatDescription(other_buffer,
arraysize(other_buffer)));
EXPECT_FALSE(
CreateVideoFormatDescription(other_buffer, arraysize(other_buffer)));
}
TEST(AnnexBBufferReaderTest, TestReadEmptyInput) {

View File

@ -15,7 +15,7 @@
NS_ASSUME_NONNULL_BEGIN
extern NSString * const kRTCAudioSessionErrorDomain;
extern NSString *const kRTCAudioSessionErrorDomain;
/** Method that requires lock was called without lock. */
extern NSInteger const kRTCAudioSessionErrorLockRequired;
/** Unknown configuration error occurred. */
@ -46,8 +46,8 @@ RTC_EXPORT
* route.
*/
- (void)audioSessionDidChangeRoute:(RTCAudioSession *)session
reason:(AVAudioSessionRouteChangeReason)reason
previousRoute:(AVAudioSessionRouteDescription *)previousRoute;
reason:(AVAudioSessionRouteChangeReason)reason
previousRoute:(AVAudioSessionRouteDescription *)previousRoute;
/** Called on a system notification thread when AVAudioSession media server
* terminates.
@ -61,8 +61,7 @@ RTC_EXPORT
// TODO(tkchin): Maybe handle SilenceSecondaryAudioHintNotification.
- (void)audioSession:(RTCAudioSession *)session
didChangeCanPlayOrRecord:(BOOL)canPlayOrRecord;
- (void)audioSession:(RTCAudioSession *)session didChangeCanPlayOrRecord:(BOOL)canPlayOrRecord;
/** Called on a WebRTC thread when the audio device is notified to begin
* playback or recording.
@ -75,8 +74,7 @@ RTC_EXPORT
- (void)audioSessionDidStopPlayOrRecord:(RTCAudioSession *)session;
/** Called when the AVAudioSession output volume value changes. */
- (void)audioSession:(RTCAudioSession *)audioSession
didChangeOutputVolume:(float)outputVolume;
- (void)audioSession:(RTCAudioSession *)audioSession didChangeOutputVolume:(float)outputVolume;
/** Called when the audio device detects a playout glitch. The argument is the
* number of glitches detected so far in the current audio playout session.
@ -170,14 +168,10 @@ RTC_EXPORT
@property(readonly) float inputGain;
@property(readonly) BOOL inputGainSettable;
@property(readonly) BOOL inputAvailable;
@property(readonly, nullable)
NSArray<AVAudioSessionDataSourceDescription *> * inputDataSources;
@property(readonly, nullable)
AVAudioSessionDataSourceDescription *inputDataSource;
@property(readonly, nullable)
NSArray<AVAudioSessionDataSourceDescription *> * outputDataSources;
@property(readonly, nullable)
AVAudioSessionDataSourceDescription *outputDataSource;
@property(readonly, nullable) NSArray<AVAudioSessionDataSourceDescription *> *inputDataSources;
@property(readonly, nullable) AVAudioSessionDataSourceDescription *inputDataSource;
@property(readonly, nullable) NSArray<AVAudioSessionDataSourceDescription *> *outputDataSources;
@property(readonly, nullable) AVAudioSessionDataSourceDescription *outputDataSource;
@property(readonly) double sampleRate;
@property(readonly) double preferredSampleRate;
@property(readonly) NSInteger inputNumberOfChannels;
@ -211,8 +205,7 @@ RTC_EXPORT
* AVAudioSessionSetActiveOptionNotifyOthersOnDeactivation option is passed to
* AVAudioSession.
*/
- (BOOL)setActive:(BOOL)active
error:(NSError **)outError;
- (BOOL)setActive:(BOOL)active error:(NSError **)outError;
// The following methods are proxies for the associated methods on
// AVAudioSession. |lockForConfiguration| must be called before using them
@ -224,16 +217,11 @@ RTC_EXPORT
- (BOOL)setMode:(NSString *)mode error:(NSError **)outError;
- (BOOL)setInputGain:(float)gain error:(NSError **)outError;
- (BOOL)setPreferredSampleRate:(double)sampleRate error:(NSError **)outError;
- (BOOL)setPreferredIOBufferDuration:(NSTimeInterval)duration
error:(NSError **)outError;
- (BOOL)setPreferredInputNumberOfChannels:(NSInteger)count
error:(NSError **)outError;
- (BOOL)setPreferredOutputNumberOfChannels:(NSInteger)count
error:(NSError **)outError;
- (BOOL)overrideOutputAudioPort:(AVAudioSessionPortOverride)portOverride
error:(NSError **)outError;
- (BOOL)setPreferredInput:(AVAudioSessionPortDescription *)inPort
error:(NSError **)outError;
- (BOOL)setPreferredIOBufferDuration:(NSTimeInterval)duration error:(NSError **)outError;
- (BOOL)setPreferredInputNumberOfChannels:(NSInteger)count error:(NSError **)outError;
- (BOOL)setPreferredOutputNumberOfChannels:(NSInteger)count error:(NSError **)outError;
- (BOOL)overrideOutputAudioPort:(AVAudioSessionPortOverride)portOverride error:(NSError **)outError;
- (BOOL)setPreferredInput:(AVAudioSessionPortDescription *)inPort error:(NSError **)outError;
- (BOOL)setInputDataSource:(AVAudioSessionDataSourceDescription *)dataSource
error:(NSError **)outError;
- (BOOL)setOutputDataSource:(AVAudioSessionDataSourceDescription *)dataSource
@ -247,8 +235,7 @@ RTC_EXPORT
* returned.
* |lockForConfiguration| must be called first.
*/
- (BOOL)setConfiguration:(RTCAudioSessionConfiguration *)configuration
error:(NSError **)outError;
- (BOOL)setConfiguration:(RTCAudioSessionConfiguration *)configuration error:(NSError **)outError;
/** Convenience method that calls both setConfiguration and setActive.
* |lockForConfiguration| must be called first.

View File

@ -25,6 +25,6 @@ RTC_EXPORT
* is assigned to AVCaptureVideoPreviewLayer async in the same
* queue that the AVCaptureSession is started/stopped.
*/
@property(nonatomic, strong) AVCaptureSession *captureSession;
@property(nonatomic, strong) AVCaptureSession* captureSession;
@end

View File

@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#import <Foundation/Foundation.h>
#import <AVFoundation/AVFoundation.h>
#import <Foundation/Foundation.h>
#import <WebRTC/RTCMacros.h>
#import <WebRTC/RTCVideoCapturer.h>

View File

@ -34,10 +34,7 @@ typedef NS_ENUM(NSInteger, RTCBundlePolicy) {
};
/** Represents the rtcp mux policy. */
typedef NS_ENUM(NSInteger, RTCRtcpMuxPolicy) {
RTCRtcpMuxPolicyNegotiate,
RTCRtcpMuxPolicyRequire
};
typedef NS_ENUM(NSInteger, RTCRtcpMuxPolicy) { RTCRtcpMuxPolicyNegotiate, RTCRtcpMuxPolicyRequire };
/** Represents the tcp candidate policy. */
typedef NS_ENUM(NSInteger, RTCTcpCandidatePolicy) {
@ -88,8 +85,7 @@ RTC_EXPORT
@property(nonatomic, assign) RTCRtcpMuxPolicy rtcpMuxPolicy;
@property(nonatomic, assign) RTCTcpCandidatePolicy tcpCandidatePolicy;
@property(nonatomic, assign) RTCCandidateNetworkPolicy candidateNetworkPolicy;
@property(nonatomic, assign)
RTCContinualGatheringPolicy continualGatheringPolicy;
@property(nonatomic, assign) RTCContinualGatheringPolicy continualGatheringPolicy;
/** By default, the PeerConnection will use a limited number of IPv6 network
* interfaces, in order to avoid too many ICE candidate pairs being created

View File

@ -34,7 +34,6 @@ RTC_EXPORT
@end
@class RTCDataChannel;
RTC_EXPORT
@protocol RTCDataChannelDelegate <NSObject>
@ -48,12 +47,10 @@ RTC_EXPORT
@optional
/** The data channel's |bufferedAmount| changed. */
- (void)dataChannel:(RTCDataChannel *)dataChannel
didChangeBufferedAmount:(uint64_t)amount;
- (void)dataChannel:(RTCDataChannel *)dataChannel didChangeBufferedAmount:(uint64_t)amount;
@end
/** Represents the state of the data channel. */
typedef NS_ENUM(NSInteger, RTCDataChannelState) {
RTCDataChannelStateConnecting,
@ -78,8 +75,7 @@ RTC_EXPORT
@property(nonatomic, readonly) BOOL isOrdered;
/** Deprecated. Use maxPacketLifeTime. */
@property(nonatomic, readonly) NSUInteger maxRetransmitTime
DEPRECATED_ATTRIBUTE;
@property(nonatomic, readonly) NSUInteger maxRetransmitTime DEPRECATED_ATTRIBUTE;
/**
* The length of the time window (in milliseconds) during which transmissions

View File

@ -45,7 +45,7 @@ RTC_EXPORT
@property(nonatomic, assign) int channelId;
/** Set by the application and opaque to the WebRTC implementation. */
@property(nonatomic) NSString *protocol;
@property(nonatomic) NSString* protocol;
@end

View File

@ -34,8 +34,7 @@ RTC_EXPORT
* @param dispatchType The queue type to dispatch on.
* @param block The block to dispatch asynchronously.
*/
+ (void)dispatchAsyncOnType:(RTCDispatcherQueueType)dispatchType
block:(dispatch_block_t)block;
+ (void)dispatchAsyncOnType:(RTCDispatcherQueueType)dispatchType block:(dispatch_block_t)block;
/** Returns YES if run on queue for the dispatchType otherwise NO.
* Useful for asserting that a method is run on a correct queue.

View File

@ -20,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN
@class RTCEAGLVideoView;
RTC_EXPORT
@protocol RTCEAGLVideoViewDelegate<RTCVideoViewDelegate>
@protocol RTCEAGLVideoViewDelegate <RTCVideoViewDelegate>
@end
/**

View File

@ -52,13 +52,11 @@ RTC_EXPORT
- (instancetype)init;
// Create file logger with default rotation type.
- (instancetype)initWithDirPath:(NSString *)dirPath
maxFileSize:(NSUInteger)maxFileSize;
- (instancetype)initWithDirPath:(NSString *)dirPath maxFileSize:(NSUInteger)maxFileSize;
- (instancetype)initWithDirPath:(NSString *)dirPath
maxFileSize:(NSUInteger)maxFileSize
rotationType:(RTCFileLoggerRotationType)rotationType
NS_DESIGNATED_INITIALIZER;
rotationType:(RTCFileLoggerRotationType)rotationType NS_DESIGNATED_INITIALIZER;
// Starts writing WebRTC logs to disk if not already started. Overwrites any
// existing file(s).
@ -74,4 +72,3 @@ RTC_EXPORT
@end
NS_ASSUME_NONNULL_END

View File

@ -42,8 +42,7 @@ RTC_EXPORT
*/
- (instancetype)initWithSdp:(NSString *)sdp
sdpMLineIndex:(int)sdpMLineIndex
sdpMid:(nullable NSString *)sdpMid
NS_DESIGNATED_INITIALIZER;
sdpMid:(nullable NSString *)sdpMid NS_DESIGNATED_INITIALIZER;
@end

View File

@ -18,11 +18,8 @@ NS_ASSUME_NONNULL_BEGIN
@property(nonatomic, readonly) NSInteger max;
- (instancetype)init;
- (instancetype)initWithMin:(NSInteger)min
max:(NSInteger)max
NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithMin:(NSInteger)min max:(NSInteger)max NS_DESIGNATED_INITIALIZER;
@end
NS_ASSUME_NONNULL_END

View File

@ -33,12 +33,9 @@ RTC_EXTERN NSString* RTCFileName(const char* filePath);
// Some convenience macros.
#define RTCLogString(format, ...) \
[NSString stringWithFormat:@"(%@:%d %s): " format, \
RTCFileName(__FILE__), \
__LINE__, \
__FUNCTION__, \
##__VA_ARGS__]
#define RTCLogString(format, ...) \
[NSString stringWithFormat:@"(%@:%d %s): " format, RTCFileName(__FILE__), \
__LINE__, __FUNCTION__, ##__VA_ARGS__]
#define RTCLogFormat(severity, format, ...) \
do { \
@ -46,17 +43,17 @@ RTC_EXTERN NSString* RTCFileName(const char* filePath);
RTCLogEx(severity, log_string); \
} while (false)
#define RTCLogVerbose(format, ...) \
RTCLogFormat(RTCLoggingSeverityVerbose, format, ##__VA_ARGS__) \
#define RTCLogVerbose(format, ...) \
RTCLogFormat(RTCLoggingSeverityVerbose, format, ##__VA_ARGS__)
#define RTCLogInfo(format, ...) \
RTCLogFormat(RTCLoggingSeverityInfo, format, ##__VA_ARGS__) \
#define RTCLogInfo(format, ...) \
RTCLogFormat(RTCLoggingSeverityInfo, format, ##__VA_ARGS__)
#define RTCLogWarning(format, ...) \
RTCLogFormat(RTCLoggingSeverityWarning, format, ##__VA_ARGS__) \
#define RTCLogWarning(format, ...) \
RTCLogFormat(RTCLoggingSeverityWarning, format, ##__VA_ARGS__)
#define RTCLogError(format, ...) \
RTCLogFormat(RTCLoggingSeverityError, format, ##__VA_ARGS__) \
#define RTCLogError(format, ...) \
RTCLogFormat(RTCLoggingSeverityError, format, ##__VA_ARGS__)
#if !defined(NDEBUG)
#define RTCLogDebug(format, ...) RTCLogInfo(format, ##__VA_ARGS__)

View File

@ -12,7 +12,7 @@
#import "WebRTC/RTCVideoRenderer.h"
NS_AVAILABLE_MAC(10.11)
@interface RTCMTLNSVideoView : NSView<RTCVideoRenderer>
@interface RTCMTLNSVideoView : NSView <RTCVideoRenderer>
@property(nonatomic, weak) id<RTCVideoViewDelegate> delegate;

View File

@ -32,7 +32,7 @@ NS_ASSUME_NONNULL_BEGIN
NS_CLASS_AVAILABLE_IOS(9)
RTC_EXPORT
@interface RTCMTLVideoView : UIView <RTCVideoRenderer>
@interface RTCMTLVideoView : UIView<RTCVideoRenderer>
@property(nonatomic, weak) id<RTCVideoViewDelegate> delegate;

View File

@ -15,28 +15,28 @@
NS_ASSUME_NONNULL_BEGIN
/** Constraint keys for media sources. */
RTC_EXTERN NSString * const kRTCMediaConstraintsMinAspectRatio;
RTC_EXTERN NSString * const kRTCMediaConstraintsMaxAspectRatio;
RTC_EXTERN NSString * const kRTCMediaConstraintsMaxWidth;
RTC_EXTERN NSString * const kRTCMediaConstraintsMinWidth;
RTC_EXTERN NSString * const kRTCMediaConstraintsMaxHeight;
RTC_EXTERN NSString * const kRTCMediaConstraintsMinHeight;
RTC_EXTERN NSString * const kRTCMediaConstraintsMaxFrameRate;
RTC_EXTERN NSString * const kRTCMediaConstraintsMinFrameRate;
RTC_EXTERN NSString *const kRTCMediaConstraintsMinAspectRatio;
RTC_EXTERN NSString *const kRTCMediaConstraintsMaxAspectRatio;
RTC_EXTERN NSString *const kRTCMediaConstraintsMaxWidth;
RTC_EXTERN NSString *const kRTCMediaConstraintsMinWidth;
RTC_EXTERN NSString *const kRTCMediaConstraintsMaxHeight;
RTC_EXTERN NSString *const kRTCMediaConstraintsMinHeight;
RTC_EXTERN NSString *const kRTCMediaConstraintsMaxFrameRate;
RTC_EXTERN NSString *const kRTCMediaConstraintsMinFrameRate;
/** The value for this key should be a base64 encoded string containing
* the data from the serialized configuration proto.
*/
RTC_EXTERN NSString * const kRTCMediaConstraintsAudioNetworkAdaptorConfig;
RTC_EXTERN NSString *const kRTCMediaConstraintsAudioNetworkAdaptorConfig;
/** Constraint keys for generating offers and answers. */
RTC_EXTERN NSString * const kRTCMediaConstraintsIceRestart;
RTC_EXTERN NSString * const kRTCMediaConstraintsOfferToReceiveAudio;
RTC_EXTERN NSString * const kRTCMediaConstraintsOfferToReceiveVideo;
RTC_EXTERN NSString * const kRTCMediaConstraintsVoiceActivityDetection;
RTC_EXTERN NSString *const kRTCMediaConstraintsIceRestart;
RTC_EXTERN NSString *const kRTCMediaConstraintsOfferToReceiveAudio;
RTC_EXTERN NSString *const kRTCMediaConstraintsOfferToReceiveVideo;
RTC_EXTERN NSString *const kRTCMediaConstraintsVoiceActivityDetection;
/** Constraint values for Boolean parameters. */
RTC_EXTERN NSString * const kRTCMediaConstraintsValueTrue;
RTC_EXTERN NSString * const kRTCMediaConstraintsValueFalse;
RTC_EXTERN NSString *const kRTCMediaConstraintsValueTrue;
RTC_EXTERN NSString *const kRTCMediaConstraintsValueFalse;
RTC_EXPORT
@interface RTCMediaConstraints : NSObject
@ -44,10 +44,9 @@ RTC_EXPORT
- (instancetype)init NS_UNAVAILABLE;
/** Initialize with mandatory and/or optional constraints. */
- (instancetype)initWithMandatoryConstraints:
(nullable NSDictionary<NSString *, NSString *> *)mandatory
optionalConstraints:
(nullable NSDictionary<NSString *, NSString *> *)optional
- (instancetype)
initWithMandatoryConstraints:(nullable NSDictionary<NSString *, NSString *> *)mandatory
optionalConstraints:(nullable NSDictionary<NSString *, NSString *> *)optional
NS_DESIGNATED_INITIALIZER;
@end

View File

@ -22,8 +22,8 @@ typedef NS_ENUM(NSInteger, RTCMediaStreamTrackState) {
NS_ASSUME_NONNULL_BEGIN
RTC_EXTERN NSString * const kRTCMediaStreamTrackKindAudio;
RTC_EXTERN NSString * const kRTCMediaStreamTrackKindVideo;
RTC_EXTERN NSString *const kRTCMediaStreamTrackKindAudio;
RTC_EXTERN NSString *const kRTCMediaStreamTrackKindVideo;
RTC_EXPORT
@interface RTCMediaStreamTrack : NSObject

View File

@ -20,5 +20,4 @@
RTC_EXTERN void RTCEnableMetrics(void);
/** Gets and clears native histograms. */
RTC_EXTERN NSArray<RTCMetricsSampleInfo *> *RTCGetAndResetMetrics(void);
RTC_EXTERN NSArray<RTCMetricsSampleInfo*>* RTCGetAndResetMetrics(void);

View File

@ -21,7 +21,7 @@ NS_ASSUME_NONNULL_BEGIN
@class RTCNSGLVideoView;
@protocol RTCNSGLVideoViewDelegate<RTCVideoViewDelegate>
@protocol RTCNSGLVideoViewDelegate <RTCVideoViewDelegate>
@end
@interface RTCNSGLVideoView : NSOpenGLView <RTCVideoRenderer>

View File

@ -31,7 +31,7 @@ typedef NS_ENUM(NSInteger, RTCRtpMediaType);
NS_ASSUME_NONNULL_BEGIN
extern NSString * const kRTCPeerConnectionErrorDomain;
extern NSString *const kRTCPeerConnectionErrorDomain;
extern int const kRTCSessionDescriptionErrorCode;
/** Represents the signaling state of the peer connection. */
@ -80,14 +80,12 @@ RTC_EXPORT
didChangeSignalingState:(RTCSignalingState)stateChanged;
/** Called when media is received on a new stream from remote peer. */
- (void)peerConnection:(RTCPeerConnection *)peerConnection
didAddStream:(RTCMediaStream *)stream;
- (void)peerConnection:(RTCPeerConnection *)peerConnection didAddStream:(RTCMediaStream *)stream;
/** Called when a remote peer closes a stream.
* This is not called when RTCSdpSemanticsUnifiedPlan is specified.
*/
- (void)peerConnection:(RTCPeerConnection *)peerConnection
didRemoveStream:(RTCMediaStream *)stream;
- (void)peerConnection:(RTCPeerConnection *)peerConnection didRemoveStream:(RTCMediaStream *)stream;
/** Called when negotiation is needed, for example ICE has restarted. */
- (void)peerConnectionShouldNegotiate:(RTCPeerConnection *)peerConnection;
@ -139,10 +137,8 @@ RTC_EXPORT
* |senders| instead.
*/
@property(nonatomic, readonly) NSArray<RTCMediaStream *> *localStreams;
@property(nonatomic, readonly, nullable)
RTCSessionDescription *localDescription;
@property(nonatomic, readonly, nullable)
RTCSessionDescription *remoteDescription;
@property(nonatomic, readonly, nullable) RTCSessionDescription *localDescription;
@property(nonatomic, readonly, nullable) RTCSessionDescription *remoteDescription;
@property(nonatomic, readonly) RTCSignalingState signalingState;
@property(nonatomic, readonly) RTCIceConnectionState iceConnectionState;
@property(nonatomic, readonly) RTCIceGatheringState iceGatheringState;
@ -252,25 +248,21 @@ RTC_EXPORT
/** Generate an SDP offer. */
- (void)offerForConstraints:(RTCMediaConstraints *)constraints
completionHandler:(nullable void (^)
(RTCSessionDescription * _Nullable sdp,
NSError * _Nullable error))completionHandler;
completionHandler:(nullable void (^)(RTCSessionDescription *_Nullable sdp,
NSError *_Nullable error))completionHandler;
/** Generate an SDP answer. */
- (void)answerForConstraints:(RTCMediaConstraints *)constraints
completionHandler:(nullable void (^)
(RTCSessionDescription * _Nullable sdp,
NSError * _Nullable error))completionHandler;
completionHandler:(nullable void (^)(RTCSessionDescription *_Nullable sdp,
NSError *_Nullable error))completionHandler;
/** Apply the supplied RTCSessionDescription as the local description. */
- (void)setLocalDescription:(RTCSessionDescription *)sdp
completionHandler:
(nullable void (^)(NSError * _Nullable error))completionHandler;
completionHandler:(nullable void (^)(NSError *_Nullable error))completionHandler;
/** Apply the supplied RTCSessionDescription as the remote description. */
- (void)setRemoteDescription:(RTCSessionDescription *)sdp
completionHandler:
(nullable void (^)(NSError * _Nullable error))completionHandler;
completionHandler:(nullable void (^)(NSError *_Nullable error))completionHandler;
/** Limits the bandwidth allocated for all RTP streams sent by this
* PeerConnection. Nil parameters will be unchanged. Setting
@ -282,8 +274,7 @@ RTC_EXPORT
maxBitrateBps:(nullable NSNumber *)maxBitrateBps;
/** Start or stop recording an Rtc EventLog. */
- (BOOL)startRtcEventLogWithFilePath:(NSString *)filePath
maxSizeInBytes:(int64_t)maxSizeInBytes;
- (BOOL)startRtcEventLogWithFilePath:(NSString *)filePath maxSizeInBytes:(int64_t)maxSizeInBytes;
- (void)stopRtcEventLog;
@end
@ -312,11 +303,9 @@ RTC_EXPORT
/** Gather stats for the given RTCMediaStreamTrack. If |mediaStreamTrack| is nil
* statistics are gathered for all tracks.
*/
- (void)statsForTrack:
(nullable RTCMediaStreamTrack *)mediaStreamTrack
- (void)statsForTrack:(nullable RTCMediaStreamTrack *)mediaStreamTrack
statsOutputLevel:(RTCStatsOutputLevel)statsOutputLevel
completionHandler:
(nullable void (^)(NSArray<RTCLegacyStatsReport *> *stats))completionHandler;
completionHandler:(nullable void (^)(NSArray<RTCLegacyStatsReport *> *stats))completionHandler;
@end

View File

@ -46,8 +46,7 @@ RTC_EXPORT
- (RTCAudioTrack *)audioTrackWithTrackId:(NSString *)trackId;
/** Initialize an RTCAudioTrack with a source and an id. */
- (RTCAudioTrack *)audioTrackWithSource:(RTCAudioSource *)source
trackId:(NSString *)trackId;
- (RTCAudioTrack *)audioTrackWithSource:(RTCAudioSource *)source trackId:(NSString *)trackId;
/** Initialize a generic RTCVideoSource. The RTCVideoSource should be passed to a RTCVideoCapturer
* implementation, e.g. RTCCameraVideoCapturer, in order to produce frames.
@ -55,8 +54,7 @@ RTC_EXPORT
- (RTCVideoSource *)videoSource;
/** Initialize an RTCVideoTrack with a source and an id. */
- (RTCVideoTrack *)videoTrackWithSource:(RTCVideoSource *)source
trackId:(NSString *)trackId;
- (RTCVideoTrack *)videoTrackWithSource:(RTCVideoSource *)source trackId:(NSString *)trackId;
/** Initialize an RTCMediaStream with an id. */
- (RTCMediaStream *)mediaStreamWithStreamId:(NSString *)streamId;
@ -64,19 +62,16 @@ RTC_EXPORT
/** Initialize an RTCPeerConnection with a configuration, constraints, and
* delegate.
*/
- (RTCPeerConnection *)peerConnectionWithConfiguration:
(RTCConfiguration *)configuration
constraints:
(RTCMediaConstraints *)constraints
- (RTCPeerConnection *)peerConnectionWithConfiguration:(RTCConfiguration *)configuration
constraints:(RTCMediaConstraints *)constraints
delegate:
(nullable id<RTCPeerConnectionDelegate>)delegate;
(nullable id<RTCPeerConnectionDelegate>)delegate;
/** Set the options to be used for subsequently created RTCPeerConnections */
- (void)setOptions:(nonnull RTCPeerConnectionFactoryOptions *)options;
/** Start an AecDump recording. This API call will likely change in the future. */
- (BOOL)startAecDumpWithFilePath:(NSString *)filePath
maxSizeInBytes:(int64_t)maxSizeInBytes;
- (BOOL)startAecDumpWithFilePath:(NSString *)filePath maxSizeInBytes:(int64_t)maxSizeInBytes;
/* Stop an active AecDump recording */
- (void)stopAecDump;

View File

@ -14,22 +14,22 @@
NS_ASSUME_NONNULL_BEGIN
RTC_EXTERN const NSString * const kRTCRtxCodecName;
RTC_EXTERN const NSString * const kRTCRedCodecName;
RTC_EXTERN const NSString * const kRTCUlpfecCodecName;
RTC_EXTERN const NSString * const kRTCFlexfecCodecName;
RTC_EXTERN const NSString * const kRTCOpusCodecName;
RTC_EXTERN const NSString * const kRTCIsacCodecName;
RTC_EXTERN const NSString * const kRTCL16CodecName;
RTC_EXTERN const NSString * const kRTCG722CodecName;
RTC_EXTERN const NSString * const kRTCIlbcCodecName;
RTC_EXTERN const NSString * const kRTCPcmuCodecName;
RTC_EXTERN const NSString * const kRTCPcmaCodecName;
RTC_EXTERN const NSString * const kRTCDtmfCodecName;
RTC_EXTERN const NSString * const kRTCComfortNoiseCodecName;
RTC_EXTERN const NSString * const kRTCVp8CodecName;
RTC_EXTERN const NSString * const kRTCVp9CodecName;
RTC_EXTERN const NSString * const kRTCH264CodecName;
RTC_EXTERN const NSString *const kRTCRtxCodecName;
RTC_EXTERN const NSString *const kRTCRedCodecName;
RTC_EXTERN const NSString *const kRTCUlpfecCodecName;
RTC_EXTERN const NSString *const kRTCFlexfecCodecName;
RTC_EXTERN const NSString *const kRTCOpusCodecName;
RTC_EXTERN const NSString *const kRTCIsacCodecName;
RTC_EXTERN const NSString *const kRTCL16CodecName;
RTC_EXTERN const NSString *const kRTCG722CodecName;
RTC_EXTERN const NSString *const kRTCIlbcCodecName;
RTC_EXTERN const NSString *const kRTCPcmuCodecName;
RTC_EXTERN const NSString *const kRTCPcmaCodecName;
RTC_EXTERN const NSString *const kRTCDtmfCodecName;
RTC_EXTERN const NSString *const kRTCComfortNoiseCodecName;
RTC_EXTERN const NSString *const kRTCVp8CodecName;
RTC_EXTERN const NSString *const kRTCVp9CodecName;
RTC_EXTERN const NSString *const kRTCH264CodecName;
/** Defined in http://w3c.github.io/webrtc-pc/#idl-def-RTCRtpCodecParameters */
RTC_EXPORT

View File

@ -36,8 +36,7 @@ RTC_EXPORT
- (instancetype)init NS_UNAVAILABLE;
/** Initialize a session description with a type and SDP string. */
- (instancetype)initWithType:(RTCSdpType)type sdp:(NSString *)sdp
NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithType:(RTCSdpType)type sdp:(NSString *)sdp NS_DESIGNATED_INITIALIZER;
+ (NSString *)stringForType:(RTCSdpType)type;

View File

@ -16,6 +16,6 @@ RTC_EXTERN void RTCSetupInternalTracer(void);
/** Starts capture to specified file. Must be a valid writable path.
* Returns YES if capture starts.
*/
RTC_EXTERN BOOL RTCStartInternalCapture(NSString *filePath);
RTC_EXTERN BOOL RTCStartInternalCapture(NSString* filePath);
RTC_EXTERN void RTCStopInternalCapture(void);
RTC_EXTERN void RTCShutdownInternalTracer(void);

View File

@ -172,9 +172,9 @@ RTC_EXPORT
DEPRECATED_MSG_ATTRIBUTE("use startDecodeWithNumberOfCores: instead");
- (NSInteger)releaseDecoder;
- (NSInteger)decode:(RTCEncodedImage *)encodedImage
missingFrames:(BOOL)missingFrames
codecSpecificInfo:(nullable id<RTCCodecSpecificInfo>)info
renderTimeMs:(int64_t)renderTimeMs;
missingFrames:(BOOL)missingFrames
codecSpecificInfo:(nullable id<RTCCodecSpecificInfo>)info
renderTimeMs:(int64_t)renderTimeMs;
- (NSString *)implementationName;
// TODO(andersc): Make non-optional when `startDecodeWithSettings:numberOfCores:` is removed.

View File

@ -69,7 +69,7 @@ RTC_EXPORT
/** Encoder. */
RTC_EXPORT
@interface RTCVideoEncoderH264 : NSObject<RTCVideoEncoder>
@interface RTCVideoEncoderH264 : NSObject <RTCVideoEncoder>
- (instancetype)initWithCodecInfo:(RTCVideoCodecInfo *)codecInfo;
@ -77,15 +77,15 @@ RTC_EXPORT
/** Decoder. */
RTC_EXPORT
@interface RTCVideoDecoderH264 : NSObject<RTCVideoDecoder>
@interface RTCVideoDecoderH264 : NSObject <RTCVideoDecoder>
@end
/** Encoder factory. */
RTC_EXPORT
@interface RTCVideoEncoderFactoryH264 : NSObject<RTCVideoEncoderFactory>
@interface RTCVideoEncoderFactoryH264 : NSObject <RTCVideoEncoderFactory>
@end
/** Decoder factory. */
RTC_EXPORT
@interface RTCVideoDecoderFactoryH264 : NSObject<RTCVideoDecoderFactory>
@interface RTCVideoDecoderFactoryH264 : NSObject <RTCVideoDecoderFactory>
@end

View File

@ -44,7 +44,7 @@ RTC_EXPORT
@property(nonatomic, readonly) id<RTCVideoFrameBuffer> buffer;
- (instancetype)init NS_UNAVAILABLE;
- (instancetype)new NS_UNAVAILABLE;
- (instancetype) new NS_UNAVAILABLE;
/** Initialize an RTCVideoFrame from a pixel buffer, rotation, and timestamp.
* Deprecated - initialize with a RTCCVPixelBuffer instead

View File

@ -21,4 +21,4 @@ rtc::scoped_refptr<AudioDeviceModule> CreateAudioDeviceModule();
} // namespace webrtc
#endif // SDK_OBJC_FRAMEWORK_NATIVE_API_AUDIO_DEVICE_MODULE_H_
#endif // SDK_OBJC_FRAMEWORK_NATIVE_API_AUDIO_DEVICE_MODULE_H_

View File

@ -13,14 +13,14 @@
#include <memory>
#include "sdk/objc/Framework/Headers/WebRTC/RTCMacros.h"
#include "modules/audio_device/audio_device_generic.h"
#include "audio_session_observer.h"
#include "voice_processing_audio_unit.h"
#include "modules/audio_device/audio_device_generic.h"
#include "rtc_base/buffer.h"
#include "rtc_base/thread.h"
#include "rtc_base/thread_annotations.h"
#include "rtc_base/thread_checker.h"
#include "sdk/objc/Framework/Headers/WebRTC/RTCMacros.h"
#include "voice_processing_audio_unit.h"
RTC_FWD_DECL_OBJC_CLASS(RTCNativeAudioSessionDelegateAdapter);
@ -155,7 +155,7 @@ class AudioDeviceIOS : public AudioDeviceGeneric,
AudioBufferList* io_data) override;
// Handles messages from posts.
void OnMessage(rtc::Message *msg) override;
void OnMessage(rtc::Message* msg) override;
bool IsInterrupted();

View File

@ -20,124 +20,120 @@
#include "rtc_base/checks.h"
#include "rtc_base/criticalsection.h"
namespace webrtc {
class AudioDeviceGeneric;
namespace ios_adm {
class AudioDeviceModuleIOS : public AudioDeviceModule {
class AudioDeviceModuleIOS : public AudioDeviceModule {
public:
int32_t AttachAudioBuffer();
public:
AudioDeviceModuleIOS();
~AudioDeviceModuleIOS() override;
int32_t AttachAudioBuffer();
// Retrieve the currently utilized audio layer
int32_t ActiveAudioLayer(AudioLayer* audioLayer) const override;
AudioDeviceModuleIOS();
~AudioDeviceModuleIOS() override;
// Full-duplex transportation of PCM audio
int32_t RegisterAudioCallback(AudioTransport* audioCallback) override;
// Retrieve the currently utilized audio layer
int32_t ActiveAudioLayer(AudioLayer* audioLayer) const override;
// Main initializaton and termination
int32_t Init() override;
int32_t Terminate() override;
bool Initialized() const override;
// Full-duplex transportation of PCM audio
int32_t RegisterAudioCallback(AudioTransport* audioCallback) override;
// Main initializaton and termination
int32_t Init() override;
int32_t Terminate() override;
bool Initialized() const override;
// Device enumeration
int16_t PlayoutDevices() override;
int16_t RecordingDevices() override;
int32_t PlayoutDeviceName(uint16_t index,
// Device enumeration
int16_t PlayoutDevices() override;
int16_t RecordingDevices() override;
int32_t PlayoutDeviceName(uint16_t index,
char name[kAdmMaxDeviceNameSize],
char guid[kAdmMaxGuidSize]) override;
int32_t RecordingDeviceName(uint16_t index,
char name[kAdmMaxDeviceNameSize],
char guid[kAdmMaxGuidSize]) override;
int32_t RecordingDeviceName(uint16_t index,
char name[kAdmMaxDeviceNameSize],
char guid[kAdmMaxGuidSize]) override;
// Device selection
int32_t SetPlayoutDevice(uint16_t index) override;
int32_t SetPlayoutDevice(WindowsDeviceType device) override;
int32_t SetRecordingDevice(uint16_t index) override;
int32_t SetRecordingDevice(WindowsDeviceType device) override;
// Device selection
int32_t SetPlayoutDevice(uint16_t index) override;
int32_t SetPlayoutDevice(WindowsDeviceType device) override;
int32_t SetRecordingDevice(uint16_t index) override;
int32_t SetRecordingDevice(WindowsDeviceType device) override;
// Audio transport initialization
int32_t PlayoutIsAvailable(bool* available) override;
int32_t InitPlayout() override;
bool PlayoutIsInitialized() const override;
int32_t RecordingIsAvailable(bool* available) override;
int32_t InitRecording() override;
bool RecordingIsInitialized() const override;
// Audio transport initialization
int32_t PlayoutIsAvailable(bool* available) override;
int32_t InitPlayout() override;
bool PlayoutIsInitialized() const override;
int32_t RecordingIsAvailable(bool* available) override;
int32_t InitRecording() override;
bool RecordingIsInitialized() const override;
// Audio transport control
int32_t StartPlayout() override;
int32_t StopPlayout() override;
bool Playing() const override;
int32_t StartRecording() override;
int32_t StopRecording() override;
bool Recording() const override;
// Audio transport control
int32_t StartPlayout() override;
int32_t StopPlayout() override;
bool Playing() const override;
int32_t StartRecording() override;
int32_t StopRecording() override;
bool Recording() const override;
// Audio mixer initialization
int32_t InitSpeaker() override;
bool SpeakerIsInitialized() const override;
int32_t InitMicrophone() override;
bool MicrophoneIsInitialized() const override;
// Audio mixer initialization
int32_t InitSpeaker() override;
bool SpeakerIsInitialized() const override;
int32_t InitMicrophone() override;
bool MicrophoneIsInitialized() const override;
// Speaker volume controls
int32_t SpeakerVolumeIsAvailable(bool* available) override;
int32_t SetSpeakerVolume(uint32_t volume) override;
int32_t SpeakerVolume(uint32_t* volume) const override;
int32_t MaxSpeakerVolume(uint32_t* maxVolume) const override;
int32_t MinSpeakerVolume(uint32_t* minVolume) const override;
// Speaker volume controls
int32_t SpeakerVolumeIsAvailable(bool* available) override;
int32_t SetSpeakerVolume(uint32_t volume) override;
int32_t SpeakerVolume(uint32_t* volume) const override;
int32_t MaxSpeakerVolume(uint32_t* maxVolume) const override;
int32_t MinSpeakerVolume(uint32_t* minVolume) const override;
// Microphone volume controls
int32_t MicrophoneVolumeIsAvailable(bool* available) override;
int32_t SetMicrophoneVolume(uint32_t volume) override;
int32_t MicrophoneVolume(uint32_t* volume) const override;
int32_t MaxMicrophoneVolume(uint32_t* maxVolume) const override;
int32_t MinMicrophoneVolume(uint32_t* minVolume) const override;
// Microphone volume controls
int32_t MicrophoneVolumeIsAvailable(bool* available) override;
int32_t SetMicrophoneVolume(uint32_t volume) override;
int32_t MicrophoneVolume(uint32_t* volume) const override;
int32_t MaxMicrophoneVolume(uint32_t* maxVolume) const override;
int32_t MinMicrophoneVolume(uint32_t* minVolume) const override;
// Speaker mute control
int32_t SpeakerMuteIsAvailable(bool* available) override;
int32_t SetSpeakerMute(bool enable) override;
int32_t SpeakerMute(bool* enabled) const override;
// Speaker mute control
int32_t SpeakerMuteIsAvailable(bool* available) override;
int32_t SetSpeakerMute(bool enable) override;
int32_t SpeakerMute(bool* enabled) const override;
// Microphone mute control
int32_t MicrophoneMuteIsAvailable(bool* available) override;
int32_t SetMicrophoneMute(bool enable) override;
int32_t MicrophoneMute(bool* enabled) const override;
// Microphone mute control
int32_t MicrophoneMuteIsAvailable(bool* available) override;
int32_t SetMicrophoneMute(bool enable) override;
int32_t MicrophoneMute(bool* enabled) const override;
// Stereo support
int32_t StereoPlayoutIsAvailable(bool* available) const override;
int32_t SetStereoPlayout(bool enable) override;
int32_t StereoPlayout(bool* enabled) const override;
int32_t StereoRecordingIsAvailable(bool* available) const override;
int32_t SetStereoRecording(bool enable) override;
int32_t StereoRecording(bool* enabled) const override;
// Stereo support
int32_t StereoPlayoutIsAvailable(bool* available) const override;
int32_t SetStereoPlayout(bool enable) override;
int32_t StereoPlayout(bool* enabled) const override;
int32_t StereoRecordingIsAvailable(bool* available) const override;
int32_t SetStereoRecording(bool enable) override;
int32_t StereoRecording(bool* enabled) const override;
// Delay information and control
int32_t PlayoutDelay(uint16_t* delayMS) const override;
// Delay information and control
int32_t PlayoutDelay(uint16_t* delayMS) const override;
bool BuiltInAECIsAvailable() const override;
int32_t EnableBuiltInAEC(bool enable) override;
bool BuiltInAGCIsAvailable() const override;
int32_t EnableBuiltInAGC(bool enable) override;
bool BuiltInNSIsAvailable() const override;
int32_t EnableBuiltInNS(bool enable) override;
bool BuiltInAECIsAvailable() const override;
int32_t EnableBuiltInAEC(bool enable) override;
bool BuiltInAGCIsAvailable() const override;
int32_t EnableBuiltInAGC(bool enable) override;
bool BuiltInNSIsAvailable() const override;
int32_t EnableBuiltInNS(bool enable) override;
#if defined(WEBRTC_IOS)
int GetPlayoutAudioParameters(AudioParameters* params) const override;
int GetRecordAudioParameters(AudioParameters* params) const override;
int GetPlayoutAudioParameters(AudioParameters* params) const override;
int GetRecordAudioParameters(AudioParameters* params) const override;
#endif // WEBRTC_IOS
private:
bool initialized_ = false;
std::unique_ptr<AudioDeviceIOS> audio_device_;
std::unique_ptr<AudioDeviceBuffer> audio_device_buffer_;
};
} // namespace ios_adm
} // namespace webrtc
private:
bool initialized_ = false;
std::unique_ptr<AudioDeviceIOS> audio_device_;
std::unique_ptr<AudioDeviceBuffer> audio_device_buffer_;
};
} // namespace ios_adm
} // namespace webrtc
#endif // SDK_IOS_NATIVE_API_AUDIO_DEVICE_MODULE_AUDIO_DEVICE_IOS_H_