diff -r 2b40d63a9c3d -r 90517678cc4f qtmobility/src/multimedia/qvideowidget_p.h --- a/qtmobility/src/multimedia/qvideowidget_p.h Fri Apr 16 15:51:22 2010 +0300 +++ b/qtmobility/src/multimedia/qvideowidget_p.h Mon May 03 13:18:40 2010 +0300 @@ -54,13 +54,13 @@ // #include -#include +#include "qvideowidget.h" #ifndef QT_NO_OPENGL #include #endif -#include +#include "qpaintervideosurface_p.h" QTM_BEGIN_NAMESPACE @@ -76,8 +76,8 @@ virtual void setFullScreen(bool fullScreen) = 0; - virtual QVideoWidget::AspectRatioMode aspectRatioMode() const = 0; - virtual void setAspectRatioMode(QVideoWidget::AspectRatioMode mode) = 0; + virtual Qt::AspectRatioMode aspectRatioMode() const = 0; + virtual void setAspectRatioMode(Qt::AspectRatioMode mode) = 0; }; class QVideoWidgetBackend : public QObject, public QVideoWidgetControlInterface @@ -108,8 +108,8 @@ void setFullScreen(bool fullScreen); - QVideoWidget::AspectRatioMode aspectRatioMode() const; - void setAspectRatioMode(QVideoWidget::AspectRatioMode mode); + Qt::AspectRatioMode aspectRatioMode() const; + void setAspectRatioMode(Qt::AspectRatioMode mode); private: QVideoWidgetControl *m_widgetControl; @@ -134,8 +134,8 @@ void setFullScreen(bool fullScreen); - QVideoWidget::AspectRatioMode aspectRatioMode() const; - void setAspectRatioMode(QVideoWidget::AspectRatioMode mode); + Qt::AspectRatioMode aspectRatioMode() const; + void setAspectRatioMode(Qt::AspectRatioMode mode); QSize sizeHint() const; @@ -152,14 +152,20 @@ void hueChanged(int hue); void saturationChanged(int saturation); +private Q_SLOTS: + void formatChanged(const QVideoSurfaceFormat &format); + void frameChanged(); + private: - QRect displayRect() const; + void updateRects(); QVideoRendererControl *m_rendererControl; QWidget *m_widget; QPainterVideoSurface *m_surface; - QVideoWidget::AspectRatioMode m_aspectRatioMode; - QSize m_aspectRatio; + Qt::AspectRatioMode m_aspectRatioMode; + QRect m_boundingRect; + QRectF m_sourceRect; + QSize m_nativeSize; bool m_updatePaintDevice; }; @@ -179,8 +185,8 @@ void setFullScreen(bool fullScreen); - QVideoWidget::AspectRatioMode aspectRatioMode() const; - void setAspectRatioMode(QVideoWidget::AspectRatioMode mode); + Qt::AspectRatioMode aspectRatioMode() const; + void setAspectRatioMode(Qt::AspectRatioMode mode); QSize sizeHint() const; @@ -193,7 +199,7 @@ private: QVideoWindowControl *m_windowControl; QWidget *m_widget; - QVideoWidget::AspectRatioMode m_aspectRatioMode; + Qt::AspectRatioMode m_aspectRatioMode; QSize m_pixelAspectRatio; }; @@ -218,7 +224,7 @@ , contrast(0) , hue(0) , saturation(0) - , aspectRatioMode(QVideoWidget::KeepAspectRatio) + , aspectRatioMode(Qt::KeepAspectRatio) , nonFullScreenFlags(0) , wasFullScreen(false) { @@ -237,7 +243,7 @@ int contrast; int hue; int saturation; - QVideoWidget::AspectRatioMode aspectRatioMode; + Qt::AspectRatioMode aspectRatioMode; Qt::WindowFlags nonFullScreenFlags; bool wasFullScreen;