'ended' Event doesn't fire on MediaStreamTrack when a USB camera is unplugged
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 22 Dec 2018 01:37:00 +0000 (01:37 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 22 Dec 2018 01:37:00 +0000 (01:37 +0000)
commit9da01364f73d064c259bdf2942023aa039249530
tree228bfef8001428b35c50f02aa8434ce3fa1ee931
parent3d0c7474c1ef482792b2d20e210e0e6c4d5e97a4
'ended' Event doesn't fire on MediaStreamTrack when a USB camera is unplugged
https://bugs.webkit.org/show_bug.cgi?id=187896
<rdar://problem/42681445>

Reviewed by Jer Noble.

Source/WebCore:

No new tests, tested manually.

* platform/mediastream/mac/AVVideoCaptureSource.h:
* platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::deviceDisconnected):
(-[WebCoreAVVideoCaptureSourceObserver addNotificationObservers]):
(-[WebCoreAVVideoCaptureSourceObserver removeNotificationObservers]):
(-[WebCoreAVVideoCaptureSourceObserver deviceConnectedDidChange:]):
* platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:
(WebCore::deviceHasInputStreams):
(WebCore::isValidCaptureDevice):
(WebCore::CoreAudioCaptureDeviceManager::coreAudioCaptureDevices):
(WebCore::CoreAudioCaptureDeviceManager::refreshAudioCaptureDevices):
(WebCore::CoreAudioCaptureDeviceManager::devicesChanged): Deleted.
* platform/mediastream/mac/CoreAudioCaptureDeviceManager.h:
* platform/mediastream/mac/CoreAudioCaptureSource.cpp:
(WebCore::CoreAudioSharedUnit::setCaptureDevice):
(WebCore::CoreAudioSharedUnit::devicesChanged):
(WebCore::CoreAudioSharedUnit::startProducingData):
(WebCore::CoreAudioSharedUnit::startInternal):
(WebCore::CoreAudioSharedUnit::verifyIsCapturing):
(WebCore::CoreAudioSharedUnit::captureFailed):
(WebCore::CoreAudioCaptureSourceFactory::devicesChanged):
(WebCore::CoreAudioCaptureSource::CoreAudioCaptureSource):
(WebCore::CoreAudioSharedUnit::setCaptureDeviceID): Deleted.
* platform/mediastream/mac/CoreAudioCaptureSource.h:

Source/WebCore/PAL:

* pal/spi/cf/CoreAudioSPI.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239531 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/PAL/ChangeLog
Source/WebCore/PAL/pal/spi/cf/CoreAudioSPI.h
Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.h
Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm
Source/WebCore/platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp
Source/WebCore/platform/mediastream/mac/CoreAudioCaptureDeviceManager.h
Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp
Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.h