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

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