VideoOutput: take the video format's scanLineDirection into account.
authorYoann Lopes <yoann.lopes@digia.com>
Fri, 27 Sep 2013 10:09:32 +0000 (12:09 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 27 Sep 2013 09:54:41 +0000 (11:54 +0200)
Task-number: QTBUG-30442
Change-Id: Ic950d66cb35a937ccf3862089e0060819b6d6f34
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
src/imports/multimedia/qdeclarativevideooutput_render.cpp

index 96b979b..002f50a 100644 (file)
@@ -174,6 +174,12 @@ void QDeclarativeVideoRendererBackend::updateGeometry()
                                          totalHeight, totalWidth);
         }
     }
+
+    if (videoSurface()->surfaceFormat().scanLineDirection() == QVideoSurfaceFormat::BottomToTop) {
+        qreal top = m_sourceTextureRect.top();
+        m_sourceTextureRect.setTop(m_sourceTextureRect.bottom());
+        m_sourceTextureRect.setBottom(top);
+    }
 }
 
 QSGNode *QDeclarativeVideoRendererBackend::updatePaintNode(QSGNode *oldNode,