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 | |
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')
10 files changed, 39 insertions, 39 deletions
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/vmr9videowindowcontrol.cpp b/src/plugins/mediaservices/directshow/mediaplayer/vmr9videowindowcontrol.cpp index b1ddd98..4b9aeb8 100644 --- a/src/plugins/mediaservices/directshow/mediaplayer/vmr9videowindowcontrol.cpp +++ b/src/plugins/mediaservices/directshow/mediaplayer/vmr9videowindowcontrol.cpp @@ -162,30 +162,30 @@ QSize Vmr9VideoWindowControl::nativeSize() const return size; } -QVideoWidget::AspectRatioMode Vmr9VideoWindowControl::aspectRatioMode() const +Qt::AspectRatioMode Vmr9VideoWindowControl::aspectRatioMode() const { - QVideoWidget::AspectRatioMode mode = QVideoWidget::KeepAspectRatio; + Qt::AspectRatioMode mode = Qt::KeepAspectRatio; if (IVMRWindowlessControl9 *control = com_cast<IVMRWindowlessControl9>( m_filter, IID_IVMRWindowlessControl9)) { DWORD arMode; if (control->GetAspectRatioMode(&arMode) == S_OK && arMode == VMR9ARMode_None) - mode = QVideoWidget::IgnoreAspectRatio; + mode = Qt::IgnoreAspectRatio; control->Release(); } return mode; } -void Vmr9VideoWindowControl::setAspectRatioMode(QVideoWidget::AspectRatioMode mode) +void Vmr9VideoWindowControl::setAspectRatioMode(Qt::AspectRatioMode mode) { if (IVMRWindowlessControl9 *control = com_cast<IVMRWindowlessControl9>( m_filter, IID_IVMRWindowlessControl9)) { switch (mode) { - case QVideoWidget::IgnoreAspectRatio: + case Qt::IgnoreAspectRatio: control->SetAspectRatioMode(VMR9ARMode_None); break; - case QVideoWidget::KeepAspectRatio: + case Qt::KeepAspectRatio: control->SetAspectRatioMode(VMR9ARMode_LetterBox); break; default: diff --git a/src/plugins/mediaservices/directshow/mediaplayer/vmr9videowindowcontrol.h b/src/plugins/mediaservices/directshow/mediaplayer/vmr9videowindowcontrol.h index a0aca95..bf4fb42 100644 --- a/src/plugins/mediaservices/directshow/mediaplayer/vmr9videowindowcontrol.h +++ b/src/plugins/mediaservices/directshow/mediaplayer/vmr9videowindowcontrol.h @@ -75,8 +75,8 @@ public: QSize nativeSize() const; - QVideoWidget::AspectRatioMode aspectRatioMode() const; - void setAspectRatioMode(QVideoWidget::AspectRatioMode mode); + Qt::AspectRatioMode aspectRatioMode() const; + void setAspectRatioMode(Qt::AspectRatioMode mode); int brightness() const; void setBrightness(int brightness); 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; }; diff --git a/src/plugins/mediaservices/qt7/qt7movievideowidget.h b/src/plugins/mediaservices/qt7/qt7movievideowidget.h index 558c3d7..7908efd 100644 --- a/src/plugins/mediaservices/qt7/qt7movievideowidget.h +++ b/src/plugins/mediaservices/qt7/qt7movievideowidget.h @@ -83,8 +83,8 @@ public: QSize nativeSize() const; - QVideoWidget::AspectRatioMode aspectRatioMode() const; - void setAspectRatioMode(QVideoWidget::AspectRatioMode mode); + Qt::AspectRatioMode aspectRatioMode() const; + void setAspectRatioMode(Qt::AspectRatioMode mode); int brightness() const; void setBrightness(int brightness); @@ -118,7 +118,7 @@ private: bool m_fullscreen; QSize m_nativeSize; - QVideoWidget::AspectRatioMode m_aspectRatioMode; + Qt::AspectRatioMode m_aspectRatioMode; int m_brightness; int m_contrast; int m_hue; diff --git a/src/plugins/mediaservices/qt7/qt7movievideowidget.mm b/src/plugins/mediaservices/qt7/qt7movievideowidget.mm index 00ceffc..197c26e 100644 --- a/src/plugins/mediaservices/qt7/qt7movievideowidget.mm +++ b/src/plugins/mediaservices/qt7/qt7movievideowidget.mm @@ -66,7 +66,7 @@ public: : QGLWidget(format, parent), m_texRef(0), m_nativeSize(640,480), - m_aspectRatioMode(QVideoWidget::KeepAspectRatio) + m_aspectRatioMode(Qt::KeepAspectRatio) { setAutoFillBackground(false); } @@ -145,7 +145,7 @@ public: m_nativeSize = size; } - void setAspectRatioMode(QVideoWidget::AspectRatioMode mode) + void setAspectRatioMode(Qt::AspectRatioMode mode) { if (m_aspectRatioMode != mode) { m_aspectRatioMode = mode; @@ -158,7 +158,7 @@ private: { QRect displayRect = rect(); - if (m_aspectRatioMode == QVideoWidget::KeepAspectRatio) { + if (m_aspectRatioMode == Qt::KeepAspectRatio) { QSize size = m_nativeSize; size.scale(displayRect.size(), Qt::KeepAspectRatio); @@ -170,7 +170,7 @@ private: CVOpenGLTextureRef m_texRef; QSize m_nativeSize; - QVideoWidget::AspectRatioMode m_aspectRatioMode; + Qt::AspectRatioMode m_aspectRatioMode; }; QT7MovieVideoWidget::QT7MovieVideoWidget(QObject *parent) @@ -178,7 +178,7 @@ QT7MovieVideoWidget::QT7MovieVideoWidget(QObject *parent) m_movie(0), m_videoWidget(0), m_fullscreen(false), - m_aspectRatioMode(QVideoWidget::KeepAspectRatio), + m_aspectRatioMode(Qt::KeepAspectRatio), m_brightness(0), m_contrast(0), m_hue(0), @@ -324,12 +324,12 @@ QSize QT7MovieVideoWidget::nativeSize() const return m_nativeSize; } -QVideoWidget::AspectRatioMode QT7MovieVideoWidget::aspectRatioMode() const +Qt::AspectRatioMode QT7MovieVideoWidget::aspectRatioMode() const { return m_aspectRatioMode; } -void QT7MovieVideoWidget::setAspectRatioMode(QVideoWidget::AspectRatioMode mode) +void QT7MovieVideoWidget::setAspectRatioMode(Qt::AspectRatioMode mode) { m_aspectRatioMode = mode; m_videoWidget->setAspectRatioMode(mode); diff --git a/src/plugins/mediaservices/qt7/qt7movieviewoutput.h b/src/plugins/mediaservices/qt7/qt7movieviewoutput.h index 30eefa7..31a0314 100644 --- a/src/plugins/mediaservices/qt7/qt7movieviewoutput.h +++ b/src/plugins/mediaservices/qt7/qt7movieviewoutput.h @@ -80,8 +80,8 @@ public: QSize nativeSize() const; - QVideoWidget::AspectRatioMode aspectRatioMode() const; - void setAspectRatioMode(QVideoWidget::AspectRatioMode mode); + Qt::AspectRatioMode aspectRatioMode() const; + void setAspectRatioMode(Qt::AspectRatioMode mode); int brightness() const; void setBrightness(int brightness); @@ -105,7 +105,7 @@ private: QRect m_displayRect; bool m_fullscreen; QSize m_nativeSize; - QVideoWidget::AspectRatioMode m_aspectRatioMode; + Qt::AspectRatioMode m_aspectRatioMode; int m_brightness; int m_contrast; int m_hue; diff --git a/src/plugins/mediaservices/qt7/qt7movieviewoutput.mm b/src/plugins/mediaservices/qt7/qt7movieviewoutput.mm index 254af46..d8dbf9b 100644 --- a/src/plugins/mediaservices/qt7/qt7movieviewoutput.mm +++ b/src/plugins/mediaservices/qt7/qt7movieviewoutput.mm @@ -156,7 +156,7 @@ QT7MovieViewOutput::QT7MovieViewOutput(QObject *parent) m_movieView(0), m_winId(0), m_fullscreen(false), - m_aspectRatioMode(QVideoWidget::KeepAspectRatio), + m_aspectRatioMode(Qt::KeepAspectRatio), m_brightness(0), m_contrast(0), m_hue(0), @@ -230,7 +230,7 @@ void QT7MovieViewOutput::setDisplayRect(const QRect &rect) if (m_movieView) { AutoReleasePool pool; - [(QTMovieView*)m_movieView setPreservesAspectRatio:(m_aspectRatioMode == QVideoWidget::KeepAspectRatio ? YES : NO)]; + [(QTMovieView*)m_movieView setPreservesAspectRatio:(m_aspectRatioMode == Qt::KeepAspectRatio ? YES : NO)]; [(QTMovieView*)m_movieView setFrame:NSMakeRect(m_displayRect.x(), m_displayRect.y(), m_displayRect.width(), @@ -259,12 +259,12 @@ QSize QT7MovieViewOutput::nativeSize() const return m_nativeSize; } -QVideoWidget::AspectRatioMode QT7MovieViewOutput::aspectRatioMode() const +Qt::AspectRatioMode QT7MovieViewOutput::aspectRatioMode() const { return m_aspectRatioMode; } -void QT7MovieViewOutput::setAspectRatioMode(QVideoWidget::AspectRatioMode mode) +void QT7MovieViewOutput::setAspectRatioMode(Qt::AspectRatioMode mode) { m_aspectRatioMode = mode; setDisplayRect(m_displayRect); |