diff --git c/CHANGELOG.md w/CHANGELOG.md index 4964744..677cf29 100644 --- c/CHANGELOG.md +++ w/CHANGELOG.md @@ -1,6 +1,3 @@ -#### Version 8.0.0 -* Update to WebRTC.framework M84 - #### Version 7.0.0 * Update to WebRTC.framework M75 diff --git c/dist/cordova-plugin-iosrtc.js w/dist/cordova-plugin-iosrtc.js index 241cdfc..5e3336c 100644 --- c/dist/cordova-plugin-iosrtc.js +++ w/dist/cordova-plugin-iosrtc.js @@ -1,5 +1,5 @@ /* - * cordova-plugin-iosrtc v8.0.0 + * cordova-plugin-iosrtc v7.0.0 * Cordova iOS plugin exposing the full WebRTC W3C JavaScript APIs * Copyright 2015-2017 eFace2Face, Inc. (https://eface2face.com) * Copyright 2015-2019 BasqueVoIPMafia (https://github.com/BasqueVoIPMafia) diff --git c/extra/ios_arch.js w/extra/ios_arch.js index 3e04ca1..cf0f8ca 100644 --- c/extra/ios_arch.js +++ w/extra/ios_arch.js @@ -7,7 +7,7 @@ const path = require('path'); const exec = require('child_process').execSync; const WEBRTC_BIN_PATH = path.join(__dirname, '../lib/WebRTC.framework'); -const ARCH_TYPES = ['x86_64', 'arm64']; +const ARCH_TYPES = ['i386', 'x86_64', 'armv7', 'arm64']; /* === Example to strip simulator archs for Apple Store Submission === * @@ -37,11 +37,11 @@ if (process.argv[2] === '--extract' || process.argv[2] === '-e') { } else if (process.argv[2] === '--simulator' || process.argv[2] === '-s') { // re-package simulator related archs only. ( i386, x86_64 ) console.log('Compiling simulator...'); - exec(`lipo -o WebRTC -create WebRTC-x86_64`, {cwd: WEBRTC_BIN_PATH}); + exec(`lipo -o WebRTC -create WebRTC-x86_64 WebRTC-i386`, {cwd: WEBRTC_BIN_PATH}); } else if (process.argv[2] === '--device' || process.argv[2] === '-d') { // re-package device related archs only. ( armv7, arm64 ) console.log('Compiling device...'); - exec(`lipo -o WebRTC -create WebRTC-arm64`, {cwd: WEBRTC_BIN_PATH}); + exec(`lipo -o WebRTC -create WebRTC-armv7 WebRTC-arm64`, {cwd: WEBRTC_BIN_PATH}); } else if (process.argv[2] === '--list' || process.argv[2] === '-l') { // List WebRTC architectures console.log('List WebRTC architectures...'); diff --git c/lib/WebRTC.framework/Headers/RTCAudioSession.h w/lib/WebRTC.framework/Headers/RTCAudioSession.h index f917e32..d43418b 100644 --- c/lib/WebRTC.framework/Headers/RTCAudioSession.h +++ w/lib/WebRTC.framework/Headers/RTCAudioSession.h @@ -21,81 +21,78 @@ extern NSInteger const kRTCAudioSessionErrorLockRequired; /** Unknown configuration error occurred. */ extern NSInteger const kRTCAudioSessionErrorConfiguration; -@class RTC_OBJC_TYPE(RTCAudioSession); -@class RTC_OBJC_TYPE(RTCAudioSessionConfiguration); +@class RTCAudioSession; +@class RTCAudioSessionConfiguration; // Surfaces AVAudioSession events. WebRTC will listen directly for notifications // from AVAudioSession and handle them before calling these delegate methods, // at which point applications can perform additional processing if required. RTC_OBJC_EXPORT -@protocol RTC_OBJC_TYPE -(RTCAudioSessionDelegate) +@protocol RTCAudioSessionDelegate - @optional +@optional /** Called on a system notification thread when AVAudioSession starts an * interruption event. */ -- (void)audioSessionDidBeginInterruption:(RTC_OBJC_TYPE(RTCAudioSession) *)session; +- (void)audioSessionDidBeginInterruption:(RTCAudioSession *)session; /** Called on a system notification thread when AVAudioSession ends an * interruption event. */ -- (void)audioSessionDidEndInterruption:(RTC_OBJC_TYPE(RTCAudioSession) *)session +- (void)audioSessionDidEndInterruption:(RTCAudioSession *)session shouldResumeSession:(BOOL)shouldResumeSession; /** Called on a system notification thread when AVAudioSession changes the * route. */ -- (void)audioSessionDidChangeRoute:(RTC_OBJC_TYPE(RTCAudioSession) *)session +- (void)audioSessionDidChangeRoute:(RTCAudioSession *)session reason:(AVAudioSessionRouteChangeReason)reason previousRoute:(AVAudioSessionRouteDescription *)previousRoute; /** Called on a system notification thread when AVAudioSession media server * terminates. */ -- (void)audioSessionMediaServerTerminated:(RTC_OBJC_TYPE(RTCAudioSession) *)session; +- (void)audioSessionMediaServerTerminated:(RTCAudioSession *)session; /** Called on a system notification thread when AVAudioSession media server * restarts. */ -- (void)audioSessionMediaServerReset:(RTC_OBJC_TYPE(RTCAudioSession) *)session; +- (void)audioSessionMediaServerReset:(RTCAudioSession *)session; // TODO(tkchin): Maybe handle SilenceSecondaryAudioHintNotification. -- (void)audioSession:(RTC_OBJC_TYPE(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. */ -- (void)audioSessionDidStartPlayOrRecord:(RTC_OBJC_TYPE(RTCAudioSession) *)session; +- (void)audioSessionDidStartPlayOrRecord:(RTCAudioSession *)session; /** Called on a WebRTC thread when the audio device is notified to stop * playback or recording. */ -- (void)audioSessionDidStopPlayOrRecord:(RTC_OBJC_TYPE(RTCAudioSession) *)session; +- (void)audioSessionDidStopPlayOrRecord:(RTCAudioSession *)session; /** Called when the AVAudioSession output volume value changes. */ -- (void)audioSession:(RTC_OBJC_TYPE(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. */ -- (void)audioSession:(RTC_OBJC_TYPE(RTCAudioSession) *)audioSession +- (void)audioSession:(RTCAudioSession *)audioSession didDetectPlayoutGlitch:(int64_t)totalNumberOfGlitches; /** Called when the audio session is about to change the active state. */ -- (void)audioSession:(RTC_OBJC_TYPE(RTCAudioSession) *)audioSession willSetActive:(BOOL)active; +- (void)audioSession:(RTCAudioSession *)audioSession willSetActive:(BOOL)active; /** Called after the audio session sucessfully changed the active state. */ -- (void)audioSession:(RTC_OBJC_TYPE(RTCAudioSession) *)audioSession didSetActive:(BOOL)active; +- (void)audioSession:(RTCAudioSession *)audioSession didSetActive:(BOOL)active; /** Called after the audio session failed to change the active state. */ -- (void)audioSession:(RTC_OBJC_TYPE(RTCAudioSession) *)audioSession +- (void)audioSession:(RTCAudioSession *)audioSession failedToSetActive:(BOOL)active error:(NSError *)error; @@ -106,11 +103,10 @@ RTC_OBJC_EXPORT * case of this is when CallKit activates the audio session for the application */ RTC_OBJC_EXPORT -@protocol RTC_OBJC_TYPE -(RTCAudioSessionActivationDelegate) +@protocol RTCAudioSessionActivationDelegate - /** Called when the audio session is activated outside of the app by iOS. */ - - (void)audioSessionDidActivate : (AVAudioSession *)session; +/** Called when the audio session is activated outside of the app by iOS. */ +- (void)audioSessionDidActivate:(AVAudioSession *)session; /** Called when the audio session is deactivated outside of the app by iOS. */ - (void)audioSessionDidDeactivate:(AVAudioSession *)session; @@ -125,7 +121,7 @@ RTC_OBJC_EXPORT * activated only once. See |setActive:error:|. */ RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCAudioSession) : NSObject +@interface RTCAudioSession : NSObject /** Convenience property to access the AVAudioSession singleton. Callers should * not call setters on AVAudioSession directly, but other method invocations @@ -186,23 +182,14 @@ RTC_OBJC_EXPORT @property(readonly) NSTimeInterval IOBufferDuration; @property(readonly) NSTimeInterval preferredIOBufferDuration; -/** - When YES, calls to -setConfiguration:error: and -setConfiguration:active:error: ignore errors in - configuring the audio session's "preferred" attributes (e.g. preferredInputNumberOfChannels). - Typically, configurations to preferred attributes are optimizations, and ignoring this type of - configuration error allows code flow to continue along the happy path when these optimization are - not available. The default value of this property is NO. - */ -@property(nonatomic) BOOL ignoresPreferredAttributeConfigurationErrors; - /** Default constructor. */ + (instancetype)sharedInstance; - (instancetype)init NS_UNAVAILABLE; /** Adds a delegate, which is held weakly. */ -- (void)addDelegate:(id)delegate; +- (void)addDelegate:(id)delegate; /** Removes an added delegate. */ -- (void)removeDelegate:(id)delegate; +- (void)removeDelegate:(id)delegate; /** Request exclusive access to the audio session for configuration. This call * will block if the lock is held by another object. @@ -241,21 +228,19 @@ RTC_OBJC_EXPORT error:(NSError **)outError; @end -@interface RTC_OBJC_TYPE (RTCAudioSession) -(Configuration) +@interface RTCAudioSession (Configuration) - /** Applies the configuration to the current session. Attempts to set all - * properties even if previous ones fail. Only the last error will be - * returned. - * |lockForConfiguration| must be called first. - */ - - (BOOL)setConfiguration : (RTC_OBJC_TYPE(RTCAudioSessionConfiguration) *)configuration error - : (NSError **)outError; +/** Applies the configuration to the current session. Attempts to set all + * properties even if previous ones fail. Only the last error will be + * returned. + * |lockForConfiguration| must be called first. + */ +- (BOOL)setConfiguration:(RTCAudioSessionConfiguration *)configuration error:(NSError **)outError; /** Convenience method that calls both setConfiguration and setActive. * |lockForConfiguration| must be called first. */ -- (BOOL)setConfiguration:(RTC_OBJC_TYPE(RTCAudioSessionConfiguration) *)configuration +- (BOOL)setConfiguration:(RTCAudioSessionConfiguration *)configuration active:(BOOL)active error:(NSError **)outError; diff --git c/lib/WebRTC.framework/Headers/RTCAudioSessionConfiguration.h w/lib/WebRTC.framework/Headers/RTCAudioSessionConfiguration.h index 4582b80..9f3765d 100644 --- c/lib/WebRTC.framework/Headers/RTCAudioSessionConfiguration.h +++ w/lib/WebRTC.framework/Headers/RTCAudioSessionConfiguration.h @@ -23,7 +23,7 @@ RTC_EXTERN const double kRTCAudioSessionLowComplexityIOBufferDuration; // Struct to hold configuration values. RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCAudioSessionConfiguration) : NSObject +@interface RTCAudioSessionConfiguration : NSObject @property(nonatomic, strong) NSString *category; @property(nonatomic, assign) AVAudioSessionCategoryOptions categoryOptions; @@ -41,7 +41,7 @@ RTC_OBJC_EXPORT /** Returns the configuration that WebRTC needs. */ + (instancetype)webRTCConfiguration; /** Provide a way to override the default configuration. */ -+ (void)setWebRTCConfiguration:(RTC_OBJC_TYPE(RTCAudioSessionConfiguration) *)configuration; ++ (void)setWebRTCConfiguration:(RTCAudioSessionConfiguration *)configuration; @end diff --git c/lib/WebRTC.framework/Headers/RTCAudioSource.h w/lib/WebRTC.framework/Headers/RTCAudioSource.h index 9f78dcd..d1030e3 100644 --- c/lib/WebRTC.framework/Headers/RTCAudioSource.h +++ w/lib/WebRTC.framework/Headers/RTCAudioSource.h @@ -16,7 +16,7 @@ NS_ASSUME_NONNULL_BEGIN RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCAudioSource) : RTC_OBJC_TYPE(RTCMediaSource) +@interface RTCAudioSource : RTCMediaSource - (instancetype)init NS_UNAVAILABLE; diff --git c/lib/WebRTC.framework/Headers/RTCAudioTrack.h w/lib/WebRTC.framework/Headers/RTCAudioTrack.h index 95eb5d3..501ef92 100644 --- c/lib/WebRTC.framework/Headers/RTCAudioTrack.h +++ w/lib/WebRTC.framework/Headers/RTCAudioTrack.h @@ -13,15 +13,15 @@ NS_ASSUME_NONNULL_BEGIN -@class RTC_OBJC_TYPE(RTCAudioSource); +@class RTCAudioSource; RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCAudioTrack) : RTC_OBJC_TYPE(RTCMediaStreamTrack) +@interface RTCAudioTrack : RTCMediaStreamTrack - (instancetype)init NS_UNAVAILABLE; /** The audio source for this audio track. */ -@property(nonatomic, readonly) RTC_OBJC_TYPE(RTCAudioSource) * source; +@property(nonatomic, readonly) RTCAudioSource *source; @end diff --git c/lib/WebRTC.framework/Headers/RTCCVPixelBuffer.h w/lib/WebRTC.framework/Headers/RTCCVPixelBuffer.h index 17eebd0..432a382 100644 --- c/lib/WebRTC.framework/Headers/RTCCVPixelBuffer.h +++ w/lib/WebRTC.framework/Headers/RTCCVPixelBuffer.h @@ -17,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN /** RTCVideoFrameBuffer containing a CVPixelBufferRef */ RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCCVPixelBuffer) : NSObject +@interface RTCCVPixelBuffer : NSObject @property(nonatomic, readonly) CVPixelBufferRef pixelBuffer; @property(nonatomic, readonly) int cropX; diff --git c/lib/WebRTC.framework/Headers/RTCCallbackLogger.h w/lib/WebRTC.framework/Headers/RTCCallbackLogger.h index c1aeb82..2bce03f 100644 --- c/lib/WebRTC.framework/Headers/RTCCallbackLogger.h +++ w/lib/WebRTC.framework/Headers/RTCCallbackLogger.h @@ -22,7 +22,7 @@ typedef void (^RTCCallbackLoggerMessageAndSeverityHandler)(NSString *message, // This class intercepts WebRTC logs and forwards them to a registered block. // This class is not threadsafe. RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCCallbackLogger) : NSObject +@interface RTCCallbackLogger : NSObject // The severity level to capture. The default is kRTCLoggingSeverityInfo. @property(nonatomic, assign) RTCLoggingSeverity severity; diff --git c/lib/WebRTC.framework/Headers/RTCCameraPreviewView.h w/lib/WebRTC.framework/Headers/RTCCameraPreviewView.h index db9b15a..17f8d33 100644 --- c/lib/WebRTC.framework/Headers/RTCCameraPreviewView.h +++ w/lib/WebRTC.framework/Headers/RTCCameraPreviewView.h @@ -19,7 +19,7 @@ * AVCaptureSession. */ RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCCameraPreviewView) : UIView +@interface RTCCameraPreviewView : UIView /** The capture session being rendered in the view. Capture session * is assigned to AVCaptureVideoPreviewLayer async in the same diff --git c/lib/WebRTC.framework/Headers/RTCCameraVideoCapturer.h w/lib/WebRTC.framework/Headers/RTCCameraVideoCapturer.h index fed5a37..2b5e56f 100644 --- c/lib/WebRTC.framework/Headers/RTCCameraVideoCapturer.h +++ w/lib/WebRTC.framework/Headers/RTCCameraVideoCapturer.h @@ -17,10 +17,10 @@ NS_ASSUME_NONNULL_BEGIN RTC_OBJC_EXPORT -// Camera capture that implements RTCVideoCapturer. Delivers frames to a -// RTCVideoCapturerDelegate (usually RTCVideoSource). +// Camera capture that implements RTCVideoCapturer. Delivers frames to a RTCVideoCapturerDelegate +// (usually RTCVideoSource). NS_EXTENSION_UNAVAILABLE_IOS("Camera not available in app extensions.") -@interface RTC_OBJC_TYPE (RTCCameraVideoCapturer) : RTC_OBJC_TYPE(RTCVideoCapturer) +@interface RTCCameraVideoCapturer : RTCVideoCapturer // Capture session that is used for capturing. Valid from initialization to dealloc. @property(readonly, nonatomic) AVCaptureSession *captureSession; diff --git c/lib/WebRTC.framework/Headers/RTCCertificate.h w/lib/WebRTC.framework/Headers/RTCCertificate.h index 5ac8984..50c1ca5 100644 --- c/lib/WebRTC.framework/Headers/RTCCertificate.h +++ w/lib/WebRTC.framework/Headers/RTCCertificate.h @@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCCertificate) : NSObject +@interface RTCCertificate : NSObject /** Private key in PEM. */ @property(nonatomic, readonly, copy) NSString *private_key; @@ -37,7 +37,7 @@ RTC_OBJC_EXPORT * provided. * - name: "ECDSA" or "RSASSA-PKCS1-v1_5" */ -+ (nullable RTC_OBJC_TYPE(RTCCertificate) *)generateCertificateWithParams:(NSDictionary *)params; ++ (nullable RTCCertificate *)generateCertificateWithParams:(NSDictionary *)params; @end diff --git c/lib/WebRTC.framework/Headers/RTCCodecSpecificInfo.h w/lib/WebRTC.framework/Headers/RTCCodecSpecificInfo.h index 5e7800e..e2ae4ca 100644 --- c/lib/WebRTC.framework/Headers/RTCCodecSpecificInfo.h +++ w/lib/WebRTC.framework/Headers/RTCCodecSpecificInfo.h @@ -18,7 +18,7 @@ NS_ASSUME_NONNULL_BEGIN * Corresponds to webrtc::CodecSpecificInfo. */ RTC_OBJC_EXPORT -@protocol RTC_OBJC_TYPE -(RTCCodecSpecificInfo) @end +@protocol RTCCodecSpecificInfo +@end NS_ASSUME_NONNULL_END diff --git c/lib/WebRTC.framework/Headers/RTCCodecSpecificInfoH264.h w/lib/WebRTC.framework/Headers/RTCCodecSpecificInfoH264.h index ae3003a..ece9570 100644 --- c/lib/WebRTC.framework/Headers/RTCCodecSpecificInfoH264.h +++ w/lib/WebRTC.framework/Headers/RTCCodecSpecificInfoH264.h @@ -20,7 +20,7 @@ typedef NS_ENUM(NSUInteger, RTCH264PacketizationMode) { }; RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCCodecSpecificInfoH264) : NSObject +@interface RTCCodecSpecificInfoH264 : NSObject @property(nonatomic, assign) RTCH264PacketizationMode packetizationMode; diff --git c/lib/WebRTC.framework/Headers/RTCConfiguration.h w/lib/WebRTC.framework/Headers/RTCConfiguration.h index 4e9c674..f9e6edf 100644 --- c/lib/WebRTC.framework/Headers/RTCConfiguration.h +++ w/lib/WebRTC.framework/Headers/RTCConfiguration.h @@ -14,7 +14,8 @@ #import "RTCCryptoOptions.h" #import "RTCMacros.h" -@class RTC_OBJC_TYPE(RTCIceServer); +@class RTCIceServer; +@class RTCIntervalRange; /** * Represents the ice transport policy. This exposes the same states in C++, @@ -70,18 +71,13 @@ typedef NS_ENUM(NSInteger, RTCSdpSemantics) { NS_ASSUME_NONNULL_BEGIN RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCConfiguration) : NSObject - -/** If true, allows DSCP codes to be set on outgoing packets, configured using - * networkPriority field of RTCRtpEncodingParameters. Defaults to false. - */ -@property(nonatomic, assign) BOOL enableDscp; +@interface RTCConfiguration : NSObject /** An array of Ice Servers available to be used by ICE. */ -@property(nonatomic, copy) NSArray *iceServers; +@property(nonatomic, copy) NSArray *iceServers; /** An RTCCertificate for 're' use. */ -@property(nonatomic, nullable) RTC_OBJC_TYPE(RTCCertificate) * certificate; +@property(nonatomic, nullable) RTCCertificate *certificate; /** Which candidates the ICE agent is allowed to use. The W3C calls it * |iceTransportPolicy|, while in C++ it is called |type|. */ @@ -144,23 +140,18 @@ RTC_OBJC_EXPORT */ @property(nonatomic, assign) BOOL shouldPresumeWritableWhenFullyRelayed; -/* This flag is only effective when |continualGatheringPolicy| is - * RTCContinualGatheringPolicyGatherContinually. - * - * If YES, after the ICE transport type is changed such that new types of - * ICE candidates are allowed by the new transport type, e.g. from - * RTCIceTransportPolicyRelay to RTCIceTransportPolicyAll, candidates that - * have been gathered by the ICE transport but not matching the previous - * transport type and as a result not observed by PeerConnectionDelegateAdapter, - * will be surfaced to the delegate. - */ -@property(nonatomic, assign) BOOL shouldSurfaceIceCandidatesOnIceTransportTypeChanged; - /** If set to non-nil, controls the minimal interval between consecutive ICE * check packets. */ @property(nonatomic, copy, nullable) NSNumber *iceCheckMinInterval; +/** ICE Periodic Regathering + * If set, WebRTC will periodically create and propose candidates without + * starting a new ICE generation. The regathering happens continuously with + * interval specified in milliseconds by the uniform distribution [a, b]. + */ +@property(nonatomic, strong, nullable) RTCIntervalRange *iceRegatherIntervalRange; + /** Configure the SDP semantics used by this PeerConnection. Note that the * WebRTC 1.0 specification requires UnifiedPlan semantics. The * RTCRtpTransceiver API is only available with UnifiedPlan semantics. @@ -173,9 +164,9 @@ RTC_OBJC_EXPORT * * UnifiedPlan will cause RTCPeerConnection to create offers and answers with * multiple m= sections where each m= section maps to one RTCRtpSender and one - * RTCRtpReceiver (an RTCRtpTransceiver), either both audio or both - * video. This will also cause RTCPeerConnection) to ignore all but the first a=ssrc - * lines that form a Plan B stream. + * RTCRtpReceiver (an RTCRtpTransceiver), either both audio or both video. This + * will also cause RTCPeerConnection to ignore all but the first a=ssrc lines + * that form a Plan B stream. * * For users who wish to send multiple audio/video streams and need to stay * interoperable with legacy WebRTC implementations or use legacy APIs, @@ -191,12 +182,6 @@ RTC_OBJC_EXPORT */ @property(nonatomic, assign) BOOL activeResetSrtpParams; -/** If the remote side support mid-stream codec switches then allow encoder - * switching to be performed. - */ - -@property(nonatomic, assign) BOOL allowCodecSwitching; - /** * If MediaTransportFactory is provided in PeerConnectionFactory, this flag informs PeerConnection * that it should use the MediaTransportInterface. @@ -214,7 +199,7 @@ RTC_OBJC_EXPORT * frame encryption for native WebRTC. Setting this will overwrite any * options set through the PeerConnectionFactory (which is deprecated). */ -@property(nonatomic, nullable) RTC_OBJC_TYPE(RTCCryptoOptions) * cryptoOptions; +@property(nonatomic, nullable) RTCCryptoOptions *cryptoOptions; /** * Time interval between audio RTCP reports. diff --git c/lib/WebRTC.framework/Headers/RTCCryptoOptions.h w/lib/WebRTC.framework/Headers/RTCCryptoOptions.h index 759a45e..b465bb5 100644 --- c/lib/WebRTC.framework/Headers/RTCCryptoOptions.h +++ w/lib/WebRTC.framework/Headers/RTCCryptoOptions.h @@ -19,7 +19,7 @@ NS_ASSUME_NONNULL_BEGIN * as Objective-C doesn't support nested structures. */ RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCCryptoOptions) : NSObject +@interface RTCCryptoOptions : NSObject /** * Enable GCM crypto suites from RFC 7714 for SRTP. GCM will only be used diff --git c/lib/WebRTC.framework/Headers/RTCDataChannel.h w/lib/WebRTC.framework/Headers/RTCDataChannel.h index 2d0661f..0cc2de8 100644 --- c/lib/WebRTC.framework/Headers/RTCDataChannel.h +++ w/lib/WebRTC.framework/Headers/RTCDataChannel.h @@ -16,7 +16,7 @@ NS_ASSUME_NONNULL_BEGIN RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCDataBuffer) : NSObject +@interface RTCDataBuffer : NSObject /** NSData representation of the underlying buffer. */ @property(nonatomic, readonly) NSData *data; @@ -34,22 +34,20 @@ RTC_OBJC_EXPORT @end -@class RTC_OBJC_TYPE(RTCDataChannel); +@class RTCDataChannel; RTC_OBJC_EXPORT -@protocol RTC_OBJC_TYPE -(RTCDataChannelDelegate) +@protocol RTCDataChannelDelegate - /** The data channel state changed. */ - - (void)dataChannelDidChangeState : (RTC_OBJC_TYPE(RTCDataChannel) *)dataChannel; +/** The data channel state changed. */ +- (void)dataChannelDidChangeState:(RTCDataChannel *)dataChannel; /** The data channel successfully received a data buffer. */ -- (void)dataChannel:(RTC_OBJC_TYPE(RTCDataChannel) *)dataChannel - didReceiveMessageWithBuffer:(RTC_OBJC_TYPE(RTCDataBuffer) *)buffer; +- (void)dataChannel:(RTCDataChannel *)dataChannel + didReceiveMessageWithBuffer:(RTCDataBuffer *)buffer; @optional /** The data channel's |bufferedAmount| changed. */ -- (void)dataChannel:(RTC_OBJC_TYPE(RTCDataChannel) *)dataChannel - didChangeBufferedAmount:(uint64_t)amount; +- (void)dataChannel:(RTCDataChannel *)dataChannel didChangeBufferedAmount:(uint64_t)amount; @end @@ -62,7 +60,7 @@ typedef NS_ENUM(NSInteger, RTCDataChannelState) { }; RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCDataChannel) : NSObject +@interface RTCDataChannel : NSObject /** * A label that can be used to distinguish this data channel from other data @@ -117,7 +115,7 @@ RTC_OBJC_EXPORT @property(nonatomic, readonly) uint64_t bufferedAmount; /** The delegate for this data channel. */ -@property(nonatomic, weak) id delegate; +@property(nonatomic, weak) id delegate; - (instancetype)init NS_UNAVAILABLE; @@ -125,7 +123,7 @@ RTC_OBJC_EXPORT - (void)close; /** Attempt to send |data| on this data channel's underlying data transport. */ -- (BOOL)sendData:(RTC_OBJC_TYPE(RTCDataBuffer) *)data; +- (BOOL)sendData:(RTCDataBuffer *)data; @end diff --git c/lib/WebRTC.framework/Headers/RTCDataChannelConfiguration.h w/lib/WebRTC.framework/Headers/RTCDataChannelConfiguration.h index 9459ae0..96d33f4 100644 --- c/lib/WebRTC.framework/Headers/RTCDataChannelConfiguration.h +++ w/lib/WebRTC.framework/Headers/RTCDataChannelConfiguration.h @@ -16,7 +16,7 @@ NS_ASSUME_NONNULL_BEGIN RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCDataChannelConfiguration) : NSObject +@interface RTCDataChannelConfiguration : NSObject /** Set to YES if ordered delivery is required. */ @property(nonatomic, assign) BOOL isOrdered; diff --git c/lib/WebRTC.framework/Headers/RTCDefaultVideoDecoderFactory.h w/lib/WebRTC.framework/Headers/RTCDefaultVideoDecoderFactory.h index de5a9c4..7ca9463 100644 --- c/lib/WebRTC.framework/Headers/RTCDefaultVideoDecoderFactory.h +++ w/lib/WebRTC.framework/Headers/RTCDefaultVideoDecoderFactory.h @@ -16,11 +16,10 @@ NS_ASSUME_NONNULL_BEGIN /** This decoder factory include support for all codecs bundled with WebRTC. If using custom - * codecs, create custom implementations of RTCVideoEncoderFactory and - * RTCVideoDecoderFactory. + * codecs, create custom implementations of RTCVideoEncoderFactory and RTCVideoDecoderFactory. */ RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCDefaultVideoDecoderFactory) : NSObject +@interface RTCDefaultVideoDecoderFactory : NSObject @end NS_ASSUME_NONNULL_END diff --git c/lib/WebRTC.framework/Headers/RTCDefaultVideoEncoderFactory.h w/lib/WebRTC.framework/Headers/RTCDefaultVideoEncoderFactory.h index 92ab40c..c45e543 100644 --- c/lib/WebRTC.framework/Headers/RTCDefaultVideoEncoderFactory.h +++ w/lib/WebRTC.framework/Headers/RTCDefaultVideoEncoderFactory.h @@ -16,15 +16,14 @@ NS_ASSUME_NONNULL_BEGIN /** This encoder factory include support for all codecs bundled with WebRTC. If using custom - * codecs, create custom implementations of RTCVideoEncoderFactory and - * RTCVideoDecoderFactory. + * codecs, create custom implementations of RTCVideoEncoderFactory and RTCVideoDecoderFactory. */ RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCDefaultVideoEncoderFactory) : NSObject +@interface RTCDefaultVideoEncoderFactory : NSObject -@property(nonatomic, retain) RTC_OBJC_TYPE(RTCVideoCodecInfo) *preferredCodec; +@property(nonatomic, retain) RTCVideoCodecInfo *preferredCodec; -+ (NSArray *)supportedCodecs; ++ (NSArray *)supportedCodecs; @end diff --git c/lib/WebRTC.framework/Headers/RTCDispatcher.h w/lib/WebRTC.framework/Headers/RTCDispatcher.h index f8580f9..4f8359b 100644 --- c/lib/WebRTC.framework/Headers/RTCDispatcher.h +++ w/lib/WebRTC.framework/Headers/RTCDispatcher.h @@ -26,7 +26,7 @@ typedef NS_ENUM(NSInteger, RTCDispatcherQueueType) { * shared dispatch queue. */ RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCDispatcher) : NSObject +@interface RTCDispatcher : NSObject - (instancetype)init NS_UNAVAILABLE; diff --git c/lib/WebRTC.framework/Headers/RTCDtmfSender.h w/lib/WebRTC.framework/Headers/RTCDtmfSender.h index 0f1b6ba..5d86d01 100644 --- c/lib/WebRTC.framework/Headers/RTCDtmfSender.h +++ w/lib/WebRTC.framework/Headers/RTCDtmfSender.h @@ -15,15 +15,14 @@ NS_ASSUME_NONNULL_BEGIN RTC_OBJC_EXPORT -@protocol RTC_OBJC_TYPE -(RTCDtmfSender) +@protocol RTCDtmfSender - /** - * Returns true if this RTCDtmfSender is capable of sending DTMF. Otherwise - * returns false. To be able to send DTMF, the associated RTCRtpSender must be - * able to send packets, and a "telephone-event" codec must be negotiated. - */ - @property(nonatomic, readonly) BOOL canInsertDtmf; +/** + * Returns true if this RTCDtmfSender is capable of sending DTMF. Otherwise + * returns false. To be able to send DTMF, the associated RTCRtpSender must be + * able to send packets, and a "telephone-event" codec must be negotiated. + */ +@property(nonatomic, readonly) BOOL canInsertDtmf; /** * Queues a task that sends the DTMF tones. The tones parameter is treated diff --git c/lib/WebRTC.framework/Headers/RTCEAGLVideoView.h w/lib/WebRTC.framework/Headers/RTCEAGLVideoView.h index 24b26cd..30764b5 100644 --- c/lib/WebRTC.framework/Headers/RTCEAGLVideoView.h +++ w/lib/WebRTC.framework/Headers/RTCEAGLVideoView.h @@ -17,29 +17,24 @@ NS_ASSUME_NONNULL_BEGIN -@class RTC_OBJC_TYPE(RTCEAGLVideoView); +@class RTCEAGLVideoView; /** - * RTCEAGLVideoView is an RTCVideoRenderer which renders video frames - * in its bounds using OpenGLES 2.0 or OpenGLES 3.0. + * RTCEAGLVideoView is an RTCVideoRenderer which renders video frames in its + * bounds using OpenGLES 2.0 or OpenGLES 3.0. */ RTC_OBJC_EXPORT NS_EXTENSION_UNAVAILABLE_IOS("Rendering not available in app extensions.") -@interface RTC_OBJC_TYPE (RTCEAGLVideoView) : UIView +@interface RTCEAGLVideoView : UIView -@property(nonatomic, weak) id delegate; +@property(nonatomic, weak) id delegate; - (instancetype)initWithFrame:(CGRect)frame - shader:(id)shader - NS_DESIGNATED_INITIALIZER; + shader:(id)shader NS_DESIGNATED_INITIALIZER; - (instancetype)initWithCoder:(NSCoder *)aDecoder - shader:(id)shader - NS_DESIGNATED_INITIALIZER; + shader:(id)shader NS_DESIGNATED_INITIALIZER; -/** @abstract Wrapped RTCVideoRotation, or nil. - */ -@property(nonatomic, nullable) NSValue *rotationOverride; @end NS_ASSUME_NONNULL_END diff --git c/lib/WebRTC.framework/Headers/RTCEncodedImage.h w/lib/WebRTC.framework/Headers/RTCEncodedImage.h index 5fec8a2..670c727 100644 --- c/lib/WebRTC.framework/Headers/RTCEncodedImage.h +++ w/lib/WebRTC.framework/Headers/RTCEncodedImage.h @@ -31,7 +31,7 @@ typedef NS_ENUM(NSUInteger, RTCVideoContentType) { /** Represents an encoded frame. Corresponds to webrtc::EncodedImage. */ RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCEncodedImage) : NSObject +@interface RTCEncodedImage : NSObject @property(nonatomic, strong) NSData *buffer; @property(nonatomic, assign) int32_t encodedWidth; diff --git c/lib/WebRTC.framework/Headers/RTCFileLogger.h w/lib/WebRTC.framework/Headers/RTCFileLogger.h index 853e673..cd5c1c4 100644 --- c/lib/WebRTC.framework/Headers/RTCFileLogger.h +++ w/lib/WebRTC.framework/Headers/RTCFileLogger.h @@ -34,7 +34,7 @@ NS_ASSUME_NONNULL_BEGIN // For kRTCFileLoggerTypeApp, the oldest log is overwritten. // This class is not threadsafe. RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCFileLogger) : NSObject +@interface RTCFileLogger : NSObject // The severity level to capture. The default is kRTCFileLoggerSeverityInfo. @property(nonatomic, assign) RTCFileLoggerSeverity severity; diff --git c/lib/WebRTC.framework/Headers/RTCFileVideoCapturer.h w/lib/WebRTC.framework/Headers/RTCFileVideoCapturer.h index 19262c6..0782588 100644 --- c/lib/WebRTC.framework/Headers/RTCFileVideoCapturer.h +++ w/lib/WebRTC.framework/Headers/RTCFileVideoCapturer.h @@ -27,7 +27,7 @@ typedef void (^RTCFileVideoCapturerErrorBlock)(NSError *error); RTC_OBJC_EXPORT NS_CLASS_AVAILABLE_IOS(10) -@interface RTC_OBJC_TYPE (RTCFileVideoCapturer) : RTC_OBJC_TYPE(RTCVideoCapturer) +@interface RTCFileVideoCapturer : RTCVideoCapturer /** * Starts asynchronous capture of frames from video file. diff --git c/lib/WebRTC.framework/Headers/RTCH264ProfileLevelId.h w/lib/WebRTC.framework/Headers/RTCH264ProfileLevelId.h index dac7bb5..56b3532 100644 --- c/lib/WebRTC.framework/Headers/RTCH264ProfileLevelId.h +++ w/lib/WebRTC.framework/Headers/RTCH264ProfileLevelId.h @@ -48,7 +48,7 @@ typedef NS_ENUM(NSUInteger, RTCH264Level) { }; RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCH264ProfileLevelId) : NSObject +@interface RTCH264ProfileLevelId : NSObject @property(nonatomic, readonly) RTCH264Profile profile; @property(nonatomic, readonly) RTCH264Level level; diff --git c/lib/WebRTC.framework/Headers/RTCI420Buffer.h w/lib/WebRTC.framework/Headers/RTCI420Buffer.h index b97f05a..a6c7e41 100644 --- c/lib/WebRTC.framework/Headers/RTCI420Buffer.h +++ w/lib/WebRTC.framework/Headers/RTCI420Buffer.h @@ -16,7 +16,7 @@ NS_ASSUME_NONNULL_BEGIN /** Protocol for RTCYUVPlanarBuffers containing I420 data */ RTC_OBJC_EXPORT -@protocol RTC_OBJC_TYPE -(RTCI420Buffer) @end +@protocol RTCI420Buffer +@end NS_ASSUME_NONNULL_END diff --git c/lib/WebRTC.framework/Headers/RTCIceCandidate.h w/lib/WebRTC.framework/Headers/RTCIceCandidate.h index f84843a..3e305cc 100644 --- c/lib/WebRTC.framework/Headers/RTCIceCandidate.h +++ w/lib/WebRTC.framework/Headers/RTCIceCandidate.h @@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCIceCandidate) : NSObject +@interface RTCIceCandidate : NSObject /** * If present, the identifier of the "media stream identification" for the media diff --git c/lib/WebRTC.framework/Headers/RTCIceServer.h w/lib/WebRTC.framework/Headers/RTCIceServer.h index dd66c61..ab5fc4a 100644 --- c/lib/WebRTC.framework/Headers/RTCIceServer.h +++ w/lib/WebRTC.framework/Headers/RTCIceServer.h @@ -20,7 +20,7 @@ typedef NS_ENUM(NSUInteger, RTCTlsCertPolicy) { NS_ASSUME_NONNULL_BEGIN RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCIceServer) : NSObject +@interface RTCIceServer : NSObject /** URI(s) for this server represented as NSStrings. */ @property(nonatomic, readonly) NSArray *urlStrings; diff --git c/lib/WebRTC.framework/Headers/RTCIntervalRange.h w/lib/WebRTC.framework/Headers/RTCIntervalRange.h new file mode 100644 index 0000000..00508eb --- /dev/null +++ w/lib/WebRTC.framework/Headers/RTCIntervalRange.h @@ -0,0 +1,25 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface RTCIntervalRange : NSObject + +@property(nonatomic, readonly) NSInteger min; +@property(nonatomic, readonly) NSInteger max; + +- (instancetype)init; +- (instancetype)initWithMin:(NSInteger)min max:(NSInteger)max NS_DESIGNATED_INITIALIZER; + +@end + +NS_ASSUME_NONNULL_END diff --git c/lib/WebRTC.framework/Headers/RTCLegacyStatsReport.h w/lib/WebRTC.framework/Headers/RTCLegacyStatsReport.h index b3bd12c..85f2b8f 100644 --- c/lib/WebRTC.framework/Headers/RTCLegacyStatsReport.h +++ w/lib/WebRTC.framework/Headers/RTCLegacyStatsReport.h @@ -16,7 +16,7 @@ NS_ASSUME_NONNULL_BEGIN /** This does not currently conform to the spec. */ RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCLegacyStatsReport) : NSObject +@interface RTCLegacyStatsReport : NSObject /** Time since 1970-01-01T00:00:00Z in milliseconds. */ @property(nonatomic, readonly) CFTimeInterval timestamp; diff --git c/lib/WebRTC.framework/Headers/RTCMTLVideoView.h w/lib/WebRTC.framework/Headers/RTCMTLVideoView.h index 5678112..36cb144 100644 --- c/lib/WebRTC.framework/Headers/RTCMTLVideoView.h +++ w/lib/WebRTC.framework/Headers/RTCMTLVideoView.h @@ -27,9 +27,9 @@ NS_ASSUME_NONNULL_BEGIN NS_CLASS_AVAILABLE_IOS(9) RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCMTLVideoView) : UIView +@interface RTCMTLVideoView : UIView -@property(nonatomic, weak) id delegate; +@property(nonatomic, weak) id delegate; @property(nonatomic) UIViewContentMode videoContentMode; diff --git c/lib/WebRTC.framework/Headers/RTCMacros.h w/lib/WebRTC.framework/Headers/RTCMacros.h index e527ff6..7f7e64c 100644 --- c/lib/WebRTC.framework/Headers/RTCMacros.h +++ w/lib/WebRTC.framework/Headers/RTCMacros.h @@ -11,30 +11,6 @@ #ifndef SDK_OBJC_BASE_RTCMACROS_H_ #define SDK_OBJC_BASE_RTCMACROS_H_ -// Internal macros used to correctly concatenate symbols. -#define RTC_SYMBOL_CONCAT_HELPER(a, b) a##b -#define RTC_SYMBOL_CONCAT(a, b) RTC_SYMBOL_CONCAT_HELPER(a, b) - -// RTC_OBJC_TYPE_PREFIX -// -// Macro used to prepend a prefix to the API types that are exported with -// RTC_OBJC_EXPORT. -// -// Clients can patch the definition of this macro locally and build -// WebRTC.framework with their own prefix in case symbol clashing is a -// problem. -// -// This macro must only be defined here and not on via compiler flag to -// ensure it has a unique value. -#define RTC_OBJC_TYPE_PREFIX - -// RCT_OBJC_TYPE -// -// Macro used internally to declare API types. Declaring an API type without -// using this macro will not include the declared type in the set of types -// that will be affected by the configurable RTC_OBJC_TYPE_PREFIX. -#define RTC_OBJC_TYPE(type_name) RTC_SYMBOL_CONCAT(RTC_OBJC_TYPE_PREFIX, type_name) - #define RTC_OBJC_EXPORT __attribute__((visibility("default"))) #if defined(__cplusplus) diff --git c/lib/WebRTC.framework/Headers/RTCMediaConstraints.h w/lib/WebRTC.framework/Headers/RTCMediaConstraints.h index c5baf20..5c1a12e 100644 --- c/lib/WebRTC.framework/Headers/RTCMediaConstraints.h +++ w/lib/WebRTC.framework/Headers/RTCMediaConstraints.h @@ -31,7 +31,7 @@ RTC_EXTERN NSString *const kRTCMediaConstraintsValueTrue; RTC_EXTERN NSString *const kRTCMediaConstraintsValueFalse; RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCMediaConstraints) : NSObject +@interface RTCMediaConstraints : NSObject - (instancetype)init NS_UNAVAILABLE; diff --git c/lib/WebRTC.framework/Headers/RTCMediaSource.h w/lib/WebRTC.framework/Headers/RTCMediaSource.h index ba19c2a..838c783 100644 --- c/lib/WebRTC.framework/Headers/RTCMediaSource.h +++ w/lib/WebRTC.framework/Headers/RTCMediaSource.h @@ -22,7 +22,7 @@ typedef NS_ENUM(NSInteger, RTCSourceState) { NS_ASSUME_NONNULL_BEGIN RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCMediaSource) : NSObject +@interface RTCMediaSource : NSObject /** The current state of the RTCMediaSource. */ @property(nonatomic, readonly) RTCSourceState state; diff --git c/lib/WebRTC.framework/Headers/RTCMediaStream.h w/lib/WebRTC.framework/Headers/RTCMediaStream.h index 2d56f15..bb9bec6 100644 --- c/lib/WebRTC.framework/Headers/RTCMediaStream.h +++ w/lib/WebRTC.framework/Headers/RTCMediaStream.h @@ -14,18 +14,18 @@ NS_ASSUME_NONNULL_BEGIN -@class RTC_OBJC_TYPE(RTCAudioTrack); -@class RTC_OBJC_TYPE(RTCPeerConnectionFactory); -@class RTC_OBJC_TYPE(RTCVideoTrack); +@class RTCAudioTrack; +@class RTCPeerConnectionFactory; +@class RTCVideoTrack; RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCMediaStream) : NSObject +@interface RTCMediaStream : NSObject /** The audio tracks in this stream. */ -@property(nonatomic, strong, readonly) NSArray *audioTracks; +@property(nonatomic, strong, readonly) NSArray *audioTracks; /** The video tracks in this stream. */ -@property(nonatomic, strong, readonly) NSArray *videoTracks; +@property(nonatomic, strong, readonly) NSArray *videoTracks; /** An identifier for this media stream. */ @property(nonatomic, readonly) NSString *streamId; @@ -33,16 +33,16 @@ RTC_OBJC_EXPORT - (instancetype)init NS_UNAVAILABLE; /** Adds the given audio track to this media stream. */ -- (void)addAudioTrack:(RTC_OBJC_TYPE(RTCAudioTrack) *)audioTrack; +- (void)addAudioTrack:(RTCAudioTrack *)audioTrack; /** Adds the given video track to this media stream. */ -- (void)addVideoTrack:(RTC_OBJC_TYPE(RTCVideoTrack) *)videoTrack; +- (void)addVideoTrack:(RTCVideoTrack *)videoTrack; /** Removes the given audio track to this media stream. */ -- (void)removeAudioTrack:(RTC_OBJC_TYPE(RTCAudioTrack) *)audioTrack; +- (void)removeAudioTrack:(RTCAudioTrack *)audioTrack; /** Removes the given video track to this media stream. */ -- (void)removeVideoTrack:(RTC_OBJC_TYPE(RTCVideoTrack) *)videoTrack; +- (void)removeVideoTrack:(RTCVideoTrack *)videoTrack; @end diff --git c/lib/WebRTC.framework/Headers/RTCMediaStreamTrack.h w/lib/WebRTC.framework/Headers/RTCMediaStreamTrack.h index 2200122..d1ea0f2 100644 --- c/lib/WebRTC.framework/Headers/RTCMediaStreamTrack.h +++ w/lib/WebRTC.framework/Headers/RTCMediaStreamTrack.h @@ -26,7 +26,7 @@ RTC_EXTERN NSString *const kRTCMediaStreamTrackKindAudio; RTC_EXTERN NSString *const kRTCMediaStreamTrackKindVideo; RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCMediaStreamTrack) : NSObject +@interface RTCMediaStreamTrack : NSObject /** * The kind of track. For example, "audio" if this track represents an audio diff --git c/lib/WebRTC.framework/Headers/RTCMetrics.h w/lib/WebRTC.framework/Headers/RTCMetrics.h index fddbb27..6629fda 100644 --- c/lib/WebRTC.framework/Headers/RTCMetrics.h +++ w/lib/WebRTC.framework/Headers/RTCMetrics.h @@ -20,4 +20,4 @@ RTC_EXTERN void RTCEnableMetrics(void); /** Gets and clears native histograms. */ -RTC_EXTERN NSArray* RTCGetAndResetMetrics(void); +RTC_EXTERN NSArray* RTCGetAndResetMetrics(void); diff --git c/lib/WebRTC.framework/Headers/RTCMetricsSampleInfo.h w/lib/WebRTC.framework/Headers/RTCMetricsSampleInfo.h index 47a877b..cd38ab9 100644 --- c/lib/WebRTC.framework/Headers/RTCMetricsSampleInfo.h +++ w/lib/WebRTC.framework/Headers/RTCMetricsSampleInfo.h @@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCMetricsSampleInfo) : NSObject +@interface RTCMetricsSampleInfo : NSObject /** * Example of RTCMetricsSampleInfo: diff --git c/lib/WebRTC.framework/Headers/RTCMutableI420Buffer.h w/lib/WebRTC.framework/Headers/RTCMutableI420Buffer.h index cde7219..098fb9a 100644 --- c/lib/WebRTC.framework/Headers/RTCMutableI420Buffer.h +++ w/lib/WebRTC.framework/Headers/RTCMutableI420Buffer.h @@ -17,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN /** Extension of the I420 buffer with mutable data access */ RTC_OBJC_EXPORT -@protocol RTC_OBJC_TYPE -(RTCMutableI420Buffer) @end +@protocol RTCMutableI420Buffer +@end NS_ASSUME_NONNULL_END diff --git c/lib/WebRTC.framework/Headers/RTCMutableYUVPlanarBuffer.h w/lib/WebRTC.framework/Headers/RTCMutableYUVPlanarBuffer.h index bd14e3b..00dfcd9 100644 --- c/lib/WebRTC.framework/Headers/RTCMutableYUVPlanarBuffer.h +++ w/lib/WebRTC.framework/Headers/RTCMutableYUVPlanarBuffer.h @@ -16,10 +16,9 @@ NS_ASSUME_NONNULL_BEGIN /** Extension of the YUV planar data buffer with mutable data access */ RTC_OBJC_EXPORT -@protocol RTC_OBJC_TYPE -(RTCMutableYUVPlanarBuffer) +@protocol RTCMutableYUVPlanarBuffer - @property(nonatomic, readonly) uint8_t *mutableDataY; +@property(nonatomic, readonly) uint8_t *mutableDataY; @property(nonatomic, readonly) uint8_t *mutableDataU; @property(nonatomic, readonly) uint8_t *mutableDataV; diff --git c/lib/WebRTC.framework/Headers/RTCNativeI420Buffer.h w/lib/WebRTC.framework/Headers/RTCNativeI420Buffer.h index 3afe209..9a904f5 100644 --- c/lib/WebRTC.framework/Headers/RTCNativeI420Buffer.h +++ w/lib/WebRTC.framework/Headers/RTCNativeI420Buffer.h @@ -17,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN /** RTCI420Buffer implements the RTCI420Buffer protocol */ RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCI420Buffer) : NSObject +@interface RTCI420Buffer : NSObject @end NS_ASSUME_NONNULL_END diff --git c/lib/WebRTC.framework/Headers/RTCNativeMutableI420Buffer.h w/lib/WebRTC.framework/Headers/RTCNativeMutableI420Buffer.h index 053a10a..6cd5110 100644 --- c/lib/WebRTC.framework/Headers/RTCNativeMutableI420Buffer.h +++ w/lib/WebRTC.framework/Headers/RTCNativeMutableI420Buffer.h @@ -18,7 +18,7 @@ NS_ASSUME_NONNULL_BEGIN /** Mutable version of RTCI420Buffer */ RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCMutableI420Buffer) : RTC_OBJC_TYPE(RTCI420Buffer) +@interface RTCMutableI420Buffer : RTCI420Buffer @end NS_ASSUME_NONNULL_END diff --git c/lib/WebRTC.framework/Headers/RTCPeerConnection.h w/lib/WebRTC.framework/Headers/RTCPeerConnection.h index bb8d87b..c641fdd 100644 --- c/lib/WebRTC.framework/Headers/RTCPeerConnection.h +++ w/lib/WebRTC.framework/Headers/RTCPeerConnection.h @@ -12,21 +12,21 @@ #import "RTCMacros.h" -@class RTC_OBJC_TYPE(RTCConfiguration); -@class RTC_OBJC_TYPE(RTCDataChannel); -@class RTC_OBJC_TYPE(RTCDataChannelConfiguration); -@class RTC_OBJC_TYPE(RTCIceCandidate); -@class RTC_OBJC_TYPE(RTCMediaConstraints); -@class RTC_OBJC_TYPE(RTCMediaStream); -@class RTC_OBJC_TYPE(RTCMediaStreamTrack); -@class RTC_OBJC_TYPE(RTCPeerConnectionFactory); -@class RTC_OBJC_TYPE(RTCRtpReceiver); -@class RTC_OBJC_TYPE(RTCRtpSender); -@class RTC_OBJC_TYPE(RTCRtpTransceiver); -@class RTC_OBJC_TYPE(RTCRtpTransceiverInit); -@class RTC_OBJC_TYPE(RTCSessionDescription); -@class RTC_OBJC_TYPE(RTCStatisticsReport); -@class RTC_OBJC_TYPE(RTCLegacyStatsReport); +@class RTCConfiguration; +@class RTCDataChannel; +@class RTCDataChannelConfiguration; +@class RTCIceCandidate; +@class RTCMediaConstraints; +@class RTCMediaStream; +@class RTCMediaStreamTrack; +@class RTCPeerConnectionFactory; +@class RTCRtpReceiver; +@class RTCRtpSender; +@class RTCRtpTransceiver; +@class RTCRtpTransceiverInit; +@class RTCSessionDescription; +@class RTCStatisticsReport; +@class RTCLegacyStatsReport; typedef NS_ENUM(NSInteger, RTCRtpMediaType); @@ -81,123 +81,107 @@ typedef NS_ENUM(NSInteger, RTCStatsOutputLevel) { RTCStatsOutputLevelDebug, }; -@class RTC_OBJC_TYPE(RTCPeerConnection); +@class RTCPeerConnection; RTC_OBJC_EXPORT -@protocol RTC_OBJC_TYPE -(RTCPeerConnectionDelegate) +@protocol RTCPeerConnectionDelegate - /** Called when the SignalingState changed. */ - - (void)peerConnection - : (RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection didChangeSignalingState - : (RTCSignalingState)stateChanged; +/** Called when the SignalingState changed. */ +- (void)peerConnection:(RTCPeerConnection *)peerConnection + didChangeSignalingState:(RTCSignalingState)stateChanged; /** Called when media is received on a new stream from remote peer. */ -- (void)peerConnection:(RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection - didAddStream:(RTC_OBJC_TYPE(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:(RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection - didRemoveStream:(RTC_OBJC_TYPE(RTCMediaStream) *)stream; +- (void)peerConnection:(RTCPeerConnection *)peerConnection didRemoveStream:(RTCMediaStream *)stream; /** Called when negotiation is needed, for example ICE has restarted. */ -- (void)peerConnectionShouldNegotiate:(RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection; +- (void)peerConnectionShouldNegotiate:(RTCPeerConnection *)peerConnection; /** Called any time the IceConnectionState changes. */ -- (void)peerConnection:(RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection +- (void)peerConnection:(RTCPeerConnection *)peerConnection didChangeIceConnectionState:(RTCIceConnectionState)newState; /** Called any time the IceGatheringState changes. */ -- (void)peerConnection:(RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection +- (void)peerConnection:(RTCPeerConnection *)peerConnection didChangeIceGatheringState:(RTCIceGatheringState)newState; /** New ice candidate has been found. */ -- (void)peerConnection:(RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection - didGenerateIceCandidate:(RTC_OBJC_TYPE(RTCIceCandidate) *)candidate; +- (void)peerConnection:(RTCPeerConnection *)peerConnection + didGenerateIceCandidate:(RTCIceCandidate *)candidate; /** Called when a group of local Ice candidates have been removed. */ -- (void)peerConnection:(RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection - didRemoveIceCandidates:(NSArray *)candidates; +- (void)peerConnection:(RTCPeerConnection *)peerConnection + didRemoveIceCandidates:(NSArray *)candidates; /** New data channel has been opened. */ -- (void)peerConnection:(RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection - didOpenDataChannel:(RTC_OBJC_TYPE(RTCDataChannel) *)dataChannel; +- (void)peerConnection:(RTCPeerConnection *)peerConnection + didOpenDataChannel:(RTCDataChannel *)dataChannel; /** Called when signaling indicates a transceiver will be receiving media from * the remote endpoint. * This is only called with RTCSdpSemanticsUnifiedPlan specified. */ @optional -/** Called any time the IceConnectionState changes following standardized - * transition. */ -- (void)peerConnection:(RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection - didChangeStandardizedIceConnectionState:(RTCIceConnectionState)newState; - /** Called any time the PeerConnectionState changes. */ -- (void)peerConnection:(RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection +- (void)peerConnection:(RTCPeerConnection *)peerConnection didChangeConnectionState:(RTCPeerConnectionState)newState; -- (void)peerConnection:(RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection - didStartReceivingOnTransceiver:(RTC_OBJC_TYPE(RTCRtpTransceiver) *)transceiver; +- (void)peerConnection:(RTCPeerConnection *)peerConnection + didStartReceivingOnTransceiver:(RTCRtpTransceiver *)transceiver; /** Called when a receiver and its track are created. */ -- (void)peerConnection:(RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection - didAddReceiver:(RTC_OBJC_TYPE(RTCRtpReceiver) *)rtpReceiver - streams:(NSArray *)mediaStreams; +- (void)peerConnection:(RTCPeerConnection *)peerConnection + didAddReceiver:(RTCRtpReceiver *)rtpReceiver + streams:(NSArray *)mediaStreams; /** Called when the receiver and its track are removed. */ -- (void)peerConnection:(RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection - didRemoveReceiver:(RTC_OBJC_TYPE(RTCRtpReceiver) *)rtpReceiver; - -/** Called when the selected ICE candidate pair is changed. */ -- (void)peerConnection:(RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection - didChangeLocalCandidate:(RTC_OBJC_TYPE(RTCIceCandidate) *)local - remoteCandidate:(RTC_OBJC_TYPE(RTCIceCandidate) *)remote - lastReceivedMs:(int)lastDataReceivedMs - changeReason:(NSString *)reason; +- (void)peerConnection:(RTCPeerConnection *)peerConnection + didRemoveReceiver:(RTCRtpReceiver *)rtpReceiver; @end RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCPeerConnection) : NSObject +@interface RTCPeerConnection : NSObject /** The object that will be notifed about events such as state changes and * streams being added or removed. */ -@property(nonatomic, weak, nullable) id delegate; +@property(nonatomic, weak, nullable) id delegate; /** This property is not available with RTCSdpSemanticsUnifiedPlan. Please use * |senders| instead. */ -@property(nonatomic, readonly) NSArray *localStreams; -@property(nonatomic, readonly, nullable) RTC_OBJC_TYPE(RTCSessionDescription) * localDescription; -@property(nonatomic, readonly, nullable) RTC_OBJC_TYPE(RTCSessionDescription) * remoteDescription; +@property(nonatomic, readonly) NSArray *localStreams; +@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) RTCPeerConnectionState connectionState; @property(nonatomic, readonly) RTCIceGatheringState iceGatheringState; -@property(nonatomic, readonly, copy) RTC_OBJC_TYPE(RTCConfiguration) * configuration; +@property(nonatomic, readonly, copy) RTCConfiguration *configuration; /** Gets all RTCRtpSenders associated with this peer connection. * Note: reading this property returns different instances of RTCRtpSender. * Use isEqual: instead of == to compare RTCRtpSender instances. */ -@property(nonatomic, readonly) NSArray *senders; +@property(nonatomic, readonly) NSArray *senders; /** Gets all RTCRtpReceivers associated with this peer connection. * Note: reading this property returns different instances of RTCRtpReceiver. * Use isEqual: instead of == to compare RTCRtpReceiver instances. */ -@property(nonatomic, readonly) NSArray *receivers; +@property(nonatomic, readonly) NSArray *receivers; /** Gets all RTCRtpTransceivers associated with this peer connection. * Note: reading this property returns different instances of - * RTCRtpTransceiver. Use isEqual: instead of == to compare - * RTCRtpTransceiver instances. This is only available with - * RTCSdpSemanticsUnifiedPlan specified. + * RTCRtpTransceiver. Use isEqual: instead of == to compare RTCRtpTransceiver + * instances. + * This is only available with RTCSdpSemanticsUnifiedPlan specified. */ -@property(nonatomic, readonly) NSArray *transceivers; +@property(nonatomic, readonly) NSArray *transceivers; - (instancetype)init NS_UNAVAILABLE; @@ -207,39 +191,38 @@ RTC_OBJC_EXPORT * new ICE credentials. Note that the BUNDLE and RTCP-multiplexing policies * cannot be changed with this method. */ -- (BOOL)setConfiguration:(RTC_OBJC_TYPE(RTCConfiguration) *)configuration; +- (BOOL)setConfiguration:(RTCConfiguration *)configuration; /** Terminate all media and close the transport. */ - (void)close; /** Provide a remote candidate to the ICE Agent. */ -- (void)addIceCandidate:(RTC_OBJC_TYPE(RTCIceCandidate) *)candidate; +- (void)addIceCandidate:(RTCIceCandidate *)candidate; /** Remove a group of remote candidates from the ICE Agent. */ -- (void)removeIceCandidates:(NSArray *)candidates; +- (void)removeIceCandidates:(NSArray *)candidates; /** Add a new media stream to be sent on this peer connection. * This method is not supported with RTCSdpSemanticsUnifiedPlan. Please use * addTrack instead. */ -- (void)addStream:(RTC_OBJC_TYPE(RTCMediaStream) *)stream; +- (void)addStream:(RTCMediaStream *)stream; /** Remove the given media stream from this peer connection. * This method is not supported with RTCSdpSemanticsUnifiedPlan. Please use * removeTrack instead. */ -- (void)removeStream:(RTC_OBJC_TYPE(RTCMediaStream) *)stream; +- (void)removeStream:(RTCMediaStream *)stream; /** Add a new media stream track to be sent on this peer connection, and return - * the newly created RTCRtpSender. The RTCRtpSender will be - * associated with the streams specified in the |streamIds| list. + * the newly created RTCRtpSender. The RTCRtpSender will be associated with + * the streams specified in the |streamIds| list. * * Errors: If an error occurs, returns nil. An error can occur if: * - A sender already exists for the track. * - The peer connection is closed. */ -- (RTC_OBJC_TYPE(RTCRtpSender) *)addTrack:(RTC_OBJC_TYPE(RTCMediaStreamTrack) *)track - streamIds:(NSArray *)streamIds; +- (RTCRtpSender *)addTrack:(RTCMediaStreamTrack *)track streamIds:(NSArray *)streamIds; /** With PlanB semantics, removes an RTCRtpSender from this peer connection. * @@ -248,7 +231,7 @@ RTC_OBJC_EXPORT * * Returns YES on success. */ -- (BOOL)removeTrack:(RTC_OBJC_TYPE(RTCRtpSender) *)sender; +- (BOOL)removeTrack:(RTCRtpSender *)sender; /** addTransceiver creates a new RTCRtpTransceiver and adds it to the set of * transceivers. Adding a transceiver will cause future calls to CreateOffer @@ -271,37 +254,33 @@ RTC_OBJC_EXPORT * of the transceiver (and sender/receiver) will be derived from the kind of * the track. */ -- (RTC_OBJC_TYPE(RTCRtpTransceiver) *)addTransceiverWithTrack: - (RTC_OBJC_TYPE(RTCMediaStreamTrack) *)track; -- (RTC_OBJC_TYPE(RTCRtpTransceiver) *) - addTransceiverWithTrack:(RTC_OBJC_TYPE(RTCMediaStreamTrack) *)track - init:(RTC_OBJC_TYPE(RTCRtpTransceiverInit) *)init; +- (RTCRtpTransceiver *)addTransceiverWithTrack:(RTCMediaStreamTrack *)track; +- (RTCRtpTransceiver *)addTransceiverWithTrack:(RTCMediaStreamTrack *)track + init:(RTCRtpTransceiverInit *)init; /** Adds a transceiver with the given kind. Can either be RTCRtpMediaTypeAudio * or RTCRtpMediaTypeVideo. */ -- (RTC_OBJC_TYPE(RTCRtpTransceiver) *)addTransceiverOfType:(RTCRtpMediaType)mediaType; -- (RTC_OBJC_TYPE(RTCRtpTransceiver) *)addTransceiverOfType:(RTCRtpMediaType)mediaType - init:(RTC_OBJC_TYPE(RTCRtpTransceiverInit) *) - init; +- (RTCRtpTransceiver *)addTransceiverOfType:(RTCRtpMediaType)mediaType; +- (RTCRtpTransceiver *)addTransceiverOfType:(RTCRtpMediaType)mediaType + init:(RTCRtpTransceiverInit *)init; /** Generate an SDP offer. */ -- (void)offerForConstraints:(RTC_OBJC_TYPE(RTCMediaConstraints) *)constraints - completionHandler:(nullable void (^)(RTC_OBJC_TYPE(RTCSessionDescription) * _Nullable sdp, +- (void)offerForConstraints:(RTCMediaConstraints *)constraints + completionHandler:(nullable void (^)(RTCSessionDescription *_Nullable sdp, NSError *_Nullable error))completionHandler; /** Generate an SDP answer. */ -- (void)answerForConstraints:(RTC_OBJC_TYPE(RTCMediaConstraints) *)constraints - completionHandler: - (nullable void (^)(RTC_OBJC_TYPE(RTCSessionDescription) * _Nullable sdp, - NSError *_Nullable error))completionHandler; +- (void)answerForConstraints:(RTCMediaConstraints *)constraints + completionHandler:(nullable void (^)(RTCSessionDescription *_Nullable sdp, + NSError *_Nullable error))completionHandler; /** Apply the supplied RTCSessionDescription as the local description. */ -- (void)setLocalDescription:(RTC_OBJC_TYPE(RTCSessionDescription) *)sdp +- (void)setLocalDescription:(RTCSessionDescription *)sdp completionHandler:(nullable void (^)(NSError *_Nullable error))completionHandler; /** Apply the supplied RTCSessionDescription as the remote description. */ -- (void)setRemoteDescription:(RTC_OBJC_TYPE(RTCSessionDescription) *)sdp +- (void)setRemoteDescription:(RTCSessionDescription *)sdp completionHandler:(nullable void (^)(NSError *_Nullable error))completionHandler; /** Limits the bandwidth allocated for all RTP streams sent by this @@ -319,40 +298,35 @@ RTC_OBJC_EXPORT @end -@interface RTC_OBJC_TYPE (RTCPeerConnection) -(Media) +@interface RTCPeerConnection (Media) - /** Create an RTCRtpSender with the specified kind and media stream ID. - * See RTCMediaStreamTrack.h for available kinds. - * This method is not supported with RTCSdpSemanticsUnifiedPlan. Please use - * addTransceiver instead. - */ - - (RTC_OBJC_TYPE(RTCRtpSender) *)senderWithKind : (NSString *)kind streamId - : (NSString *)streamId; +/** Create an RTCRtpSender with the specified kind and media stream ID. + * See RTCMediaStreamTrack.h for available kinds. + * This method is not supported with RTCSdpSemanticsUnifiedPlan. Please use + * addTransceiver instead. + */ +- (RTCRtpSender *)senderWithKind:(NSString *)kind streamId:(NSString *)streamId; @end -@interface RTC_OBJC_TYPE (RTCPeerConnection) -(DataChannel) +@interface RTCPeerConnection (DataChannel) - /** Create a new data channel with the given label and configuration. */ - - (nullable RTC_OBJC_TYPE(RTCDataChannel) *)dataChannelForLabel - : (NSString *)label configuration : (RTC_OBJC_TYPE(RTCDataChannelConfiguration) *)configuration; +/** Create a new data channel with the given label and configuration. */ +- (nullable RTCDataChannel *)dataChannelForLabel:(NSString *)label + configuration:(RTCDataChannelConfiguration *)configuration; @end -typedef void (^RTCStatisticsCompletionHandler)(RTC_OBJC_TYPE(RTCStatisticsReport) *); +typedef void (^RTCStatisticsCompletionHandler)(RTCStatisticsReport *); -@interface RTC_OBJC_TYPE (RTCPeerConnection) -(Stats) +@interface RTCPeerConnection (Stats) - /** Gather stats for the given RTCMediaStreamTrack. If |mediaStreamTrack| is nil - * statistics are gathered for all tracks. - */ - - (void)statsForTrack - : (nullable RTC_OBJC_TYPE(RTCMediaStreamTrack) *)mediaStreamTrack statsOutputLevel - : (RTCStatsOutputLevel)statsOutputLevel completionHandler - : (nullable void (^)(NSArray *stats))completionHandler; +/** Gather stats for the given RTCMediaStreamTrack. If |mediaStreamTrack| is nil + * statistics are gathered for all tracks. + */ +- (void)statsForTrack:(nullable RTCMediaStreamTrack *)mediaStreamTrack + statsOutputLevel:(RTCStatsOutputLevel)statsOutputLevel + completionHandler:(nullable void (^)(NSArray *stats))completionHandler; /** Gather statistic through the v2 statistics API. */ - (void)statisticsWithCompletionHandler:(RTCStatisticsCompletionHandler)completionHandler; @@ -360,13 +334,13 @@ typedef void (^RTCStatisticsCompletionHandler)(RTC_OBJC_TYPE(RTCStatisticsReport /** Spec-compliant getStats() performing the stats selection algorithm with the * sender. */ -- (void)statisticsForSender:(RTC_OBJC_TYPE(RTCRtpSender) *)sender +- (void)statisticsForSender:(RTCRtpSender *)sender completionHandler:(RTCStatisticsCompletionHandler)completionHandler; /** Spec-compliant getStats() performing the stats selection algorithm with the * receiver. */ -- (void)statisticsForReceiver:(RTC_OBJC_TYPE(RTCRtpReceiver) *)receiver +- (void)statisticsForReceiver:(RTCRtpReceiver *)receiver completionHandler:(RTCStatisticsCompletionHandler)completionHandler; @end diff --git c/lib/WebRTC.framework/Headers/RTCPeerConnectionFactory.h w/lib/WebRTC.framework/Headers/RTCPeerConnectionFactory.h index 3dcd3b6..c808218 100644 --- c/lib/WebRTC.framework/Headers/RTCPeerConnectionFactory.h +++ w/lib/WebRTC.framework/Headers/RTCPeerConnectionFactory.h @@ -14,69 +14,61 @@ NS_ASSUME_NONNULL_BEGIN -@class RTC_OBJC_TYPE(RTCAudioSource); -@class RTC_OBJC_TYPE(RTCAudioTrack); -@class RTC_OBJC_TYPE(RTCConfiguration); -@class RTC_OBJC_TYPE(RTCMediaConstraints); -@class RTC_OBJC_TYPE(RTCMediaStream); -@class RTC_OBJC_TYPE(RTCPeerConnection); -@class RTC_OBJC_TYPE(RTCVideoSource); -@class RTC_OBJC_TYPE(RTCVideoTrack); -@class RTC_OBJC_TYPE(RTCPeerConnectionFactoryOptions); -@protocol RTC_OBJC_TYPE -(RTCPeerConnectionDelegate); -@protocol RTC_OBJC_TYPE -(RTCVideoDecoderFactory); -@protocol RTC_OBJC_TYPE -(RTCVideoEncoderFactory); +@class RTCAudioSource; +@class RTCAudioTrack; +@class RTCConfiguration; +@class RTCMediaConstraints; +@class RTCMediaStream; +@class RTCPeerConnection; +@class RTCVideoSource; +@class RTCVideoTrack; +@class RTCPeerConnectionFactoryOptions; +@protocol RTCPeerConnectionDelegate; +@protocol RTCVideoDecoderFactory; +@protocol RTCVideoEncoderFactory; RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCPeerConnectionFactory) : NSObject +@interface RTCPeerConnectionFactory : NSObject /* Initialize object with default H264 video encoder/decoder factories */ - (instancetype)init; /* Initialize object with injectable video encoder/decoder factories */ -- (instancetype) - initWithEncoderFactory:(nullable id)encoderFactory - decoderFactory:(nullable id)decoderFactory; +- (instancetype)initWithEncoderFactory:(nullable id)encoderFactory + decoderFactory:(nullable id)decoderFactory; /** Initialize an RTCAudioSource with constraints. */ -- (RTC_OBJC_TYPE(RTCAudioSource) *)audioSourceWithConstraints: - (nullable RTC_OBJC_TYPE(RTCMediaConstraints) *)constraints; +- (RTCAudioSource *)audioSourceWithConstraints:(nullable RTCMediaConstraints *)constraints; -/** Initialize an RTCAudioTrack with an id. Convenience ctor to use an audio source - * with no constraints. +/** Initialize an RTCAudioTrack with an id. Convenience ctor to use an audio source with no + * constraints. */ -- (RTC_OBJC_TYPE(RTCAudioTrack) *)audioTrackWithTrackId:(NSString *)trackId; +- (RTCAudioTrack *)audioTrackWithTrackId:(NSString *)trackId; /** Initialize an RTCAudioTrack with a source and an id. */ -- (RTC_OBJC_TYPE(RTCAudioTrack) *)audioTrackWithSource:(RTC_OBJC_TYPE(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. +/** Initialize a generic RTCVideoSource. The RTCVideoSource should be passed to a RTCVideoCapturer + * implementation, e.g. RTCCameraVideoCapturer, in order to produce frames. */ -- (RTC_OBJC_TYPE(RTCVideoSource) *)videoSource; +- (RTCVideoSource *)videoSource; /** Initialize an RTCVideoTrack with a source and an id. */ -- (RTC_OBJC_TYPE(RTCVideoTrack) *)videoTrackWithSource:(RTC_OBJC_TYPE(RTCVideoSource) *)source - trackId:(NSString *)trackId; +- (RTCVideoTrack *)videoTrackWithSource:(RTCVideoSource *)source trackId:(NSString *)trackId; /** Initialize an RTCMediaStream with an id. */ -- (RTC_OBJC_TYPE(RTCMediaStream) *)mediaStreamWithStreamId:(NSString *)streamId; +- (RTCMediaStream *)mediaStreamWithStreamId:(NSString *)streamId; /** Initialize an RTCPeerConnection with a configuration, constraints, and * delegate. */ -- (RTC_OBJC_TYPE(RTCPeerConnection) *) - peerConnectionWithConfiguration:(RTC_OBJC_TYPE(RTCConfiguration) *)configuration - constraints:(RTC_OBJC_TYPE(RTCMediaConstraints) *)constraints - delegate:(nullable id)delegate; +- (RTCPeerConnection *)peerConnectionWithConfiguration:(RTCConfiguration *)configuration + constraints:(RTCMediaConstraints *)constraints + delegate: + (nullable id)delegate; /** Set the options to be used for subsequently created RTCPeerConnections */ -- (void)setOptions:(nonnull RTC_OBJC_TYPE(RTCPeerConnectionFactoryOptions) *)options; +- (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; diff --git c/lib/WebRTC.framework/Headers/RTCPeerConnectionFactoryOptions.h w/lib/WebRTC.framework/Headers/RTCPeerConnectionFactoryOptions.h index bfc54a5..4bec869 100644 --- c/lib/WebRTC.framework/Headers/RTCPeerConnectionFactoryOptions.h +++ w/lib/WebRTC.framework/Headers/RTCPeerConnectionFactoryOptions.h @@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCPeerConnectionFactoryOptions) : NSObject +@interface RTCPeerConnectionFactoryOptions : NSObject @property(nonatomic, assign) BOOL disableEncryption; diff --git c/lib/WebRTC.framework/Headers/RTCRtcpParameters.h w/lib/WebRTC.framework/Headers/RTCRtcpParameters.h index 1bbaedc..5c26580 100644 --- c/lib/WebRTC.framework/Headers/RTCRtcpParameters.h +++ w/lib/WebRTC.framework/Headers/RTCRtcpParameters.h @@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCRtcpParameters) : NSObject +@interface RTCRtcpParameters : NSObject /** The Canonical Name used by RTCP. */ @property(nonatomic, readonly, copy) NSString *cname; diff --git c/lib/WebRTC.framework/Headers/RTCRtpCodecParameters.h w/lib/WebRTC.framework/Headers/RTCRtpCodecParameters.h index a68d9eb..5d3cac5 100644 --- c/lib/WebRTC.framework/Headers/RTCRtpCodecParameters.h +++ w/lib/WebRTC.framework/Headers/RTCRtpCodecParameters.h @@ -31,9 +31,9 @@ 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-RTC_OBJC_TYPE(RTCRtpCodecParameters) */ +/** Defined in http://w3c.github.io/webrtc-pc/#idl-def-RTCRtpCodecParameters */ RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCRtpCodecParameters) : NSObject +@interface RTCRtpCodecParameters : NSObject /** The RTP payload type. */ @property(nonatomic, assign) int payloadType; diff --git c/lib/WebRTC.framework/Headers/RTCRtpEncodingParameters.h w/lib/WebRTC.framework/Headers/RTCRtpEncodingParameters.h index facd7e5..dce2512 100644 --- c/lib/WebRTC.framework/Headers/RTCRtpEncodingParameters.h +++ w/lib/WebRTC.framework/Headers/RTCRtpEncodingParameters.h @@ -14,16 +14,8 @@ NS_ASSUME_NONNULL_BEGIN -/** Corresponds to webrtc::Priority. */ -typedef NS_ENUM(NSInteger, RTCPriority) { - RTCPriorityVeryLow, - RTCPriorityLow, - RTCPriorityMedium, - RTCPriorityHigh -}; - RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCRtpEncodingParameters) : NSObject +@interface RTCRtpEncodingParameters : NSObject /** The idenfifier for the encoding layer. This is used in simulcast. */ @property(nonatomic, copy, nullable) NSString *rid; @@ -59,12 +51,6 @@ RTC_OBJC_EXPORT /** The SSRC being used by this encoding. */ @property(nonatomic, readonly, nullable) NSNumber *ssrc; -/** The relative bitrate priority. */ -@property(nonatomic, assign) double bitratePriority; - -/** The relative DiffServ Code Point priority. */ -@property(nonatomic, assign) RTCPriority networkPriority; - - (instancetype)init NS_DESIGNATED_INITIALIZER; @end diff --git c/lib/WebRTC.framework/Headers/RTCRtpFragmentationHeader.h w/lib/WebRTC.framework/Headers/RTCRtpFragmentationHeader.h index 001b4e9..2e26b08 100644 --- c/lib/WebRTC.framework/Headers/RTCRtpFragmentationHeader.h +++ w/lib/WebRTC.framework/Headers/RTCRtpFragmentationHeader.h @@ -16,7 +16,7 @@ NS_ASSUME_NONNULL_BEGIN /** Information for header. Corresponds to webrtc::RTPFragmentationHeader. */ RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCRtpFragmentationHeader) : NSObject +@interface RTCRtpFragmentationHeader : NSObject @property(nonatomic, strong) NSArray *fragmentationOffset; @property(nonatomic, strong) NSArray *fragmentationLength; diff --git c/lib/WebRTC.framework/Headers/RTCRtpHeaderExtension.h w/lib/WebRTC.framework/Headers/RTCRtpHeaderExtension.h index 15be5af..3211449 100644 --- c/lib/WebRTC.framework/Headers/RTCRtpHeaderExtension.h +++ w/lib/WebRTC.framework/Headers/RTCRtpHeaderExtension.h @@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCRtpHeaderExtension) : NSObject +@interface RTCRtpHeaderExtension : NSObject /** The URI of the RTP header extension, as defined in RFC5285. */ @property(nonatomic, readonly, copy) NSString *uri; diff --git c/lib/WebRTC.framework/Headers/RTCRtpParameters.h w/lib/WebRTC.framework/Headers/RTCRtpParameters.h index fff6a85..c1f2d5c 100644 --- c/lib/WebRTC.framework/Headers/RTCRtpParameters.h +++ w/lib/WebRTC.framework/Headers/RTCRtpParameters.h @@ -18,38 +18,23 @@ NS_ASSUME_NONNULL_BEGIN -/** Corresponds to webrtc::DegradationPreference. */ -typedef NS_ENUM(NSInteger, RTCDegradationPreference) { - RTCDegradationPreferenceDisabled, - RTCDegradationPreferenceMaintainFramerate, - RTCDegradationPreferenceMaintainResolution, - RTCDegradationPreferenceBalanced -}; - RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCRtpParameters) : NSObject +@interface RTCRtpParameters : NSObject /** A unique identifier for the last set of parameters applied. */ @property(nonatomic, copy) NSString *transactionId; /** Parameters used for RTCP. */ -@property(nonatomic, readonly, copy) RTC_OBJC_TYPE(RTCRtcpParameters) * rtcp; +@property(nonatomic, readonly, copy) RTCRtcpParameters *rtcp; /** An array containing parameters for RTP header extensions. */ -@property(nonatomic, readonly, copy) - NSArray *headerExtensions; +@property(nonatomic, readonly, copy) NSArray *headerExtensions; /** The currently active encodings in the order of preference. */ -@property(nonatomic, copy) NSArray *encodings; +@property(nonatomic, copy) NSArray *encodings; /** The negotiated set of send codecs in order of preference. */ -@property(nonatomic, copy) NSArray *codecs; - -/** - * Degradation preference in case of CPU adaptation or constrained bandwidth. - * If nil, implementation default degradation preference will be used. - */ -@property(nonatomic, copy, nullable) NSNumber *degradationPreference; +@property(nonatomic, copy) NSArray *codecs; - (instancetype)init NS_DESIGNATED_INITIALIZER; diff --git c/lib/WebRTC.framework/Headers/RTCRtpReceiver.h w/lib/WebRTC.framework/Headers/RTCRtpReceiver.h index 7ab2cfa..7a7dace 100644 --- c/lib/WebRTC.framework/Headers/RTCRtpReceiver.h +++ w/lib/WebRTC.framework/Headers/RTCRtpReceiver.h @@ -23,36 +23,33 @@ typedef NS_ENUM(NSInteger, RTCRtpMediaType) { RTCRtpMediaTypeData, }; -@class RTC_OBJC_TYPE(RTCRtpReceiver); +@class RTCRtpReceiver; RTC_OBJC_EXPORT -@protocol RTC_OBJC_TYPE -(RTCRtpReceiverDelegate) - - /** Called when the first RTP packet is received. - * - * Note: Currently if there are multiple RtpReceivers of the same media type, - * they will all call OnFirstPacketReceived at once. - * - * For example, if we create three audio receivers, A/B/C, they will listen to - * the same signal from the underneath network layer. Whenever the first audio packet - * is received, the underneath signal will be fired. All the receivers A/B/C will be - * notified and the callback of the receiver's delegate will be called. - * - * The process is the same for video receivers. - */ - - (void)rtpReceiver - : (RTC_OBJC_TYPE(RTCRtpReceiver) *)rtpReceiver didReceiveFirstPacketForMediaType - : (RTCRtpMediaType)mediaType; +@protocol RTCRtpReceiverDelegate + +/** Called when the first RTP packet is received. + * + * Note: Currently if there are multiple RtpReceivers of the same media type, + * they will all call OnFirstPacketReceived at once. + * + * For example, if we create three audio receivers, A/B/C, they will listen to + * the same signal from the underneath network layer. Whenever the first audio packet + * is received, the underneath signal will be fired. All the receivers A/B/C will be + * notified and the callback of the receiver's delegate will be called. + * + * The process is the same for video receivers. + */ +- (void)rtpReceiver:(RTCRtpReceiver *)rtpReceiver + didReceiveFirstPacketForMediaType:(RTCRtpMediaType)mediaType; @end RTC_OBJC_EXPORT -@protocol RTC_OBJC_TYPE -(RTCRtpReceiver) +@protocol RTCRtpReceiver - /** A unique identifier for this receiver. */ - @property(nonatomic, readonly) NSString *receiverId; +/** A unique identifier for this receiver. */ +@property(nonatomic, readonly) NSString *receiverId; /** The currently active RTCRtpParameters, as defined in * https://www.w3.org/TR/webrtc/#idl-def-RTCRtpParameters. @@ -61,22 +58,22 @@ RTC_OBJC_EXPORT * but this API also applies them to receivers, similar to ORTC: * http://ortc.org/wp-content/uploads/2016/03/ortc.html#rtcrtpparameters*. */ -@property(nonatomic, readonly) RTC_OBJC_TYPE(RTCRtpParameters) * parameters; +@property(nonatomic, readonly) RTCRtpParameters *parameters; /** The RTCMediaStreamTrack associated with the receiver. * Note: reading this property returns a new instance of * RTCMediaStreamTrack. Use isEqual: instead of == to compare * RTCMediaStreamTrack instances. */ -@property(nonatomic, readonly, nullable) RTC_OBJC_TYPE(RTCMediaStreamTrack) * track; +@property(nonatomic, readonly, nullable) RTCMediaStreamTrack *track; /** The delegate for this RtpReceiver. */ -@property(nonatomic, weak) id delegate; +@property(nonatomic, weak) id delegate; @end RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCRtpReceiver) : NSObject +@interface RTCRtpReceiver : NSObject - (instancetype)init NS_UNAVAILABLE; diff --git c/lib/WebRTC.framework/Headers/RTCRtpSender.h w/lib/WebRTC.framework/Headers/RTCRtpSender.h index 41bb083..49f61b8 100644 --- c/lib/WebRTC.framework/Headers/RTCRtpSender.h +++ w/lib/WebRTC.framework/Headers/RTCRtpSender.h @@ -18,34 +18,30 @@ NS_ASSUME_NONNULL_BEGIN RTC_OBJC_EXPORT -@protocol RTC_OBJC_TYPE -(RTCRtpSender) +@protocol RTCRtpSender - /** A unique identifier for this sender. */ - @property(nonatomic, readonly) NSString *senderId; +/** A unique identifier for this sender. */ +@property(nonatomic, readonly) NSString *senderId; /** The currently active RTCRtpParameters, as defined in * https://www.w3.org/TR/webrtc/#idl-def-RTCRtpParameters. */ -@property(nonatomic, copy) RTC_OBJC_TYPE(RTCRtpParameters) * parameters; +@property(nonatomic, copy) RTCRtpParameters *parameters; /** The RTCMediaStreamTrack associated with the sender. * Note: reading this property returns a new instance of * RTCMediaStreamTrack. Use isEqual: instead of == to compare * RTCMediaStreamTrack instances. */ -@property(nonatomic, copy, nullable) RTC_OBJC_TYPE(RTCMediaStreamTrack) * track; - -/** IDs of streams associated with the RTP sender */ -@property(nonatomic, copy) NSArray *streamIds; +@property(nonatomic, copy, nullable) RTCMediaStreamTrack *track; /** The RTCDtmfSender accociated with the RTP sender. */ -@property(nonatomic, readonly, nullable) id dtmfSender; +@property(nonatomic, readonly, nullable) id dtmfSender; @end RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCRtpSender) : NSObject +@interface RTCRtpSender : NSObject - (instancetype)init NS_UNAVAILABLE; diff --git c/lib/WebRTC.framework/Headers/RTCRtpTransceiver.h w/lib/WebRTC.framework/Headers/RTCRtpTransceiver.h index f8996cc..8ef3fc1 100644 --- c/lib/WebRTC.framework/Headers/RTCRtpTransceiver.h +++ w/lib/WebRTC.framework/Headers/RTCRtpTransceiver.h @@ -22,7 +22,6 @@ typedef NS_ENUM(NSInteger, RTCRtpTransceiverDirection) { RTCRtpTransceiverDirectionSendOnly, RTCRtpTransceiverDirectionRecvOnly, RTCRtpTransceiverDirectionInactive, - RTCRtpTransceiverDirectionStopped }; /** Structure for initializing an RTCRtpTransceiver in a call to @@ -30,7 +29,7 @@ typedef NS_ENUM(NSInteger, RTCRtpTransceiverDirection) { * https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiverinit */ RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCRtpTransceiverInit) : NSObject +@interface RTCRtpTransceiverInit : NSObject /** Direction of the RTCRtpTransceiver. See RTCRtpTransceiver.direction. */ @property(nonatomic) RTCRtpTransceiverDirection direction; @@ -39,14 +38,14 @@ RTC_OBJC_EXPORT @property(nonatomic) NSArray *streamIds; /** TODO(bugs.webrtc.org/7600): Not implemented. */ -@property(nonatomic) NSArray *sendEncodings; +@property(nonatomic) NSArray *sendEncodings; @end -@class RTC_OBJC_TYPE(RTCRtpTransceiver); +@class RTCRtpTransceiver; -/** The RTCRtpTransceiver maps to the RTCRtpTransceiver defined by the - * WebRTC specification. A transceiver represents a combination of an RTCRtpSender +/** The RTCRtpTransceiver maps to the RTCRtpTransceiver defined by the WebRTC + * specification. A transceiver represents a combination of an RTCRtpSender * and an RTCRtpReceiver that share a common mid. As defined in JSEP, an * RTCRtpTransceiver is said to be associated with a media description if its * mid property is non-nil; otherwise, it is said to be disassociated. @@ -59,13 +58,12 @@ RTC_OBJC_EXPORT * https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver */ RTC_OBJC_EXPORT -@protocol RTC_OBJC_TYPE -(RTCRtpTransceiver) +@protocol RTCRtpTransceiver - /** Media type of the transceiver. The sender and receiver will also have this - * type. - */ - @property(nonatomic, readonly) RTCRtpMediaType mediaType; +/** Media type of the transceiver. The sender and receiver will also have this + * type. + */ +@property(nonatomic, readonly) RTCRtpMediaType mediaType; /** The mid attribute is the mid negotiated and present in the local and * remote descriptions. Before negotiation is complete, the mid value may be @@ -79,14 +77,14 @@ RTC_OBJC_EXPORT * present, regardless of the direction of media. * https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-sender */ -@property(nonatomic, readonly) RTC_OBJC_TYPE(RTCRtpSender) * sender; +@property(nonatomic, readonly) RTCRtpSender *sender; /** The receiver attribute exposes the RTCRtpReceiver corresponding to the RTP * media that may be received with the transceiver's mid. The receiver is * always present, regardless of the direction of media. * https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-receiver */ -@property(nonatomic, readonly) RTC_OBJC_TYPE(RTCRtpReceiver) * receiver; +@property(nonatomic, readonly) RTCRtpReceiver *receiver; /** The isStopped attribute indicates that the sender of this transceiver will * no longer send, and that the receiver will no longer receive. It is true if @@ -122,7 +120,7 @@ RTC_OBJC_EXPORT @end RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCRtpTransceiver) : NSObject +@interface RTCRtpTransceiver : NSObject - (instancetype)init NS_UNAVAILABLE; diff --git c/lib/WebRTC.framework/Headers/RTCSessionDescription.h w/lib/WebRTC.framework/Headers/RTCSessionDescription.h index 6bd118d..b9bcab1 100644 --- c/lib/WebRTC.framework/Headers/RTCSessionDescription.h +++ w/lib/WebRTC.framework/Headers/RTCSessionDescription.h @@ -25,7 +25,7 @@ typedef NS_ENUM(NSInteger, RTCSdpType) { NS_ASSUME_NONNULL_BEGIN RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCSessionDescription) : NSObject +@interface RTCSessionDescription : NSObject /** The type of session description. */ @property(nonatomic, readonly) RTCSdpType type; diff --git c/lib/WebRTC.framework/Headers/RTCStatisticsReport.h w/lib/WebRTC.framework/Headers/RTCStatisticsReport.h deleted file mode 100644 index 38d93e8..0000000 --- c/lib/WebRTC.framework/Headers/RTCStatisticsReport.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2019 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#import - -#import "RTCMacros.h" - -@class RTC_OBJC_TYPE(RTCStatistics); - -NS_ASSUME_NONNULL_BEGIN - -/** A statistics report. Encapsulates a number of RTCStatistics objects. */ -RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCStatisticsReport) : NSObject - -/** The timestamp of the report in microseconds since 1970-01-01T00:00:00Z. */ -@property(nonatomic, readonly) CFTimeInterval timestamp_us; - -/** RTCStatistics objects by id. */ -@property(nonatomic, readonly) NSDictionary *statistics; - -- (instancetype)init NS_UNAVAILABLE; - -@end - -/** A part of a report (a subreport) covering a certain area. */ -RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCStatistics) : NSObject - -/** The id of this subreport, e.g. "RTCMediaStreamTrack_receiver_2". */ -@property(nonatomic, readonly) NSString *id; - -/** The timestamp of the subreport in microseconds since 1970-01-01T00:00:00Z. */ -@property(nonatomic, readonly) CFTimeInterval timestamp_us; - -/** The type of the subreport, e.g. "track", "codec". */ -@property(nonatomic, readonly) NSString *type; - -/** The keys and values of the subreport, e.g. "totalFramesDuration = 5.551". - The values are either NSNumbers or NSStrings, or NSArrays encapsulating NSNumbers - or NSStrings. */ -@property(nonatomic, readonly) NSDictionary *values; - -- (instancetype)init NS_UNAVAILABLE; - -@end - -NS_ASSUME_NONNULL_END diff --git c/lib/WebRTC.framework/Headers/RTCVideoCapturer.h w/lib/WebRTC.framework/Headers/RTCVideoCapturer.h index a1ffdcf..5212627 100644 --- c/lib/WebRTC.framework/Headers/RTCVideoCapturer.h +++ w/lib/WebRTC.framework/Headers/RTCVideoCapturer.h @@ -14,21 +14,19 @@ NS_ASSUME_NONNULL_BEGIN -@class RTC_OBJC_TYPE(RTCVideoCapturer); +@class RTCVideoCapturer; RTC_OBJC_EXPORT -@protocol RTC_OBJC_TYPE -(RTCVideoCapturerDelegate) - - (void)capturer : (RTC_OBJC_TYPE(RTCVideoCapturer) *)capturer didCaptureVideoFrame - : (RTC_OBJC_TYPE(RTCVideoFrame) *)frame; +@protocol RTCVideoCapturerDelegate +- (void)capturer:(RTCVideoCapturer *)capturer didCaptureVideoFrame:(RTCVideoFrame *)frame; @end RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCVideoCapturer) : NSObject +@interface RTCVideoCapturer : NSObject -@property(nonatomic, weak) id delegate; +@property(nonatomic, weak) id delegate; -- (instancetype)initWithDelegate:(id)delegate; +- (instancetype)initWithDelegate:(id)delegate; @end diff --git c/lib/WebRTC.framework/Headers/RTCVideoCodecInfo.h w/lib/WebRTC.framework/Headers/RTCVideoCodecInfo.h index fa28958..2162caa 100644 --- c/lib/WebRTC.framework/Headers/RTCVideoCodecInfo.h +++ w/lib/WebRTC.framework/Headers/RTCVideoCodecInfo.h @@ -16,7 +16,7 @@ NS_ASSUME_NONNULL_BEGIN /** Holds information to identify a codec. Corresponds to webrtc::SdpVideoFormat. */ RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCVideoCodecInfo) : NSObject +@interface RTCVideoCodecInfo : NSObject - (instancetype)init NS_UNAVAILABLE; @@ -26,7 +26,7 @@ RTC_OBJC_EXPORT parameters:(nullable NSDictionary *)parameters NS_DESIGNATED_INITIALIZER; -- (BOOL)isEqualToCodecInfo:(RTC_OBJC_TYPE(RTCVideoCodecInfo) *)info; +- (BOOL)isEqualToCodecInfo:(RTCVideoCodecInfo *)info; @property(nonatomic, readonly) NSString *name; @property(nonatomic, readonly) NSDictionary *parameters; diff --git c/lib/WebRTC.framework/Headers/RTCVideoDecoder.h w/lib/WebRTC.framework/Headers/RTCVideoDecoder.h index ccddd42..18c6f6b 100644 --- c/lib/WebRTC.framework/Headers/RTCVideoDecoder.h +++ w/lib/WebRTC.framework/Headers/RTCVideoDecoder.h @@ -19,22 +19,27 @@ NS_ASSUME_NONNULL_BEGIN /** Callback block for decoder. */ -typedef void (^RTCVideoDecoderCallback)(RTC_OBJC_TYPE(RTCVideoFrame) * frame); +typedef void (^RTCVideoDecoderCallback)(RTCVideoFrame *frame); /** Protocol for decoder implementations. */ RTC_OBJC_EXPORT -@protocol RTC_OBJC_TYPE -(RTCVideoDecoder) +@protocol RTCVideoDecoder - - (void)setCallback : (RTCVideoDecoderCallback)callback; -- (NSInteger)startDecodeWithNumberOfCores:(int)numberOfCores; +- (void)setCallback:(RTCVideoDecoderCallback)callback; +- (NSInteger)startDecodeWithSettings:(RTCVideoEncoderSettings *)settings + numberOfCores:(int)numberOfCores + DEPRECATED_MSG_ATTRIBUTE("use startDecodeWithNumberOfCores: instead"); - (NSInteger)releaseDecoder; -- (NSInteger)decode:(RTC_OBJC_TYPE(RTCEncodedImage) *)encodedImage +- (NSInteger)decode:(RTCEncodedImage *)encodedImage missingFrames:(BOOL)missingFrames - codecSpecificInfo:(nullable id)info + codecSpecificInfo:(nullable id)info renderTimeMs:(int64_t)renderTimeMs; - (NSString *)implementationName; +// TODO(andersc): Make non-optional when `startDecodeWithSettings:numberOfCores:` is removed. +@optional +- (NSInteger)startDecodeWithNumberOfCores:(int)numberOfCores; + @end NS_ASSUME_NONNULL_END diff --git c/lib/WebRTC.framework/Headers/RTCVideoDecoderFactory.h w/lib/WebRTC.framework/Headers/RTCVideoDecoderFactory.h index 8d90138..3e24153 100644 --- c/lib/WebRTC.framework/Headers/RTCVideoDecoderFactory.h +++ w/lib/WebRTC.framework/Headers/RTCVideoDecoderFactory.h @@ -16,16 +16,12 @@ NS_ASSUME_NONNULL_BEGIN -/** RTCVideoDecoderFactory is an Objective-C version of webrtc::VideoDecoderFactory. - */ +/** RTCVideoDecoderFactory is an Objective-C version of webrtc::VideoDecoderFactory. */ RTC_OBJC_EXPORT -@protocol RTC_OBJC_TYPE -(RTCVideoDecoderFactory) +@protocol RTCVideoDecoderFactory - - (nullable id)createDecoder - : (RTC_OBJC_TYPE(RTCVideoCodecInfo) *)info; -- (NSArray *) - supportedCodecs; // TODO(andersc): "supportedFormats" instead? +- (nullable id)createDecoder:(RTCVideoCodecInfo *)info; +- (NSArray *)supportedCodecs; // TODO(andersc): "supportedFormats" instead? @end diff --git c/lib/WebRTC.framework/Headers/RTCVideoDecoderFactoryH264.h w/lib/WebRTC.framework/Headers/RTCVideoDecoderFactoryH264.h index 88bacbb..4fcff1d 100644 --- c/lib/WebRTC.framework/Headers/RTCVideoDecoderFactoryH264.h +++ w/lib/WebRTC.framework/Headers/RTCVideoDecoderFactoryH264.h @@ -14,5 +14,5 @@ #import "RTCVideoDecoderFactory.h" RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCVideoDecoderFactoryH264) : NSObject +@interface RTCVideoDecoderFactoryH264 : NSObject @end diff --git c/lib/WebRTC.framework/Headers/RTCVideoDecoderH264.h w/lib/WebRTC.framework/Headers/RTCVideoDecoderH264.h index a12e421..b860276 100644 --- c/lib/WebRTC.framework/Headers/RTCVideoDecoderH264.h +++ w/lib/WebRTC.framework/Headers/RTCVideoDecoderH264.h @@ -14,5 +14,5 @@ #import "RTCVideoDecoder.h" RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCVideoDecoderH264) : NSObject +@interface RTCVideoDecoderH264 : NSObject @end diff --git c/lib/WebRTC.framework/Headers/RTCVideoDecoderVP8.h w/lib/WebRTC.framework/Headers/RTCVideoDecoderVP8.h index a118b25..00786dc 100644 --- c/lib/WebRTC.framework/Headers/RTCVideoDecoderVP8.h +++ w/lib/WebRTC.framework/Headers/RTCVideoDecoderVP8.h @@ -14,12 +14,12 @@ #import "RTCVideoDecoder.h" RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCVideoDecoderVP8) : NSObject +@interface RTCVideoDecoderVP8 : NSObject /* This returns a VP8 decoder that can be returned from a RTCVideoDecoderFactory injected into * RTCPeerConnectionFactory. Even though it implements the RTCVideoDecoder protocol, it can not be * used independently from the RTCPeerConnectionFactory. */ -+ (id)vp8Decoder; ++ (id)vp8Decoder; @end diff --git c/lib/WebRTC.framework/Headers/RTCVideoDecoderVP9.h w/lib/WebRTC.framework/Headers/RTCVideoDecoderVP9.h index b3a1743..b74c1ef 100644 --- c/lib/WebRTC.framework/Headers/RTCVideoDecoderVP9.h +++ w/lib/WebRTC.framework/Headers/RTCVideoDecoderVP9.h @@ -14,12 +14,12 @@ #import "RTCVideoDecoder.h" RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCVideoDecoderVP9) : NSObject +@interface RTCVideoDecoderVP9 : NSObject /* This returns a VP9 decoder that can be returned from a RTCVideoDecoderFactory injected into * RTCPeerConnectionFactory. Even though it implements the RTCVideoDecoder protocol, it can not be * used independently from the RTCPeerConnectionFactory. */ -+ (id)vp9Decoder; ++ (id)vp9Decoder; @end diff --git c/lib/WebRTC.framework/Headers/RTCVideoEncoder.h w/lib/WebRTC.framework/Headers/RTCVideoEncoder.h index 7d1a7af..c525767 100644 --- c/lib/WebRTC.framework/Headers/RTCVideoEncoder.h +++ w/lib/WebRTC.framework/Headers/RTCVideoEncoder.h @@ -21,21 +21,20 @@ NS_ASSUME_NONNULL_BEGIN /** Callback block for encoder. */ -typedef BOOL (^RTCVideoEncoderCallback)(RTC_OBJC_TYPE(RTCEncodedImage) * frame, - id info, - RTC_OBJC_TYPE(RTCRtpFragmentationHeader) * header); +typedef BOOL (^RTCVideoEncoderCallback)(RTCEncodedImage *frame, + id info, + RTCRtpFragmentationHeader *header); /** Protocol for encoder implementations. */ RTC_OBJC_EXPORT -@protocol RTC_OBJC_TYPE -(RTCVideoEncoder) +@protocol RTCVideoEncoder - - (void)setCallback : (RTCVideoEncoderCallback)callback; -- (NSInteger)startEncodeWithSettings:(RTC_OBJC_TYPE(RTCVideoEncoderSettings) *)settings +- (void)setCallback:(RTCVideoEncoderCallback)callback; +- (NSInteger)startEncodeWithSettings:(RTCVideoEncoderSettings *)settings numberOfCores:(int)numberOfCores; - (NSInteger)releaseEncoder; -- (NSInteger)encode:(RTC_OBJC_TYPE(RTCVideoFrame) *)frame - codecSpecificInfo:(nullable id)info +- (NSInteger)encode:(RTCVideoFrame *)frame + codecSpecificInfo:(nullable id)info frameTypes:(NSArray *)frameTypes; - (int)setBitrate:(uint32_t)bitrateKbit framerate:(uint32_t)framerate; - (NSString *)implementationName; @@ -43,7 +42,7 @@ RTC_OBJC_EXPORT /** Returns QP scaling settings for encoder. The quality scaler adjusts the resolution in order to * keep the QP from the encoded images within the given range. Returning nil from this function * disables quality scaling. */ -- (nullable RTC_OBJC_TYPE(RTCVideoEncoderQpThresholds) *)scalingSettings; +- (nullable RTCVideoEncoderQpThresholds *)scalingSettings; @end diff --git c/lib/WebRTC.framework/Headers/RTCVideoEncoderFactory.h w/lib/WebRTC.framework/Headers/RTCVideoEncoderFactory.h index b115b2a..20c603d 100644 --- c/lib/WebRTC.framework/Headers/RTCVideoEncoderFactory.h +++ w/lib/WebRTC.framework/Headers/RTCVideoEncoderFactory.h @@ -16,33 +16,12 @@ NS_ASSUME_NONNULL_BEGIN -/** RTCVideoEncoderFactory is an Objective-C version of - webrtc::VideoEncoderFactory::VideoEncoderSelector. - */ -RTC_OBJC_EXPORT -@protocol RTC_OBJC_TYPE -(RTCVideoEncoderSelector) - - - (void)registerCurrentEncoderInfo : (RTC_OBJC_TYPE(RTCVideoCodecInfo) *)info; -- (nullable RTC_OBJC_TYPE(RTCVideoCodecInfo) *)encoderForBitrate:(NSInteger)bitrate; -- (nullable RTC_OBJC_TYPE(RTCVideoCodecInfo) *)encoderForBrokenEncoder; - -@end - -/** RTCVideoEncoderFactory is an Objective-C version of webrtc::VideoEncoderFactory. - */ +/** RTCVideoEncoderFactory is an Objective-C version of webrtc::VideoEncoderFactory. */ RTC_OBJC_EXPORT -@protocol RTC_OBJC_TYPE -(RTCVideoEncoderFactory) - - - (nullable id)createEncoder - : (RTC_OBJC_TYPE(RTCVideoCodecInfo) *)info; -- (NSArray *) - supportedCodecs; // TODO(andersc): "supportedFormats" instead? +@protocol RTCVideoEncoderFactory -@optional -- (NSArray *)implementations; -- (nullable id)encoderSelector; +- (nullable id)createEncoder:(RTCVideoCodecInfo *)info; +- (NSArray *)supportedCodecs; // TODO(andersc): "supportedFormats" instead? @end diff --git c/lib/WebRTC.framework/Headers/RTCVideoEncoderFactoryH264.h w/lib/WebRTC.framework/Headers/RTCVideoEncoderFactoryH264.h index 45fc4be..c64405e 100644 --- c/lib/WebRTC.framework/Headers/RTCVideoEncoderFactoryH264.h +++ w/lib/WebRTC.framework/Headers/RTCVideoEncoderFactoryH264.h @@ -14,5 +14,5 @@ #import "RTCVideoEncoderFactory.h" RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCVideoEncoderFactoryH264) : NSObject +@interface RTCVideoEncoderFactoryH264 : NSObject @end diff --git c/lib/WebRTC.framework/Headers/RTCVideoEncoderH264.h w/lib/WebRTC.framework/Headers/RTCVideoEncoderH264.h index 9f4f4c7..a9c0558 100644 --- c/lib/WebRTC.framework/Headers/RTCVideoEncoderH264.h +++ w/lib/WebRTC.framework/Headers/RTCVideoEncoderH264.h @@ -15,8 +15,8 @@ #import "RTCVideoEncoder.h" RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCVideoEncoderH264) : NSObject +@interface RTCVideoEncoderH264 : NSObject -- (instancetype)initWithCodecInfo:(RTC_OBJC_TYPE(RTCVideoCodecInfo) *)codecInfo; +- (instancetype)initWithCodecInfo:(RTCVideoCodecInfo *)codecInfo; @end diff --git c/lib/WebRTC.framework/Headers/RTCVideoEncoderQpThresholds.h w/lib/WebRTC.framework/Headers/RTCVideoEncoderQpThresholds.h index 1a6e9e8..2b48f45 100644 --- c/lib/WebRTC.framework/Headers/RTCVideoEncoderQpThresholds.h +++ w/lib/WebRTC.framework/Headers/RTCVideoEncoderQpThresholds.h @@ -16,7 +16,7 @@ NS_ASSUME_NONNULL_BEGIN /** QP thresholds for encoder. Corresponds to webrtc::VideoEncoder::QpThresholds. */ RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCVideoEncoderQpThresholds) : NSObject +@interface RTCVideoEncoderQpThresholds : NSObject - (instancetype)initWithThresholdsLow:(NSInteger)low high:(NSInteger)high; diff --git c/lib/WebRTC.framework/Headers/RTCVideoEncoderSettings.h w/lib/WebRTC.framework/Headers/RTCVideoEncoderSettings.h index ae792ea..a9403f8 100644 --- c/lib/WebRTC.framework/Headers/RTCVideoEncoderSettings.h +++ w/lib/WebRTC.framework/Headers/RTCVideoEncoderSettings.h @@ -21,7 +21,7 @@ typedef NS_ENUM(NSUInteger, RTCVideoCodecMode) { /** Settings for encoder. Corresponds to webrtc::VideoCodec. */ RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCVideoEncoderSettings) : NSObject +@interface RTCVideoEncoderSettings : NSObject @property(nonatomic, strong) NSString *name; diff --git c/lib/WebRTC.framework/Headers/RTCVideoEncoderVP8.h w/lib/WebRTC.framework/Headers/RTCVideoEncoderVP8.h index e136a5b..8d87a89 100644 --- c/lib/WebRTC.framework/Headers/RTCVideoEncoderVP8.h +++ w/lib/WebRTC.framework/Headers/RTCVideoEncoderVP8.h @@ -14,12 +14,12 @@ #import "RTCVideoEncoder.h" RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCVideoEncoderVP8) : NSObject +@interface RTCVideoEncoderVP8 : NSObject /* This returns a VP8 encoder that can be returned from a RTCVideoEncoderFactory injected into * RTCPeerConnectionFactory. Even though it implements the RTCVideoEncoder protocol, it can not be * used independently from the RTCPeerConnectionFactory. */ -+ (id)vp8Encoder; ++ (id)vp8Encoder; @end diff --git c/lib/WebRTC.framework/Headers/RTCVideoEncoderVP9.h w/lib/WebRTC.framework/Headers/RTCVideoEncoderVP9.h index 8f961ef..9efea4b 100644 --- c/lib/WebRTC.framework/Headers/RTCVideoEncoderVP9.h +++ w/lib/WebRTC.framework/Headers/RTCVideoEncoderVP9.h @@ -14,12 +14,12 @@ #import "RTCVideoEncoder.h" RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCVideoEncoderVP9) : NSObject +@interface RTCVideoEncoderVP9 : NSObject /* This returns a VP9 encoder that can be returned from a RTCVideoEncoderFactory injected into * RTCPeerConnectionFactory. Even though it implements the RTCVideoEncoder protocol, it can not be * used independently from the RTCPeerConnectionFactory. */ -+ (id)vp9Encoder; ++ (id)vp9Encoder; @end diff --git c/lib/WebRTC.framework/Headers/RTCVideoFrame.h w/lib/WebRTC.framework/Headers/RTCVideoFrame.h index f5638d2..9aca743 100644 --- c/lib/WebRTC.framework/Headers/RTCVideoFrame.h +++ w/lib/WebRTC.framework/Headers/RTCVideoFrame.h @@ -22,12 +22,11 @@ typedef NS_ENUM(NSInteger, RTCVideoRotation) { RTCVideoRotation_270 = 270, }; -@protocol RTC_OBJC_TYPE -(RTCVideoFrameBuffer); +@protocol RTCVideoFrameBuffer; // RTCVideoFrame is an ObjectiveC version of webrtc::VideoFrame. RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCVideoFrame) : NSObject +@interface RTCVideoFrame : NSObject /** Width without rotation applied. */ @property(nonatomic, readonly) int width; @@ -42,7 +41,7 @@ RTC_OBJC_EXPORT /** Timestamp 90 kHz. */ @property(nonatomic, assign) int32_t timeStamp; -@property(nonatomic, readonly) id buffer; +@property(nonatomic, readonly) id buffer; - (instancetype)init NS_UNAVAILABLE; - (instancetype) new NS_UNAVAILABLE; @@ -72,14 +71,14 @@ RTC_OBJC_EXPORT /** Initialize an RTCVideoFrame from a frame buffer, rotation, and timestamp. */ -- (instancetype)initWithBuffer:(id)frameBuffer +- (instancetype)initWithBuffer:(id)frameBuffer rotation:(RTCVideoRotation)rotation timeStampNs:(int64_t)timeStampNs; /** Return a frame that is guaranteed to be I420, i.e. it is possible to access * the YUV data on it. */ -- (RTC_OBJC_TYPE(RTCVideoFrame) *)newI420VideoFrame; +- (RTCVideoFrame *)newI420VideoFrame; @end diff --git c/lib/WebRTC.framework/Headers/RTCVideoFrameBuffer.h w/lib/WebRTC.framework/Headers/RTCVideoFrameBuffer.h index 82d057e..bb9e6fb 100644 --- c/lib/WebRTC.framework/Headers/RTCVideoFrameBuffer.h +++ w/lib/WebRTC.framework/Headers/RTCVideoFrameBuffer.h @@ -14,18 +14,16 @@ NS_ASSUME_NONNULL_BEGIN -@protocol RTC_OBJC_TYPE -(RTCI420Buffer); +@protocol RTCI420Buffer; // RTCVideoFrameBuffer is an ObjectiveC version of webrtc::VideoFrameBuffer. RTC_OBJC_EXPORT -@protocol RTC_OBJC_TYPE -(RTCVideoFrameBuffer) +@protocol RTCVideoFrameBuffer - @property(nonatomic, readonly) int width; +@property(nonatomic, readonly) int width; @property(nonatomic, readonly) int height; -- (id)toI420; +- (id)toI420; @end diff --git c/lib/WebRTC.framework/Headers/RTCVideoRenderer.h w/lib/WebRTC.framework/Headers/RTCVideoRenderer.h index 0f76329..7b359a3 100644 --- c/lib/WebRTC.framework/Headers/RTCVideoRenderer.h +++ w/lib/WebRTC.framework/Headers/RTCVideoRenderer.h @@ -17,26 +17,23 @@ NS_ASSUME_NONNULL_BEGIN -@class RTC_OBJC_TYPE(RTCVideoFrame); +@class RTCVideoFrame; RTC_OBJC_EXPORT -@protocol RTC_OBJC_TYPE -(RTCVideoRenderer) +@protocol RTCVideoRenderer - /** The size of the frame. */ - - (void)setSize : (CGSize)size; +/** The size of the frame. */ +- (void)setSize:(CGSize)size; /** The frame to be displayed. */ -- (void)renderFrame:(nullable RTC_OBJC_TYPE(RTCVideoFrame) *)frame; +- (void)renderFrame:(nullable RTCVideoFrame *)frame; @end RTC_OBJC_EXPORT -@protocol RTC_OBJC_TYPE -(RTCVideoViewDelegate) +@protocol RTCVideoViewDelegate - - (void)videoView : (id)videoView didChangeVideoSize - : (CGSize)size; +- (void)videoView:(id)videoView didChangeVideoSize:(CGSize)size; @end diff --git c/lib/WebRTC.framework/Headers/RTCVideoSource.h w/lib/WebRTC.framework/Headers/RTCVideoSource.h index cdef8b8..ec8a45c 100644 --- c/lib/WebRTC.framework/Headers/RTCVideoSource.h +++ w/lib/WebRTC.framework/Headers/RTCVideoSource.h @@ -18,7 +18,7 @@ NS_ASSUME_NONNULL_BEGIN RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCVideoSource) : RTC_OBJC_TYPE(RTCMediaSource) +@interface RTCVideoSource : RTCMediaSource - (instancetype)init NS_UNAVAILABLE; diff --git c/lib/WebRTC.framework/Headers/RTCVideoTrack.h w/lib/WebRTC.framework/Headers/RTCVideoTrack.h index 5382b71..b946889 100644 --- c/lib/WebRTC.framework/Headers/RTCVideoTrack.h +++ w/lib/WebRTC.framework/Headers/RTCVideoTrack.h @@ -14,24 +14,23 @@ NS_ASSUME_NONNULL_BEGIN -@protocol RTC_OBJC_TYPE -(RTCVideoRenderer); -@class RTC_OBJC_TYPE(RTCPeerConnectionFactory); -@class RTC_OBJC_TYPE(RTCVideoSource); +@protocol RTCVideoRenderer; +@class RTCPeerConnectionFactory; +@class RTCVideoSource; RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCVideoTrack) : RTC_OBJC_TYPE(RTCMediaStreamTrack) +@interface RTCVideoTrack : RTCMediaStreamTrack /** The video source for this video track. */ -@property(nonatomic, readonly) RTC_OBJC_TYPE(RTCVideoSource) *source; +@property(nonatomic, readonly) RTCVideoSource *source; - (instancetype)init NS_UNAVAILABLE; /** Register a renderer that will render all frames received on this track. */ -- (void)addRenderer:(id)renderer; +- (void)addRenderer:(id)renderer; /** Deregister a renderer. */ -- (void)removeRenderer:(id)renderer; +- (void)removeRenderer:(id)renderer; @end diff --git c/lib/WebRTC.framework/Headers/RTCVideoViewShading.h w/lib/WebRTC.framework/Headers/RTCVideoViewShading.h index 9df30a8..6876cc3 100644 --- c/lib/WebRTC.framework/Headers/RTCVideoViewShading.h +++ w/lib/WebRTC.framework/Headers/RTCVideoViewShading.h @@ -15,17 +15,19 @@ NS_ASSUME_NONNULL_BEGIN /** - * RTCVideoViewShading provides a way for apps to customize the OpenGL(ES shaders - * used in rendering for the RTCEAGLVideoView/RTCNSGLVideoView. + * RTCVideoViewShading provides a way for apps to customize the OpenGL(ES) shaders used in + * rendering for the RTCEAGLVideoView/RTCNSGLVideoView. */ RTC_OBJC_EXPORT -@protocol RTC_OBJC_TYPE -(RTCVideoViewShading) +@protocol RTCVideoViewShading - /** Callback for I420 frames. Each plane is given as a texture. */ - - (void)applyShadingForFrameWithWidth : (int)width height : (int)height rotation - : (RTCVideoRotation)rotation yPlane : (GLuint)yPlane uPlane : (GLuint)uPlane vPlane - : (GLuint)vPlane; +/** Callback for I420 frames. Each plane is given as a texture. */ +- (void)applyShadingForFrameWithWidth:(int)width + height:(int)height + rotation:(RTCVideoRotation)rotation + yPlane:(GLuint)yPlane + uPlane:(GLuint)uPlane + vPlane:(GLuint)vPlane; /** Callback for NV12 frames. Each plane is given as a texture. */ - (void)applyShadingForFrameWithWidth:(int)width diff --git c/lib/WebRTC.framework/Headers/RTCYUVPlanarBuffer.h w/lib/WebRTC.framework/Headers/RTCYUVPlanarBuffer.h index be01b91..8ceb66c 100644 --- c/lib/WebRTC.framework/Headers/RTCYUVPlanarBuffer.h +++ w/lib/WebRTC.framework/Headers/RTCYUVPlanarBuffer.h @@ -17,10 +17,9 @@ NS_ASSUME_NONNULL_BEGIN /** Protocol for RTCVideoFrameBuffers containing YUV planar data. */ RTC_OBJC_EXPORT -@protocol RTC_OBJC_TYPE -(RTCYUVPlanarBuffer) +@protocol RTCYUVPlanarBuffer - @property(nonatomic, readonly) int chromaWidth; +@property(nonatomic, readonly) int chromaWidth; @property(nonatomic, readonly) int chromaHeight; @property(nonatomic, readonly) const uint8_t *dataY; @property(nonatomic, readonly) const uint8_t *dataU; diff --git c/lib/WebRTC.framework/Headers/UIDevice+RTCDevice.h w/lib/WebRTC.framework/Headers/UIDevice+RTCDevice.h index a7f655b..7362375 100644 --- c/lib/WebRTC.framework/Headers/UIDevice+RTCDevice.h +++ w/lib/WebRTC.framework/Headers/UIDevice+RTCDevice.h @@ -37,16 +37,12 @@ typedef NS_ENUM(NSInteger, RTCDeviceType) { RTCDeviceTypeIPhoneXS, RTCDeviceTypeIPhoneXSMax, RTCDeviceTypeIPhoneXR, - RTCDeviceTypeIPhone11, - RTCDeviceTypeIPhone11Pro, - RTCDeviceTypeIPhone11ProMax, RTCDeviceTypeIPodTouch1G, RTCDeviceTypeIPodTouch2G, RTCDeviceTypeIPodTouch3G, RTCDeviceTypeIPodTouch4G, RTCDeviceTypeIPodTouch5G, RTCDeviceTypeIPodTouch6G, - RTCDeviceTypeIPodTouch7G, RTCDeviceTypeIPad, RTCDeviceTypeIPad2Wifi, RTCDeviceTypeIPad2GSM, @@ -76,11 +72,6 @@ typedef NS_ENUM(NSInteger, RTCDeviceType) { RTCDeviceTypeIPadPro12Inch, RTCDeviceTypeIPadPro12Inch2, RTCDeviceTypeIPadPro10Inch, - RTCDeviceTypeIPad7Gen10Inch, - RTCDeviceTypeIPadPro3Gen11Inch, - RTCDeviceTypeIPadPro3Gen12Inch, - RTCDeviceTypeIPadMini5Gen, - RTCDeviceTypeIPadAir3Gen, RTCDeviceTypeSimulatori386, RTCDeviceTypeSimulatorx86_64, }; diff --git c/lib/WebRTC.framework/Headers/WebRTC.h w/lib/WebRTC.framework/Headers/WebRTC.h index 2a89c47..b435202 100644 --- c/lib/WebRTC.framework/Headers/WebRTC.h +++ w/lib/WebRTC.framework/Headers/WebRTC.h @@ -1,5 +1,5 @@ /* - * Copyright 2020 The WebRTC project authors. All Rights Reserved. + * Copyright 2019 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -55,6 +55,7 @@ #import #import #import +#import #import #import #import @@ -76,7 +77,6 @@ #import #import #import -#import #import #import #import diff --git c/lib/WebRTC.framework/Info.plist w/lib/WebRTC.framework/Info.plist index c6c51d6..1d6d2a7 100644 Binary files c/lib/WebRTC.framework/Info.plist and w/lib/WebRTC.framework/Info.plist differ diff --git c/lib/WebRTC.framework/WebRTC w/lib/WebRTC.framework/WebRTC index 9477857..ba8adf3 100755 Binary files c/lib/WebRTC.framework/WebRTC and w/lib/WebRTC.framework/WebRTC differ diff --git c/package-lock.json w/package-lock.json index 763c235..bbfe7b7 100644 --- c/package-lock.json +++ w/package-lock.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-iosrtc", - "version": "8.0.0", + "version": "7.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git c/package.json w/package.json index dd6b6d0..1a83d06 100644 --- c/package.json +++ w/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-iosrtc", - "version": "8.0.0", + "version": "7.0.0", "description": "Cordova iOS plugin exposing the full WebRTC W3C JavaScript APIs", "author": "IƱaki Baz Castillo (https://inakibaz.me)", "contributors": [ diff --git c/plugin.xml w/plugin.xml index 65b345c..6113384 100644 --- c/plugin.xml +++ w/plugin.xml @@ -1,7 +1,7 @@ + version="7.0.0"> iosrtc Cordova iOS plugin exposing the full WebRTC W3C JavaScript APIs