Bug 221747

Summary: Make RemoteRealtimeVideoSource a RealtimeVideoCaptureSource
Product: WebKit Reporter: youenn fablet <youennf>
Component: WebRTCAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: eric.carlson, ews-watchlist, glenn, hta, jer.noble, philipj, sergio, tommyw, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 221201, 221331    
Attachments:
Description Flags
WIP
ews-feeder: commit-queue-
Patch
none
Patch
none
Patch for landing
none
Patch none

youenn fablet
Reported 2021-02-11 03:08:06 PST
Make RemoteRealtimeVideoSource a RealtimeVideoCaptureSource
Attachments
WIP (28.47 KB, patch)
2021-02-11 03:11 PST, youenn fablet
ews-feeder: commit-queue-
Patch (30.58 KB, patch)
2021-02-11 05:02 PST, youenn fablet
no flags
Patch (30.63 KB, patch)
2021-02-11 05:18 PST, youenn fablet
no flags
Patch for landing (37.27 KB, patch)
2021-02-12 01:28 PST, youenn fablet
no flags
Patch (37.26 KB, patch)
2021-02-12 02:10 PST, youenn fablet
no flags
youenn fablet
Comment 1 2021-02-11 03:11:49 PST
youenn fablet
Comment 2 2021-02-11 05:02:57 PST
youenn fablet
Comment 3 2021-02-11 05:18:27 PST
Eric Carlson
Comment 4 2021-02-11 09:04:42 PST
Comment on attachment 419978 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=419978&action=review > Source/WebKit/UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:312 > +void UserMediaCaptureManagerProxy::generatePresets(RealtimeMediaSourceIdentifier id, CompletionHandler<void(Vector<VideoPresetData>&&, IntSize)>&& completionHandler) This name isn't entirely accurate because it generates presets and fetches the current size. I don't love either of these names, but they would be more correct: `getSizeAndGeneratePresets`, or `generatePresetsAndGetSize`? > Source/WebKit/WebProcess/cocoa/RemoteRealtimeVideoSource.cpp:83 > + connection()->sendWithAsyncReply(Messages::UserMediaCaptureManagerProxy::GeneratePresets(identifier()), [this, protectedThis = WTFMove(protectedThis)](auto&& presets, auto size) { As we discussed, can this be moved into CreateMediaSourceForCaptureDeviceWithConstraints so we don't need to make two calls to the UI process to become ready? > Source/WebKit/WebProcess/cocoa/RemoteRealtimeVideoSource.cpp:248 > +void RemoteRealtimeVideoSource::setFrameRateWithPreset(double, RefPtr<VideoPreset>) > { > - m_hasRequestedToEnd = true; > - connection()->send(Messages::UserMediaCaptureManagerProxy::RequestToEnd { m_identifier }, 0); > } Can this be removed completely?
youenn fablet
Comment 5 2021-02-11 09:17:25 PST
(In reply to Eric Carlson from comment #4) > Comment on attachment 419978 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=419978&action=review > > > Source/WebKit/UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:312 > > +void UserMediaCaptureManagerProxy::generatePresets(RealtimeMediaSourceIdentifier id, CompletionHandler<void(Vector<VideoPresetData>&&, IntSize)>&& completionHandler) > > This name isn't entirely accurate because it generates presets and fetches > the current size. I don't love either of these names, but they would be more > correct: `getSizeAndGeneratePresets`, or `generatePresetsAndGetSize`? > > > Source/WebKit/WebProcess/cocoa/RemoteRealtimeVideoSource.cpp:83 > > + connection()->sendWithAsyncReply(Messages::UserMediaCaptureManagerProxy::GeneratePresets(identifier()), [this, protectedThis = WTFMove(protectedThis)](auto&& presets, auto size) { > > As we discussed, can this be moved into > CreateMediaSourceForCaptureDeviceWithConstraints so we don't need to make > two calls to the UI process to become ready? Right, let's add it to CreateMediaSourceForCaptureDeviceWithConstraints.
youenn fablet
Comment 6 2021-02-12 01:28:06 PST
Created attachment 420103 [details] Patch for landing
youenn fablet
Comment 7 2021-02-12 01:29:42 PST
> > Source/WebKit/WebProcess/cocoa/RemoteRealtimeVideoSource.cpp:248 > > +void RemoteRealtimeVideoSource::setFrameRateWithPreset(double, RefPtr<VideoPreset>) > > { > > - m_hasRequestedToEnd = true; > > - connection()->send(Messages::UserMediaCaptureManagerProxy::RequestToEnd { m_identifier }, 0); > > } > > Can this be removed completely? Actually, I need to implement it for clone-then-increase-resolution-or-frameRate cases. I removed on the other hand the applyConstraintsFailed/Succeeded since they are no longer needed for video.
EWS
Comment 8 2021-02-12 02:06:48 PST
ChangeLog entry in LayoutTests/ChangeLog contains OOPS!.
youenn fablet
Comment 9 2021-02-12 02:10:12 PST
EWS
Comment 10 2021-02-12 02:54:38 PST
Committed r272778: <https://commits.webkit.org/r272778> All reviewed patches have been landed. Closing bug and clearing flags on attachment 420107 [details].
Radar WebKit Bug Importer
Comment 11 2021-02-12 02:55:14 PST
Note You need to log in before you can comment on or make changes to this bug.