summaryrefslogtreecommitdiffstats
path: root/src/qtmultimediaquicktools
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-11-20 13:17:23 +0100
committerLiang Qi <liang.qi@qt.io>2017-11-20 13:17:23 +0100
commit45cbaf2a8158f5972e3362f7e777d3263d7c7916 (patch)
tree329c9ccd8d6bb9c2e11d98ed9149c714c04ca987 /src/qtmultimediaquicktools
parentcf43124fcbea64f15f0800f090fdf885e08019c7 (diff)
parent5af70385a0b1a04e10d088f655ee33338ec014c5 (diff)
Merge remote-tracking branch 'origin/5.10' into dev
Diffstat (limited to 'src/qtmultimediaquicktools')
-rw-r--r--src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp b/src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp
index 8cd331495..7030b3357 100644
--- a/src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp
+++ b/src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp
@@ -335,7 +335,14 @@ QSGNode *QDeclarativeVideoRendererBackend::updatePaintNode(QSGNode *oldNode,
for (QSGVideoNodeFactoryInterface* factory : qAsConst(m_videoNodeFactories)) {
// Get a node that supports our frame. The surface is irrelevant, our
// QSGVideoItemSurface supports (logically) anything.
- videoNode = factory->createNode(QVideoSurfaceFormat(m_frame.size(), m_frame.pixelFormat(), m_frame.handleType()));
+ QVideoSurfaceFormat nodeFormat(m_frame.size(), m_frame.pixelFormat(), m_frame.handleType());
+ const QVideoSurfaceFormat surfaceFormat = m_surface->surfaceFormat();
+ nodeFormat.setYCbCrColorSpace(surfaceFormat.yCbCrColorSpace());
+ nodeFormat.setPixelAspectRatio(surfaceFormat.pixelAspectRatio());
+ nodeFormat.setScanLineDirection(surfaceFormat.scanLineDirection());
+ nodeFormat.setViewport(surfaceFormat.viewport());
+ nodeFormat.setFrameRate(surfaceFormat.frameRate());
+ videoNode = factory->createNode(nodeFormat);
if (videoNode) {
qCDebug(qLcVideo) << "updatePaintNode: Video node created. Handle type:" << m_frame.handleType()
<< " Supported formats for the handle by this node:"