Bug 147011 - Adding previewCaptureLayer to AVVideoCaptureSource
Summary: Adding previewCaptureLayer to AVVideoCaptureSource
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Matthew Daiter
URL:
Keywords: InRadar, PlatformOnly
Depends on:
Blocks: 147014
  Show dependency treegraph
 
Reported: 2015-07-16 13:54 PDT by Matthew Daiter
Modified: 2015-07-22 21:16 PDT (History)
7 users (show)

See Also:


Attachments
Patch (4.06 KB, patch)
2015-07-16 13:56 PDT, Matthew Daiter
no flags Details | Formatted Diff | Diff
Patch (4.05 KB, patch)
2015-07-16 14:11 PDT, Matthew Daiter
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Daiter 2015-07-16 13:54:59 PDT
Needed to add this, so that on instantiation a captureSource has a layer that it can send to whatever platform needs it.
Comment 1 Radar WebKit Bug Importer 2015-07-16 13:56:04 PDT
<rdar://problem/21861999>
Comment 2 Matthew Daiter 2015-07-16 13:56:58 PDT
Created attachment 256921 [details]
Patch
Comment 3 Eric Carlson 2015-07-16 14:08:09 PDT
Comment on attachment 256921 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=256921&action=review

> Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.h:49
> +    virtual AVCaptureVideoPreviewLayer* previewLayer() { return m_videoPreviewLayer.get(); }

Does this need to be virtual?

> Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.h:65
> +    WTF::RetainPtr<AVCaptureVideoPreviewLayer> m_videoPreviewLayer;

"WTF::" isn't needed.

> Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm:224
> +    m_videoPreviewLayer = [[AVCaptureVideoPreviewLayer alloc] initWithSession:session()];

You need to use adoptNS.
Comment 4 Matthew Daiter 2015-07-16 14:11:32 PDT
Created attachment 256923 [details]
Patch
Comment 5 Matthew Daiter 2015-07-16 14:11:57 PDT
Comment on attachment 256921 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=256921&action=review

>> Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.h:49
>> +    virtual AVCaptureVideoPreviewLayer* previewLayer() { return m_videoPreviewLayer.get(); }
> 
> Does this need to be virtual?

Fixed.

>> Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.h:65
>> +    WTF::RetainPtr<AVCaptureVideoPreviewLayer> m_videoPreviewLayer;
> 
> "WTF::" isn't needed.

Fixed.

>> Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm:224
>> +    m_videoPreviewLayer = [[AVCaptureVideoPreviewLayer alloc] initWithSession:session()];
> 
> You need to use adoptNS.

Fixed.
Comment 6 WebKit Commit Bot 2015-07-22 21:16:36 PDT
Comment on attachment 256923 [details]
Patch

Clearing flags on attachment: 256923

Committed r187208: <http://trac.webkit.org/changeset/187208>
Comment 7 WebKit Commit Bot 2015-07-22 21:16:39 PDT
All reviewed patches have been landed.  Closing bug.