diff options
author | Andrew Knight <andrew.knight@digia.com> | 2014-12-11 09:48:52 +0200 |
---|---|---|
committer | Yoann Lopes <yoann.lopes@theqtcompany.com> | 2014-12-11 16:48:38 +0100 |
commit | 791febc1d3bfc1ec39f4379214ec5fb473ddaeb5 (patch) | |
tree | 05845504e307a21de0773a66742255e18c7d378b /src/plugins/winrt/qwinrtabstractvideorenderercontrol.h | |
parent | 2b181d546970d18a48a0f36f5d1a22418b61cd4d (diff) |
winrt: Fix camera auto rotation
There is no Windows Runtime API to find the camera sensor rotation, so
assume that phones always have a camera mounting of 270 degrees. Tablet
and webcams remain mounted at the default (0 degrees). As the frame is not
flipped automatically by the system, the scan line direction is set to
BottomToTop for front-facing cameras to achieve compatibility with
other platforms.
Task-number: QTBUG-41066
Change-Id: Icf17ecd4aca9fa9d5b24d94e5b21b63ee6f21f28
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
Diffstat (limited to 'src/plugins/winrt/qwinrtabstractvideorenderercontrol.h')
-rw-r--r-- | src/plugins/winrt/qwinrtabstractvideorenderercontrol.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/winrt/qwinrtabstractvideorenderercontrol.h b/src/plugins/winrt/qwinrtabstractvideorenderercontrol.h index 86a7b15f9..b06b18a2a 100644 --- a/src/plugins/winrt/qwinrtabstractvideorenderercontrol.h +++ b/src/plugins/winrt/qwinrtabstractvideorenderercontrol.h @@ -43,6 +43,7 @@ #define QWINRTABSTRACTVIDEORENDERERCONTROL_H #include <QtMultimedia/QVideoRendererControl> +#include <QtMultimedia/QVideoSurfaceFormat> struct ID3D11Device; struct ID3D11Texture2D; @@ -63,6 +64,8 @@ public: QSize size() const; void setSize(const QSize &size); + void setScanLineDirection(QVideoSurfaceFormat::Direction direction); + void setActive(bool active); virtual bool render(ID3D11Texture2D *texture) = 0; |