Title: [187208] trunk/Source/WebCore
- Revision
- 187208
- Author
- commit-qu...@webkit.org
- Date
- 2015-07-22 21:15:15 -0700 (Wed, 22 Jul 2015)
Log Message
Needed to add methods to get PreviewCaptureLayers from Video
https://bugs.webkit.org/show_bug.cgi?id=147011
<rdar://problem/21861999>
Patch by Matthew Daiter <mdai...@apple.com> on 2015-07-22
Reviewed by Jer Noble.
* platform/mediastream/mac/AVVideoCaptureSource.h: Added in preview
layer to class
(WebCore::AVVideoCaptureSource::previewLayer):
* platform/mediastream/mac/AVVideoCaptureSource.mm: Instantiate
previewLayer on load
(WebCore::AVVideoCaptureSource::setupCaptureSession):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (187207 => 187208)
--- trunk/Source/WebCore/ChangeLog 2015-07-23 03:54:33 UTC (rev 187207)
+++ trunk/Source/WebCore/ChangeLog 2015-07-23 04:15:15 UTC (rev 187208)
@@ -1,3 +1,18 @@
+2015-07-22 Matthew Daiter <mdai...@apple.com>
+
+ Needed to add methods to get PreviewCaptureLayers from Video
+ https://bugs.webkit.org/show_bug.cgi?id=147011
+ <rdar://problem/21861999>
+
+ Reviewed by Jer Noble.
+
+ * platform/mediastream/mac/AVVideoCaptureSource.h: Added in preview
+ layer to class
+ (WebCore::AVVideoCaptureSource::previewLayer):
+ * platform/mediastream/mac/AVVideoCaptureSource.mm: Instantiate
+ previewLayer on load
+ (WebCore::AVVideoCaptureSource::setupCaptureSession):
+
2015-07-22 Sungmann Cho <sungmann....@navercorp.com>
[EFL] The "Missing Plug-in" buttons are not showing up on some flash contents
Modified: trunk/Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.h (187207 => 187208)
--- trunk/Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.h 2015-07-23 03:54:33 UTC (rev 187207)
+++ trunk/Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.h 2015-07-23 04:15:15 UTC (rev 187208)
@@ -30,6 +30,8 @@
#include "AVMediaCaptureSource.h"
+OBJC_CLASS AVCaptureVideoPreviewLayer;
+
typedef const struct opaqueCMFormatDescription *CMFormatDescriptionRef;
namespace WebCore {
@@ -44,6 +46,8 @@
virtual int32_t width() const { return m_width; }
virtual int32_t height() const { return m_height; }
+ AVCaptureVideoPreviewLayer* previewLayer() { return m_videoPreviewLayer.get(); }
+
private:
AVVideoCaptureSource(AVCaptureDevice*, const AtomicString&, PassRefPtr<MediaConstraints>);
virtual ~AVVideoCaptureSource();
@@ -58,6 +62,7 @@
RetainPtr<AVCaptureConnection> m_videoConnection;
RetainPtr<CMFormatDescriptionRef> m_videoFormatDescription;
+ RetainPtr<AVCaptureVideoPreviewLayer> m_videoPreviewLayer;
Vector<Float64> m_videoFrameTimeStamps;
Float64 m_frameRate;
int32_t m_width;
Modified: trunk/Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm (187207 => 187208)
--- trunk/Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm 2015-07-23 03:54:33 UTC (rev 187207)
+++ trunk/Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm 2015-07-23 04:15:15 UTC (rev 187208)
@@ -45,6 +45,7 @@
typedef AVCaptureDeviceInput AVCaptureDeviceInputType;
typedef AVCaptureOutput AVCaptureOutputType;
typedef AVCaptureVideoDataOutput AVCaptureVideoDataOutputType;
+typedef AVCaptureVideoPreviewLayer AVCaptureVideoPreviewLayerType;
SOFT_LINK_FRAMEWORK_OPTIONAL(AVFoundation)
@@ -53,12 +54,14 @@
SOFT_LINK_CLASS(AVFoundation, AVCaptureDeviceInput)
SOFT_LINK_CLASS(AVFoundation, AVCaptureOutput)
SOFT_LINK_CLASS(AVFoundation, AVCaptureVideoDataOutput)
+SOFT_LINK_CLASS(AVFoundation, AVCaptureVideoPreviewLayer)
#define AVCaptureConnection getAVCaptureConnectionClass()
#define AVCaptureDevice getAVCaptureDeviceClass()
#define AVCaptureDeviceInput getAVCaptureDeviceInputClass()
#define AVCaptureOutput getAVCaptureOutputClass()
#define AVCaptureVideoDataOutput getAVCaptureVideoDataOutputClass()
+#define AVCaptureVideoPreviewLayer getAVCaptureVideoPreviewLayerClass()
SOFT_LINK_POINTER(AVFoundation, AVMediaTypeAudio, NSString *)
SOFT_LINK_POINTER(AVFoundation, AVMediaTypeVideo, NSString *)
@@ -217,6 +220,8 @@
[session() addOutput:videoOutput.get()];
m_videoConnection = adoptNS([videoOutput.get() connectionWithMediaType:AVMediaTypeVideo]);
+
+ m_videoPreviewLayer = adoptNS([[AVCaptureVideoPreviewLayer alloc] initWithSession:session()]);
}
void AVVideoCaptureSource::calculateFramerate(CMSampleBufferRef sampleBuffer)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes