diff options
author | Andrew den Exter <andrew.den-exter@nokia.com> | 2010-03-18 05:09:01 (GMT) |
---|---|---|
committer | Andrew den Exter <andrew.den-exter@nokia.com> | 2010-03-18 05:10:46 (GMT) |
commit | 00dea4c917e8bbc598ba5a5afe90280fd4e5bf8a (patch) | |
tree | c76cd7e711773a5f6104425fd86c9b9f71ac27d1 /src/plugins/mediaservices/gstreamer | |
parent | 19c41b7de6596453f16d52f05953b153cd40e36e (diff) | |
download | Qt-00dea4c917e8bbc598ba5a5afe90280fd4e5bf8a.zip Qt-00dea4c917e8bbc598ba5a5afe90280fd4e5bf8a.tar.gz Qt-00dea4c917e8bbc598ba5a5afe90280fd4e5bf8a.tar.bz2 |
Replace AspectRatioMode enum from QVideoWidget with Qt::AspectRatioMode.
Task-number: QTBUG-9118
Reviewed-by: Dmytro Poplavskiy
Diffstat (limited to 'src/plugins/mediaservices/gstreamer')
4 files changed, 14 insertions, 14 deletions
diff --git a/src/plugins/mediaservices/gstreamer/qgstreamervideooverlay.cpp b/src/plugins/mediaservices/gstreamer/qgstreamervideooverlay.cpp index 846a24a..427d514 100644 --- a/src/plugins/mediaservices/gstreamer/qgstreamervideooverlay.cpp +++ b/src/plugins/mediaservices/gstreamer/qgstreamervideooverlay.cpp @@ -52,7 +52,7 @@ QGstreamerVideoOverlay::QGstreamerVideoOverlay(QObject *parent) : QVideoWindowControl(parent) , m_surface(new QX11VideoSurface) , m_videoSink(reinterpret_cast<GstElement*>(QVideoSurfaceGstSink::createSink(m_surface))) - , m_aspectRatioMode(QVideoWidget::KeepAspectRatio) + , m_aspectRatioMode(Qt::KeepAspectRatio) , m_fullScreen(false) { if (m_videoSink) { @@ -94,12 +94,12 @@ void QGstreamerVideoOverlay::setDisplayRect(const QRect &rect) setScaledDisplayRect(); } -QVideoWidget::AspectRatioMode QGstreamerVideoOverlay::aspectRatioMode() const +Qt::AspectRatioMode QGstreamerVideoOverlay::aspectRatioMode() const { return m_aspectRatioMode; } -void QGstreamerVideoOverlay::setAspectRatioMode(QVideoWidget::AspectRatioMode mode) +void QGstreamerVideoOverlay::setAspectRatioMode(Qt::AspectRatioMode mode) { m_aspectRatioMode = mode; @@ -193,7 +193,7 @@ void QGstreamerVideoOverlay::surfaceFormatChanged() void QGstreamerVideoOverlay::setScaledDisplayRect() { switch (m_aspectRatioMode) { - case QVideoWidget::KeepAspectRatio: + case Qt::KeepAspectRatio: { QSize size = m_surface->surfaceFormat().viewport().size(); @@ -205,7 +205,7 @@ void QGstreamerVideoOverlay::setScaledDisplayRect() m_surface->setDisplayRect(rect); } break; - case QVideoWidget::IgnoreAspectRatio: + case Qt::IgnoreAspectRatio: m_surface->setDisplayRect(m_displayRect); break; }; diff --git a/src/plugins/mediaservices/gstreamer/qgstreamervideooverlay.h b/src/plugins/mediaservices/gstreamer/qgstreamervideooverlay.h index 9566949..1188074 100644 --- a/src/plugins/mediaservices/gstreamer/qgstreamervideooverlay.h +++ b/src/plugins/mediaservices/gstreamer/qgstreamervideooverlay.h @@ -73,8 +73,8 @@ public: QSize nativeSize() const; - QVideoWidget::AspectRatioMode aspectRatioMode() const; - void setAspectRatioMode(QVideoWidget::AspectRatioMode mode); + Qt::AspectRatioMode aspectRatioMode() const; + void setAspectRatioMode(Qt::AspectRatioMode mode); void repaint(); @@ -102,7 +102,7 @@ private: QX11VideoSurface *m_surface; GstElement *m_videoSink; - QVideoWidget::AspectRatioMode m_aspectRatioMode; + Qt::AspectRatioMode m_aspectRatioMode; QRect m_displayRect; bool m_fullScreen; }; diff --git a/src/plugins/mediaservices/gstreamer/qgstreamervideowidget.cpp b/src/plugins/mediaservices/gstreamer/qgstreamervideowidget.cpp index 8307aa5..763f7f1 100644 --- a/src/plugins/mediaservices/gstreamer/qgstreamervideowidget.cpp +++ b/src/plugins/mediaservices/gstreamer/qgstreamervideowidget.cpp @@ -233,17 +233,17 @@ QWidget *QGstreamerVideoWidgetControl::videoWidget() return m_widget; } -QVideoWidget::AspectRatioMode QGstreamerVideoWidgetControl::aspectRatioMode() const +Qt::AspectRatioMode QGstreamerVideoWidgetControl::aspectRatioMode() const { return m_aspectRatioMode; } -void QGstreamerVideoWidgetControl::setAspectRatioMode(QVideoWidget::AspectRatioMode mode) +void QGstreamerVideoWidgetControl::setAspectRatioMode(Qt::AspectRatioMode mode) { if (m_videoSink) { g_object_set(G_OBJECT(m_videoSink), "force-aspect-ratio", - (mode == QVideoWidget::KeepAspectRatio), + (mode == Qt::KeepAspectRatio), (const char*)NULL); } diff --git a/src/plugins/mediaservices/gstreamer/qgstreamervideowidget.h b/src/plugins/mediaservices/gstreamer/qgstreamervideowidget.h index 6a4c0f3..28b48af 100644 --- a/src/plugins/mediaservices/gstreamer/qgstreamervideowidget.h +++ b/src/plugins/mediaservices/gstreamer/qgstreamervideowidget.h @@ -67,8 +67,8 @@ public: QWidget *videoWidget(); - QVideoWidget::AspectRatioMode aspectRatioMode() const; - void setAspectRatioMode(QVideoWidget::AspectRatioMode mode); + Qt::AspectRatioMode aspectRatioMode() const; + void setAspectRatioMode(Qt::AspectRatioMode mode); bool isFullScreen() const; void setFullScreen(bool fullScreen); @@ -99,7 +99,7 @@ private: GstElement *m_videoSink; QGstreamerVideoWidget *m_widget; WId m_windowId; - QVideoWidget::AspectRatioMode m_aspectRatioMode; + Qt::AspectRatioMode m_aspectRatioMode; bool m_fullScreen; }; |