Changeset 264177 in webkit
- Timestamp:
- Jul 9, 2020, 9:57:19 AM (6 years ago)
- Location:
- trunk/Source
- Files:
-
- 10 edited
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.h (modified) (1 diff)
-
WebCore/platform/audio/ios/MediaSessionHelperIOS.h (modified) (1 diff)
-
WebCore/platform/audio/ios/MediaSessionHelperIOS.mm (modified) (4 diffs)
-
WebCore/platform/audio/ios/MediaSessionManagerIOS.h (modified) (1 diff)
-
WebCore/platform/audio/ios/MediaSessionManagerIOS.mm (modified) (1 diff)
-
WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm (modified) (1 diff)
-
WebKit/ChangeLog (modified) (1 diff)
-
WebKit/GPUProcess/media/ios/RemoteMediaSessionHelperProxy.cpp (modified) (1 diff)
-
WebKit/GPUProcess/media/ios/RemoteMediaSessionHelperProxy.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r264176 r264177 1 2020-07-09 Eric Carlson <eric.carlson@apple.com> 2 3 Reset AVSystemController_PIDToInheritApplicationStateFrom when mediaserverd dies 4 https://bugs.webkit.org/show_bug.cgi?id=214112 5 <rdar://problem/65229214> 6 7 Reviewed by Jer Noble. 8 9 Tested manually because this can only be tested by killing a system process while 10 capturing on iOS hardware. 11 12 * platform/audio/cocoa/MediaSessionManagerCocoa.h: Add task queue accessor. 13 (WebCore::MediaSessionManagerCocoa::taskQueue): 14 15 * platform/audio/ios/MediaSessionHelperIOS.h: 16 (WebCore::MediaSessionHelperClient::mediaServerConnectionDied): 17 * platform/audio/ios/MediaSessionHelperIOS.mm: 18 (MediaSessionHelperiOS::mediaServerConnectionDied): Renamed from carPlayServerDied. 19 Inform clients if we previously set the PID proxy. 20 (-[WebMediaSessionHelper initWithCallback:]): Call mediaServerConnectionDied. 21 (-[WebMediaSessionHelper mediaServerConnectionDied:]): Ditto. 22 (MediaSessionHelperiOS::carPlayServerDied): Deleted. 23 (-[WebMediaSessionHelper carPlayServerDied:]): Deleted. 24 25 * platform/audio/ios/MediaSessionManagerIOS.h: 26 * platform/audio/ios/MediaSessionManagerIOS.mm: 27 (WebCore::MediaSessionManageriOS::mediaServerConnectionDied): Call providePresentingApplicationPID 28 if we previously set the PID proxy. 29 30 * platform/mediastream/mac/AVVideoCaptureSource.mm: 31 (WebCore::AVVideoCaptureSource::captureSessionRuntimeError): Don't try to restart the 32 session immediately since this is called directly from the notification handler. 33 1 34 2020-07-09 Clark Wang <clark_wang@apple.com> 2 35 -
trunk/Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.h
r261709 r264177 83 83 PlatformMediaSession* nowPlayingEligibleSession(); 84 84 85 GenericTaskQueue<Timer>& taskQueue() { return m_taskQueue; } 86 85 87 private: 86 88 #if !RELEASE_LOG_DISABLED -
trunk/Source/WebCore/platform/audio/ios/MediaSessionHelperIOS.h
r258324 r264177 43 43 virtual void applicationWillBecomeInactive() = 0; 44 44 virtual void applicationDidBecomeActive() = 0; 45 virtual void mediaServerConnectionDied() { }; 45 46 46 47 enum class HasAvailableTargets : bool { No, Yes }; -
trunk/Source/WebCore/platform/audio/ios/MediaSessionHelperIOS.mm
r259303 r264177 99 99 void applicationDidBecomeActive(); 100 100 #if HAVE(CELESTIAL) 101 void carPlayServerDied();101 void mediaServerConnectionDied(); 102 102 void updateCarPlayIsConnected(Optional<bool>&&); 103 103 #endif … … 227 227 228 228 #if HAVE(CELESTIAL) 229 void MediaSessionHelperiOS:: carPlayServerDied()229 void MediaSessionHelperiOS::mediaServerConnectionDied() 230 230 { 231 231 updateCarPlayIsConnected(WTF::nullopt); 232 233 if (!m_havePresentedApplicationPID) 234 return; 235 236 m_havePresentedApplicationPID = false; 237 for (auto& client : m_clients) 238 client.mediaServerConnectionDied(); 232 239 } 233 240 … … 334 341 #if HAVE(CELESTIAL) 335 342 if (canLoadAVSystemController_ServerConnectionDiedNotification()) 336 [center addObserver:self selector:@selector( carPlayServerDied:) name:getAVSystemController_ServerConnectionDiedNotification() object:nil];343 [center addObserver:self selector:@selector(mediaServerConnectionDied:) name:getAVSystemController_ServerConnectionDiedNotification() object:nil]; 337 344 if (canLoadAVSystemController_CarPlayIsConnectedDidChangeNotification()) 338 345 [center addObserver:self selector:@selector(carPlayIsConnectedDidChange:) name:getAVSystemController_CarPlayIsConnectedDidChangeNotification() object:nil]; … … 513 520 514 521 #if HAVE(CELESTIAL) 515 - (void) carPlayServerDied:(NSNotification *)notification516 { 517 if (!_callback) 518 return; 519 520 LOG(Media, "-[WebMediaSessionHelper carPlayServerDied:]");522 - (void)mediaServerConnectionDied:(NSNotification *)notification 523 { 524 if (!_callback) 525 return; 526 527 LOG(Media, "-[WebMediaSessionHelper mediaServerConnectionDied:]"); 521 528 UNUSED_PARAM(notification); 522 529 callOnWebThreadOrDispatchAsyncOnMainThread([protectedSelf = retainPtr(self)]() mutable { 523 530 if (auto* callback = protectedSelf->_callback) 524 callback-> carPlayServerDied();531 callback->mediaServerConnectionDied(); 525 532 }); 526 533 } -
trunk/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.h
r259303 r264177 77 77 void applicationWillBecomeInactive() final; 78 78 void applicationDidBecomeActive() final; 79 void mediaServerConnectionDied() final; 79 80 void externalOutputDeviceAvailableDidChange(HasAvailableTargets) final; 80 81 void activeAudioRouteDidChange(ShouldPause) final; -
trunk/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm
r261839 r264177 116 116 } 117 117 118 void MediaSessionManageriOS::mediaServerConnectionDied() 119 { 120 ALWAYS_LOG(LOGIDENTIFIER, m_havePresentedApplicationPID); 121 122 if (!m_havePresentedApplicationPID) 123 return; 124 125 m_havePresentedApplicationPID = false; 126 taskQueue().enqueueTask([] () { 127 providePresentingApplicationPID(); 128 }); 129 } 130 118 131 void MediaSessionManageriOS::providePresentingApplicationPID() 119 132 { -
trunk/Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm
r262122 r264177 616 616 void AVVideoCaptureSource::captureSessionRuntimeError(RetainPtr<NSError> error) 617 617 { 618 ERROR_LOG_IF(loggerPtr(), LOGIDENTIFIER, [[error localizedDescription] UTF8String]); 618 auto identifier = LOGIDENTIFIER; 619 ERROR_LOG_IF(loggerPtr(), identifier, [error code], ", ", [[error localizedDescription] UTF8String]); 619 620 620 621 if (!m_isRunning || error.get().code != AVErrorMediaServicesWereReset) 621 622 return; 622 623 623 // Try to restart the session, but reset m_isRunning immediately so if it fails we won't try again. 624 [m_session startRunning]; 625 m_isRunning = [m_session isRunning]; 624 scheduleDeferredTask([this, identifier] { 625 // Try to restart the session, but reset m_isRunning immediately so if it fails we won't try again. 626 ERROR_LOG_IF(loggerPtr(), identifier, "restarting session"); 627 [m_session startRunning]; 628 m_isRunning = [m_session isRunning]; 629 }); 626 630 } 627 631 -
trunk/Source/WebKit/ChangeLog
r264170 r264177 1 2020-07-09 Eric Carlson <eric.carlson@apple.com> 2 3 Reset AVSystemController_PIDToInheritApplicationStateFrom when mediaserverd dies 4 https://bugs.webkit.org/show_bug.cgi?id=214112 5 <rdar://problem/65229214> 6 7 Reviewed by Jer Noble. 8 9 * GPUProcess/media/ios/RemoteMediaSessionHelperProxy.cpp: 10 (WebKit::RemoteMediaSessionHelperProxy::providePresentingApplicationPID): Don't bother 11 tracking whether or not providePresentingApplicationPID has been called, the session 12 helper already does that. 13 * GPUProcess/media/ios/RemoteMediaSessionHelperProxy.h: 14 1 15 2020-07-09 Wenson Hsieh <wenson_hsieh@apple.com> 2 16 -
trunk/Source/WebKit/GPUProcess/media/ios/RemoteMediaSessionHelperProxy.cpp
r258324 r264177 68 68 void RemoteMediaSessionHelperProxy::providePresentingApplicationPID(int pid) 69 69 { 70 if (m_providedApplicationPID)71 return;72 73 m_providedApplicationPID = true;74 70 MediaSessionHelper::sharedHelper().providePresentingApplicationPID(pid); 75 71 } -
trunk/Source/WebKit/GPUProcess/media/ios/RemoteMediaSessionHelperProxy.h
r258324 r264177 62 62 void activeVideoRouteDidChange(SupportsAirPlayVideo, Ref<WebCore::MediaPlaybackTarget>&&) final; 63 63 64 bool m_providedApplicationPID { false };65 64 bool m_isMonitoringWirelessRoutes { false }; 66 65 GPUConnectionToWebProcess& m_gpuConnection;
Note:
See TracChangeset
for help on using the changeset viewer.