Bug 147014

Summary: Make MediaPlayerPrivateMediaStreamAVFObjC rely on pre rendered platformLayers
Product: WebKit Reporter: Matthew Daiter <mdaiter>
Component: WebCore Misc.Assignee: Matthew Daiter <mdaiter>
Status: RESOLVED INVALID    
Severity: Normal CC: bfulgham, eric.carlson, jonlee, mdaiter, webkit-bug-importer, webkit.review.bot
Priority: P2 Keywords: InRadar, PlatformOnly
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 147011    
Bug Blocks:    
Attachments:
Description Flags
Patch none

Description Matthew Daiter 2015-07-16 14:04:57 PDT
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.
Comment 1 Radar WebKit Bug Importer 2015-07-16 14:07:24 PDT
<rdar://problem/21862276>
Comment 2 Matthew Daiter 2015-07-16 14:16:32 PDT
Created attachment 256925 [details]
Patch
Comment 3 Brent Fulgham 2015-07-22 09:47:51 PDT
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 4 Matthew Daiter 2015-07-22 09:49:55 PDT
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().