diff options
author | Liang Qi <liang.qi@qt.io> | 2017-11-20 13:17:23 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-11-20 13:17:23 +0100 |
commit | 45cbaf2a8158f5972e3362f7e777d3263d7c7916 (patch) | |
tree | 329c9ccd8d6bb9c2e11d98ed9149c714c04ca987 /src/qtmultimediaquicktools | |
parent | cf43124fcbea64f15f0800f090fdf885e08019c7 (diff) | |
parent | 5af70385a0b1a04e10d088f655ee33338ec014c5 (diff) | |
download | qtmultimedia-45cbaf2a8158f5972e3362f7e777d3263d7c7916.tar.gz |
Merge remote-tracking branch 'origin/5.10' into dev
Change-Id: Icaf645e271b21320c4cb6269178d9e722092a263
Diffstat (limited to 'src/qtmultimediaquicktools')
-rw-r--r-- | src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp | 9 |
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:" |