[iOS] Update AirPlay route monitoring
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 May 2018 21:48:49 +0000 (21:48 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 May 2018 21:48:49 +0000 (21:48 +0000)
https://bugs.webkit.org/show_bug.cgi?id=185706
<rdar://problem/40230677>

Unreviewed, fix extra zoom mode build after r231913.

* platform/audio/ios/MediaSessionManagerIOS.mm:
(-[WebMediaSessionHelper dealloc]):
(-[WebMediaSessionHelper hasWirelessTargetsAvailable]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231921 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm

index 1cbeca0..5486ffd 100644 (file)
@@ -1,3 +1,15 @@
+2018-05-17  Eric Carlson  <eric.carlson@apple.com>
+
+        [iOS] Update AirPlay route monitoring
+        https://bugs.webkit.org/show_bug.cgi?id=185706
+        <rdar://problem/40230677>
+
+        Unreviewed, fix extra zoom mode build after r231913.
+
+        * platform/audio/ios/MediaSessionManagerIOS.mm:
+        (-[WebMediaSessionHelper dealloc]):
+        (-[WebMediaSessionHelper hasWirelessTargetsAvailable]):
+
 2018-05-17  Jer Noble  <jer.noble@apple.com>
 
         CRASH in ImageDecoderAVFObjC::sampleAtIndex()
index 749e519..5341154 100644 (file)
 
 SOFT_LINK_FRAMEWORK(AVFoundation)
 SOFT_LINK_CLASS(AVFoundation, AVAudioSession)
-SOFT_LINK_CLASS(AVFoundation, AVRouteDetector)
 SOFT_LINK_POINTER(AVFoundation, AVAudioSessionInterruptionNotification, NSString *)
 SOFT_LINK_POINTER(AVFoundation, AVAudioSessionInterruptionTypeKey, NSString *)
 SOFT_LINK_POINTER(AVFoundation, AVAudioSessionInterruptionOptionKey, NSString *)
 SOFT_LINK_POINTER(AVFoundation, AVRouteDetectorMultipleRoutesDetectedDidChangeNotification, NSString *)
 
+#if HAVE(MEDIA_PLAYER) && !ENABLE(EXTRA_ZOOM_MODE)
+SOFT_LINK_CLASS(AVFoundation, AVRouteDetector)
+#endif
+
 #define AVAudioSession getAVAudioSessionClass()
 #define AVAudioSessionInterruptionNotification getAVAudioSessionInterruptionNotification()
 #define AVAudioSessionInterruptionTypeKey getAVAudioSessionInterruptionTypeKey()
@@ -101,7 +104,9 @@ using namespace WebCore;
 @interface WebMediaSessionHelper : NSObject {
     MediaSessionManageriOS* _callback;
 
+#if HAVE(MEDIA_PLAYER) && !ENABLE(EXTRA_ZOOM_MODE)
     RetainPtr<AVRouteDetector> _routeDetector;
+#endif
     bool _monitoringAirPlayRoutes;
     bool _startMonitoringAirPlayRoutesPending;
 }
@@ -115,7 +120,7 @@ using namespace WebCore;
 - (void)applicationDidEnterBackground:(NSNotification *)notification;
 - (BOOL)hasWirelessTargetsAvailable;
 
-#if HAVE(MEDIA_PLAYER)
+#if HAVE(MEDIA_PLAYER) && !ENABLE(EXTRA_ZOOM_MODE)
 - (void)startMonitoringAirPlayRoutes;
 - (void)stopMonitoringAirPlayRoutes;
 #endif
@@ -345,7 +350,7 @@ void MediaSessionManageriOS::externalOutputDeviceAvailableDidChange()
 {
     LOG(Media, "-[WebMediaSessionHelper dealloc]");
 
-#if HAVE(MEDIA_PLAYER)
+#if HAVE(MEDIA_PLAYER) && !ENABLE(EXTRA_ZOOM_MODE)
     if (!pthread_main_np()) {
         dispatch_async(dispatch_get_main_queue(), [routeDetector = WTFMove(_routeDetector)] () mutable {
             LOG(Media, "safelyTearDown - dipatched to UI thread.");
@@ -371,10 +376,14 @@ void MediaSessionManageriOS::externalOutputDeviceAvailableDidChange()
 - (BOOL)hasWirelessTargetsAvailable
 {
     LOG(Media, "-[WebMediaSessionHelper hasWirelessTargetsAvailable]");
+#if HAVE(MEDIA_PLAYER) && !ENABLE(EXTRA_ZOOM_MODE)
     return _routeDetector.get().multipleRoutesDetected;
+#else
+    return NO;
+#endif
 }
 
-#if HAVE(MEDIA_PLAYER)
+#if HAVE(MEDIA_PLAYER) && !ENABLE(EXTRA_ZOOM_MODE)
 - (void)startMonitoringAirPlayRoutes
 {
     if (_monitoringAirPlayRoutes)
@@ -419,7 +428,7 @@ void MediaSessionManageriOS::externalOutputDeviceAvailableDidChange()
     _monitoringAirPlayRoutes = false;
     _routeDetector.get().routeDetectionEnabled = NO;
 }
-#endif // HAVE(MEDIA_PLAYER)
+#endif // HAVE(MEDIA_PLAYER) && !ENABLE(EXTRA_ZOOM_MODE)
 
 - (void)interruption:(NSNotification *)notification
 {