diff options
author | Yoann Lopes <yoann.lopes@theqtcompany.com> | 2015-06-03 14:19:10 +0200 |
---|---|---|
committer | Yoann Lopes <yoann.lopes@theqtcompany.com> | 2015-08-07 17:35:12 +0000 |
commit | 3c54acb6f7ab082e3c7881701b84593c6372ef6c (patch) | |
tree | 2524d35b8733e7ffa86143c66635a21a3e38a999 /src/qtmultimediaquicktools | |
parent | bc9cfcd08acd439c85fee5ffa1a768f8aebeff6f (diff) |
Add new property to QVideoSurfaceFormat.
The 'mirrored' property indicates the QVideoFrames need to be mirrored
along their vertical axis. This is typically needed for video frames
coming from a front camera on a mobile device.
This is implemented as a string-based property. In Qt 5.6, this should
be replaced by a new public function.
Change-Id: Ideb7de81e83f66826f4efb5f2951c4beec13546b
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
Diffstat (limited to 'src/qtmultimediaquicktools')
-rw-r--r-- | src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp b/src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp index de4cabfaf..70d48dd97 100644 --- a/src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp +++ b/src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp @@ -255,6 +255,12 @@ void QDeclarativeVideoRendererBackend::updateGeometry() m_sourceTextureRect.setTop(m_sourceTextureRect.bottom()); m_sourceTextureRect.setBottom(top); } + + if (videoSurface()->surfaceFormat().property("mirrored").toBool()) { + qreal left = m_sourceTextureRect.left(); + m_sourceTextureRect.setLeft(m_sourceTextureRect.right()); + m_sourceTextureRect.setRight(left); + } } QSGNode *QDeclarativeVideoRendererBackend::updatePaintNode(QSGNode *oldNode, |