diff options
author | Gareth Stockwell <gareth.stockwell@sosco.com> | 2009-08-26 11:57:47 (GMT) |
---|---|---|
committer | Gareth Stockwell <gareth.stockwell@sosco.com> | 2009-08-26 11:57:47 (GMT) |
commit | 7104201d87b965a01c2983cd44ef2e0f465030bf (patch) | |
tree | f401a6a64b9b69a60b7e4cf2f2c75b05868f05b8 /src/3rdparty/phonon/mmf/videooutput.cpp | |
parent | c38752fb695b5b88f6b2404b415ffb4879999a89 (diff) | |
download | Qt-7104201d87b965a01c2983cd44ef2e0f465030bf.zip Qt-7104201d87b965a01c2983cd44ef2e0f465030bf.tar.gz Qt-7104201d87b965a01c2983cd44ef2e0f465030bf.tar.bz2 |
Added VideoOutputObserver, to propagate screen region updates back to VideoPlayer
Diffstat (limited to 'src/3rdparty/phonon/mmf/videooutput.cpp')
-rw-r--r-- | src/3rdparty/phonon/mmf/videooutput.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/3rdparty/phonon/mmf/videooutput.cpp b/src/3rdparty/phonon/mmf/videooutput.cpp index 2652844..fd8a80b 100644 --- a/src/3rdparty/phonon/mmf/videooutput.cpp +++ b/src/3rdparty/phonon/mmf/videooutput.cpp @@ -18,6 +18,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #include "utils.h" #include "videooutput.h" +#include "videooutputobserver.h" #include <QPaintEvent> #include <QMoveEvent> @@ -32,13 +33,14 @@ using namespace Phonon::MMF; MMF::VideoOutput::VideoOutput(QWidget* parent) : QWidget(parent) + , m_observer(NULL) { TRACE_CONTEXT(VideoOutput::VideoOutput, EVideoInternal); TRACE_ENTRY("parent 0x%08x", parent); #ifndef PHONON_MMF_VIDEOOUTPUT_IS_QWIDGET setPalette(QPalette(Qt::black)); - setAttribute(Qt::WA_OpaquePaintEvent, true); + //setAttribute(Qt::WA_OpaquePaintEvent, true); setAttribute(Qt::WA_NoSystemBackground, true); setAutoFillBackground(false); #endif // PHONON_MMF_VIDEOOUTPUT_IS_QWIDGET @@ -119,6 +121,14 @@ void MMF::VideoOutput::setFrameSize(const QSize& frameSize) #endif // PHONON_MMF_VIDEOOUTPUT_IS_QWIDGET } +void MMF::VideoOutput::setObserver(VideoOutputObserver* observer) +{ + TRACE_CONTEXT(VideoOutput::setObserver, EVideoInternal); + TRACE("observer 0x%08x", observer); + + m_observer = observer; +} + //----------------------------------------------------------------------------- // QWidget @@ -171,6 +181,11 @@ void MMF::VideoOutput::resizeEvent(QResizeEvent* event) event->size().width(), event->size().height()); QWidget::resizeEvent(event); + + if(m_observer) + { + m_observer->videoOutputRegionChanged(); + } } void MMF::VideoOutput::moveEvent(QMoveEvent* event) @@ -181,6 +196,11 @@ void MMF::VideoOutput::moveEvent(QMoveEvent* event) event->pos().x(), event->pos().y()); QWidget::moveEvent(event); + + if(m_observer) + { + m_observer->videoOutputRegionChanged(); + } } #endif // PHONON_MMF_VIDEOOUTPUT_IS_QWIDGET |