diff options
author | Liang Qi <liang.qi@qt.io> | 2017-11-15 09:10:51 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-11-15 09:10:51 +0100 |
commit | 2e1c8dc10549da91cae75dddc3801fc8ed85fbcb (patch) | |
tree | 2b709c7cbd6942dd3aadf7228a7338eb8b95549b /src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp | |
parent | e3cf8e4da46302039d5c5eabb7baa2ffcfe3374d (diff) | |
parent | cf4cc30da4566c1b8a86ee5688383f90eaf0e967 (diff) | |
download | qtmultimedia-2e1c8dc10549da91cae75dddc3801fc8ed85fbcb.tar.gz |
Merge remote-tracking branch 'origin/5.9' into 5.10
Change-Id: I0e525d0cc7f4e4b776e5a536e2bf9b2c66be5429
Diffstat (limited to 'src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp')
-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 412694cc3..f1b7662b5 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:" |