Make RemoteRealtimeVideoSource a RealtimeVideoCaptureSource
Created attachment 419969 [details] WIP
Created attachment 419976 [details] Patch
Created attachment 419978 [details] Patch
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?
(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.
Created attachment 420103 [details] Patch for landing
> > 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.
ChangeLog entry in LayoutTests/ChangeLog contains OOPS!.
Created attachment 420107 [details] Patch
Committed r272778: <https://commits.webkit.org/r272778> All reviewed patches have been landed. Closing bug and clearing flags on attachment 420107 [details].
<rdar://problem/74270196>