summaryrefslogtreecommitdiffstats
path: root/src/core/stream_video_node.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-10-28 10:58:35 +0100
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-10-28 12:26:52 +0000
commitb76be3dfc52ee7eb508e2837c9d83c8f79a5cb26 (patch)
treec4f5103ae55c7a8ae71f99ba2229cfd2fc63ae20 /src/core/stream_video_node.h
parent2cb021c2978d5d8ab5ba565f10d9eddc27c6347f (diff)
Support IOSurface frames
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 <michael.bruning@theqtcompany.com>
Diffstat (limited to 'src/core/stream_video_node.h')
-rw-r--r--src/core/stream_video_node.h8
1 files changed, 6 insertions, 2 deletions
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;
};