From b76be3dfc52ee7eb508e2837c9d83c8f79a5cb26 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 28 Oct 2015 10:58:35 +0100 Subject: Support IOSurface frames MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Support getting video as IOSurface frames on OS X. With Chromium 45 we only get IOSurface frame when using non-default command-line flags. Change-Id: Ibf5226db53fa6fb51112bec9061d701918798ddd Reviewed-by: Michael BrĂ¼ning --- src/core/stream_video_node.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/core/stream_video_node.h') diff --git a/src/core/stream_video_node.h b/src/core/stream_video_node.h index bd2c3408a..92c640811 100644 --- a/src/core/stream_video_node.h +++ b/src/core/stream_video_node.h @@ -47,10 +47,12 @@ namespace QtWebEngineCore { // These classes duplicate, QtQuick style, the logic of GLRenderer::DrawStreamVideoQuad. // Their behavior should stay as close as possible to GLRenderer. +enum TextureTarget { ExternalTarget, RectangleTarget }; + class StreamVideoMaterial : public QSGMaterial { public: - StreamVideoMaterial(QSGTexture *texture); + StreamVideoMaterial(QSGTexture *texture, TextureTarget target); virtual QSGMaterialType *type() const Q_DECL_OVERRIDE { @@ -62,17 +64,19 @@ public: QSGTexture *m_texture; QMatrix4x4 m_texMatrix; + TextureTarget m_target; }; class StreamVideoNode : public QSGGeometryNode { public: - StreamVideoNode(QSGTexture *texture); + StreamVideoNode(QSGTexture *texture, bool flip, TextureTarget target); void setRect(const QRectF &rect); void setTextureMatrix(const QMatrix4x4 &matrix); private: QSGGeometry m_geometry; + bool m_flip; StreamVideoMaterial *m_material; }; -- cgit v1.2.3