Currently, the MediaPlayerPrivateMediaStreamAVFObjC class relies on generating PlatformLayers on the fly from calls to the AVVideoPreviewCaptureLayer class. Switching over to an easier method to make sure that the system can easily grab rendered images to display from a more efficient method of grabbing frames from the camera wrapper class.
<rdar://problem/21862276>
Created attachment 256925 [details] Patch
Comment on attachment 256925 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=256925&action=review > Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:178 > + return (PlatformLayer*)static_cast<AVVideoCaptureSource*>(m_MediaStreamPrivate->client()->getVideoTracks().at(0)->source())->previewLayer(); Why are you removing the FIXME comment? this is still just getting the first webcam, isn't it? Or is this post-user-selection?
Comment on attachment 256925 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=256925&action=review >> Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:178 >> + return (PlatformLayer*)static_cast<AVVideoCaptureSource*>(m_MediaStreamPrivate->client()->getVideoTracks().at(0)->source())->previewLayer(); > > Why are you removing the FIXME comment? this is still just getting the first webcam, isn't it? Or is this post-user-selection? This is actually outdated. The getVideoTracks() and getAudioTracks() removal bug should take care of this, so that we don't need to check getVideoTracks().