diff options
-rw-r--r-- | src/multimediaquick/qquickvideooutput.cpp | 45 | ||||
-rw-r--r-- | src/multimediaquick/qquickvideooutput_p.h | 8 |
2 files changed, 0 insertions, 53 deletions
diff --git a/src/multimediaquick/qquickvideooutput.cpp b/src/multimediaquick/qquickvideooutput.cpp index e18bfccb5..988b77c88 100644 --- a/src/multimediaquick/qquickvideooutput.cpp +++ b/src/multimediaquick/qquickvideooutput.cpp @@ -267,11 +267,6 @@ void QQuickVideoOutput::_q_updateGeometry() emit contentRectChanged(); } -void QQuickVideoOutput::_q_screenOrientationChanged(int orientation) -{ - setOrientation(orientation % 360); -} - /*! \qmlproperty int QtMultimedia::VideoOutput::orientation @@ -336,46 +331,6 @@ void QQuickVideoOutput::setOrientation(int orientation) } /*! - \qmlproperty bool QtMultimedia::VideoOutput::autoOrientation - - This property allows you to enable and disable auto orientation - of the video stream, so that its orientation always matches - the orientation of the screen. If \c autoOrientation is enabled, - the \c orientation property is overwritten. - - By default \c autoOrientation is disabled. - - \sa orientation - \since 5.2 -*/ -bool QQuickVideoOutput::autoOrientation() const -{ - return m_autoOrientation; -} - -void QQuickVideoOutput::setAutoOrientation(bool autoOrientation) -{ - if (autoOrientation == m_autoOrientation) - return; - - m_autoOrientation = autoOrientation; - if (m_autoOrientation) { - m_screenOrientationHandler = new QVideoOutputOrientationHandler(this); - connect(m_screenOrientationHandler, SIGNAL(orientationChanged(int)), - this, SLOT(_q_screenOrientationChanged(int))); - - _q_screenOrientationChanged(m_screenOrientationHandler->currentOrientation()); - } else { - disconnect(m_screenOrientationHandler, SIGNAL(orientationChanged(int)), - this, SLOT(_q_screenOrientationChanged(int))); - m_screenOrientationHandler->deleteLater(); - m_screenOrientationHandler = nullptr; - } - - emit autoOrientationChanged(); -} - -/*! \qmlproperty rectangle QtMultimedia::VideoOutput::contentRect This property holds the item coordinates of the area that diff --git a/src/multimediaquick/qquickvideooutput_p.h b/src/multimediaquick/qquickvideooutput_p.h index 95c6966e8..07de752ef 100644 --- a/src/multimediaquick/qquickvideooutput_p.h +++ b/src/multimediaquick/qquickvideooutput_p.h @@ -74,7 +74,6 @@ class Q_MULTIMEDIAQUICK_EXPORT QQuickVideoOutput : public QQuickItem Q_DISABLE_COPY(QQuickVideoOutput) Q_PROPERTY(FillMode fillMode READ fillMode WRITE setFillMode NOTIFY fillModeChanged) Q_PROPERTY(int orientation READ orientation WRITE setOrientation NOTIFY orientationChanged) - Q_PROPERTY(bool autoOrientation READ autoOrientation WRITE setAutoOrientation NOTIFY autoOrientationChanged) Q_PROPERTY(QRectF sourceRect READ sourceRect NOTIFY sourceRectChanged) Q_PROPERTY(QRectF contentRect READ contentRect NOTIFY contentRectChanged) Q_PROPERTY(QVideoSink* videoSink READ videoSink CONSTANT) @@ -103,9 +102,6 @@ public: int orientation() const; void setOrientation(int); - bool autoOrientation() const; - void setAutoOrientation(bool); - QRectF sourceRect() const; QRectF contentRect() const; @@ -113,7 +109,6 @@ Q_SIGNALS: void sourceChanged(); void fillModeChanged(QQuickVideoOutput::FillMode); void orientationChanged(); - void autoOrientationChanged(); void sourceRectChanged(); void contentRectChanged(); @@ -139,7 +134,6 @@ private: private Q_SLOTS: void _q_newFrame(const QVideoFrame &); void _q_updateGeometry(); - void _q_screenOrientationChanged(int); void _q_invalidateSceneGraph(); void _q_sceneGraphInitialized(); @@ -150,8 +144,6 @@ private: QRectF m_lastRect; // Cache of last rect to avoid recalculating geometry QRectF m_contentRect; // Destination pixel coordinates, unclipped int m_orientation = 0; - bool m_autoOrientation = false; - QVideoOutputOrientationHandler *m_screenOrientationHandler = nullptr; Qt::AspectRatioMode m_aspectRatioMode = Qt::KeepAspectRatio; QPointer<QQuickWindow> m_window; |