summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/phonon/mmf/backend.cpp
diff options
context:
space:
mode:
authorGareth Stockwell <gareth.stockwell@accenture.com>2009-10-21 14:41:21 (GMT)
committerFrans Englich <frans.englich@nokia.com>2009-10-23 13:50:52 (GMT)
commitd54bc7379de145995534058dd2f6b400c9ab160e (patch)
treece27f5081ff2b6d3dea7323970f8d588f91c70f8 /src/3rdparty/phonon/mmf/backend.cpp
parentdf0f099b7ae0ffbea46411276a239d152f36a7e2 (diff)
downloadQt-d54bc7379de145995534058dd2f6b400c9ab160e.zip
Qt-d54bc7379de145995534058dd2f6b400c9ab160e.tar.gz
Qt-d54bc7379de145995534058dd2f6b400c9ab160e.tar.bz2
Video screen region is updated in response to ancestors of video widget
being moved. Because QWidget::moveEvent is only called when a widget moves relative to its parent, a widget's absolute screen position may change without it receiving a moveEvent (for example, as a result of its parent being moved). The MMF video playback API on Symbian v9.4 requires, in addition to a window handle, an absolute screen rectangle. Changes in the video widget's absolute screen position therefore need to be propagated into the MMF. This change introduces a new object, AncestorMoveMonitor, which installs an event filter on the QCoreApplication instance. A VideoOutput object registers with the AncestorMoveMonitor, which listens on its behalf for MoveEvents and ParentChangeEvents directed at any of the ancestors of the VideoOutput. MoveEvents trigger a callback to the VideoOutput instance, which then notifies the MMF of the new screen rectangle. ParentChangeEvents cause the AncestorMoveMonitor to update the ancestor list associated with the target VideoOutput instance. The video position now tracks that of the associated widget, but there are two problems which require further investigation: 1. The video window lags behind. This may be an unavoidable consequence of the fact that setting a new screen rectangle causes the MMF to tear down its DSA session and start a new one; this is known to block the window server and take some time to complete. 2. Artifacts are visible around the edges of the moving video widget. Task-number: QTBUG-4787 Reviewed-by: Frans Englich
Diffstat (limited to 'src/3rdparty/phonon/mmf/backend.cpp')
-rw-r--r--src/3rdparty/phonon/mmf/backend.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/3rdparty/phonon/mmf/backend.cpp b/src/3rdparty/phonon/mmf/backend.cpp
index f542ec9..cac27e3 100644
--- a/src/3rdparty/phonon/mmf/backend.cpp
+++ b/src/3rdparty/phonon/mmf/backend.cpp
@@ -24,6 +24,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#include <apmstd.h> // for TDataType
#include "abstractaudioeffect.h"
+#include "ancestormovemonitor.h"
#include "audiooutput.h"
#include "audioplayer.h"
#include "backend.h"
@@ -45,7 +46,9 @@ using namespace Phonon::MMF;
\internal
*/
-Backend::Backend(QObject *parent) : QObject(parent)
+Backend::Backend(QObject *parent)
+ : QObject(parent)
+ , m_ancestorMoveMonitor(new AncestorMoveMonitor(this))
{
TRACE_CONTEXT(Backend::Backend, EBackend);
TRACE_ENTRY_0();
@@ -87,7 +90,7 @@ QObject *Backend::createObject(BackendInterface::Class c, QObject *parent, const
return EffectFactory::createAudioEffect(effect, parent);
}
case VideoWidgetClass:
- result = new VideoWidget(qobject_cast<QWidget *>(parent));
+ result = new VideoWidget(m_ancestorMoveMonitor.data(), qobject_cast<QWidget *>(parent));
break;
default: