--- a/src/3rdparty/phonon/mmf/videooutput.h Tue Jan 26 12:42:25 2010 +0200
+++ b/src/3rdparty/phonon/mmf/videooutput.h Tue Feb 02 00:43:10 2010 +0200
@@ -24,24 +24,55 @@
#include <QRect>
#include "defs.h"
+#include <Phonon/VideoWidget>
+
+#include <e32std.h>
+class RWindowBase;
+
QT_BEGIN_NAMESPACE
namespace Phonon
{
namespace MMF
{
-class VideoOutputObserver;
+class AncestorMoveMonitor;
class VideoOutput : public QWidget
{
Q_OBJECT
public:
- explicit VideoOutput(QWidget* parent);
+ VideoOutput(AncestorMoveMonitor* ancestorMoveMonitor, QWidget* parent);
~VideoOutput();
- void setFrameSize(const QSize& size);
- void setObserver(VideoOutputObserver* observer);
+ // Set size of video frame. Called by VideoPlayer.
+ void setVideoSize(const QSize& size);
+
+ RWindowBase* videoWindow();
+ const QRect& videoWindowRect() const;
+
+ Phonon::VideoWidget::AspectRatio aspectRatio() const;
+ void setAspectRatio(Phonon::VideoWidget::AspectRatio aspectRatio);
+
+ Phonon::VideoWidget::ScaleMode scaleMode() const;
+ void setScaleMode(Phonon::VideoWidget::ScaleMode scaleMode);
+
+ // Called by AncestorMoveMonitor
+ void ancestorMoved();
+
+ // Debugging output
+ void dump() const;
+
+public Q_SLOTS:
+ void beginNativePaintEvent(const QRect& /*controlRect*/);
+ void endNativePaintEvent(const QRect& /*controlRect*/);
+
+Q_SIGNALS:
+ void videoWindowChanged();
+ void aspectRatioChanged();
+ void scaleModeChanged();
+ void beginVideoWindowNativePaint();
+ void endVideoWindowNativePaint();
protected:
// Override QWidget functions
@@ -52,14 +83,19 @@
bool event(QEvent* event);
private:
- void dump() const;
- void videoOutputRegionChanged();
+ void getVideoWindowRect();
+ void registerForAncestorMoved();
private:
- QSize m_frameSize;
+ // Not owned
+ AncestorMoveMonitor* m_ancestorMoveMonitor;
- // Not owned
- VideoOutputObserver* m_observer;
+ QSize m_videoFrameSize;
+ QRect m_videoWindowRect;
+
+ Phonon::VideoWidget::AspectRatio m_aspectRatio;
+ Phonon::VideoWidget::ScaleMode m_scaleMode;
+
};
}
}