| Summary: | 'ended' Event doesn't fire on MediaStreamTrack when a USB camera is unplugged | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Adam <adam> | ||||||||
| Component: | WebRTC | Assignee: | Eric Carlson <eric.carlson> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | commit-queue, eric.carlson, jer.noble, jonlee, webkit-bug-importer, youennf | ||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||
| Version: | Safari Technology Preview | ||||||||||
| Hardware: | Mac | ||||||||||
| OS: | macOS 10.13 | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Adam
2018-07-22 18:32:11 PDT
Created attachment 357973 [details]
Patch
Created attachment 357978 [details]
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=357973&action=review > Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm:636 > + AVCaptureDeviceTypedef *device = [notification object]; > + if (this->device() == device) Nit: You don't seem to need the local variable here. > Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm:726 > + if (!m_callback) > + return; > + > + m_callback->deviceDisconnected(notification); Nit: how about: if (m_callback) m_callback->deviceDisconnected(notification); > Source/WebCore/platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:95 > + bool isNonAggregable = !name || !String { name }.startsWith("com.apple.audio.CoreAudio"); Woah, that looks super weird. I realize that brace-initialization is the new hotness, but I don't think it's supposed to be used for anonymous variables like this. Comment on attachment 357978 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=357978&action=review > Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp:206 > +void CoreAudioSharedUnit::setCaptureDevice(const String& persistentID, uint32_t captureDeviceID) Could be String&& > Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp:232 > + } Nit: use WTF::anyOf Created attachment 357988 [details]
Patch for landing.
Comment on attachment 357988 [details] Patch for landing. Clearing flags on attachment: 357988 Committed r239531: <https://trac.webkit.org/changeset/239531> All reviewed patches have been landed. Closing bug. |