Bug 190043

Summary: [MediaStream] Use display-specific capture factories
Product: WebKit Reporter: Eric Carlson <eric.carlson>
Component: WebRTCAssignee: Eric Carlson <eric.carlson>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, ews-watchlist, rniwa, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Archive of layout-test-results from ews106 for mac-sierra-wk2
none
Patch for landing
none
Patch for landing
none
Another patch for landing none

Eric Carlson
Reported 2018-09-27 10:17:31 PDT
Use display-specific capture factories instead of having the video factory also create display capture devices.
Attachments
Patch (20.37 KB, patch)
2018-09-27 21:32 PDT, Eric Carlson
no flags
Archive of layout-test-results from ews106 for mac-sierra-wk2 (3.13 MB, application/zip)
2018-09-28 00:15 PDT, EWS Watchlist
no flags
Patch for landing (50.09 KB, patch)
2018-09-28 14:25 PDT, Eric Carlson
no flags
Patch for landing (53.47 KB, patch)
2018-09-29 04:44 PDT, Eric Carlson
no flags
Another patch for landing (53.23 KB, patch)
2018-09-29 15:12 PDT, Eric Carlson
no flags
Radar WebKit Bug Importer
Comment 1 2018-09-27 10:18:53 PDT
Eric Carlson
Comment 2 2018-09-27 21:32:03 PDT
youenn fablet
Comment 3 2018-09-27 21:47:51 PDT
Comment on attachment 351050 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=351050&action=review > Source/WebCore/platform/mediastream/RealtimeMediaSource.h:137 > + class DisplayCaptureFactory { We should maybe move DisplayCaptureFactory, VideoCaptureFactory et al to their own file. We do not gain much in having them inside RealtimeMediaSource. > Source/WebCore/platform/mediastream/RealtimeMediaSourceCenter.cpp:106 > + else We could have a specific RealtimeMediaSourceCenter::createDisplayMediaStream that would be called from UserMediaRequest::allow based on the UserMediaRequest::type. > Source/WebCore/platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:53 > + if (device.type() == CaptureDevice::DeviceType::Camera) Maybe an ASSERT() is all that is needed there. If the type is not good, the id is probably not good and capture will fail, right?
EWS Watchlist
Comment 4 2018-09-28 00:15:10 PDT
Comment on attachment 351050 [details] Patch Attachment 351050 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/9378054 New failing tests: http/tests/media/media-stream/get-display-media-prompt.html
EWS Watchlist
Comment 5 2018-09-28 00:15:12 PDT
Created attachment 351061 [details] Archive of layout-test-results from ews106 for mac-sierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-sierra-wk2 Platform: Mac OS X 10.12.6
Eric Carlson
Comment 6 2018-09-28 14:25:57 PDT
Created attachment 351109 [details] Patch for landing
Eric Carlson
Comment 7 2018-09-28 14:28:32 PDT
Comment on attachment 351050 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=351050&action=review >> Source/WebCore/platform/mediastream/RealtimeMediaSource.h:137 >> + class DisplayCaptureFactory { > > We should maybe move DisplayCaptureFactory, VideoCaptureFactory et al to their own file. > We do not gain much in having them inside RealtimeMediaSource. Good idea, fixed. >> Source/WebCore/platform/mediastream/RealtimeMediaSourceCenter.cpp:106 >> + else > > We could have a specific RealtimeMediaSourceCenter::createDisplayMediaStream that would be called from UserMediaRequest::allow based on the UserMediaRequest::type. I'll consider this for one of the next refactorings. >> Source/WebCore/platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:53 >> + if (device.type() == CaptureDevice::DeviceType::Camera) > > Maybe an ASSERT() is all that is needed there. > If the type is not good, the id is probably not good and capture will fail, right? Sure, changed.
Eric Carlson
Comment 8 2018-09-29 04:44:01 PDT
Created attachment 351179 [details] Patch for landing
Eric Carlson
Comment 9 2018-09-29 15:12:02 PDT
Created attachment 351199 [details] Another patch for landing
WebKit Commit Bot
Comment 10 2018-09-30 00:02:47 PDT
Comment on attachment 351199 [details] Another patch for landing Clearing flags on attachment: 351199 Committed r236645: <https://trac.webkit.org/changeset/236645>
WebKit Commit Bot
Comment 11 2018-09-30 00:02:48 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.