| Index: webrtc/modules/audio_device/ios/objc/RTCAudioSession+Private.h
|
| diff --git a/webrtc/modules/audio_device/ios/objc/RTCAudioSession+Private.h b/webrtc/modules/audio_device/ios/objc/RTCAudioSession+Private.h
|
| index 43af7c86e2fa202bbf2a6e20d6fc47673e1102d4..c6738e7a033ccd9856e67c01a941ce20ff157863 100644
|
| --- a/webrtc/modules/audio_device/ios/objc/RTCAudioSession+Private.h
|
| +++ b/webrtc/modules/audio_device/ios/objc/RTCAudioSession+Private.h
|
| @@ -14,12 +14,25 @@
|
|
|
| NS_ASSUME_NONNULL_BEGIN
|
|
|
| +@class RTCAudioSessionConfiguration;
|
| +
|
| @interface RTCAudioSession ()
|
|
|
| /** Number of times setActive:YES has succeeded without a balanced call to
|
| * setActive:NO.
|
| */
|
| -@property(nonatomic, readonly) NSInteger activationCount;
|
| +@property(nonatomic, readonly) int activationCount;
|
| +
|
| +/** The number of times |beginWebRTCSession| was called without a balanced call
|
| + * to |endWebRTCSession|.
|
| + */
|
| +@property(nonatomic, readonly) int webRTCSessionCount;
|
| +
|
| +/** The configuration of the audio session before configureWebRTCSession
|
| + * was first called.
|
| + */
|
| +@property(nonatomic, strong, nullable)
|
| + RTCAudioSessionConfiguration *savedConfiguration;
|
|
|
| - (BOOL)checkLock:(NSError **)outError;
|
|
|
| @@ -29,9 +42,26 @@ NS_ASSUME_NONNULL_BEGIN
|
| */
|
| - (void)pushDelegate:(id<RTCAudioSessionDelegate>)delegate;
|
|
|
| +/** Signals RTCAudioSession that a WebRTC session is about to begin and
|
| + * audio configuration is needed. Will configure the audio session for WebRTC
|
| + * if not already configured and if configuration is not delayed.
|
| + * Successful calls must be balanced by a call to endWebRTCSession.
|
| + */
|
| +- (BOOL)beginWebRTCSession:(NSError **)outError;
|
| +
|
| +/** Signals RTCAudioSession that a WebRTC session is about to end and audio
|
| + * unconfiguration is needed. Will unconfigure the audio session for WebRTC
|
| + * if this is the last unmatched call and if configuration is not delayed.
|
| + */
|
| +- (BOOL)endWebRTCSession:(NSError **)outError;
|
| +
|
| +/** Returns a configuration error with the given description. */
|
| +- (NSError *)configurationErrorWithDescription:(NSString *)description;
|
| +
|
| // Properties and methods for tests.
|
| @property(nonatomic, readonly)
|
| std::vector<__weak id<RTCAudioSessionDelegate> > delegates;
|
| +
|
| - (void)notifyDidBeginInterruption;
|
| - (void)notifyDidEndInterruptionWithShouldResumeSession:
|
| (BOOL)shouldResumeSession;
|
| @@ -39,6 +69,10 @@ NS_ASSUME_NONNULL_BEGIN
|
| previousRoute:(AVAudioSessionRouteDescription *)previousRoute;
|
| - (void)notifyMediaServicesWereLost;
|
| - (void)notifyMediaServicesWereReset;
|
| +- (void)notifyShouldConfigure;
|
| +- (void)notifyShouldUnconfigure;
|
| +- (void)notifyDidConfigure;
|
| +- (void)notifyDidUnconfigure;
|
|
|
| @end
|
|
|
|
|