From 1e986d8aa4742c7fcb298305c9f4f9d5ea227727 Mon Sep 17 00:00:00 2001 From: Gareth Stockwell Date: Wed, 19 Aug 2009 09:20:12 +0100 Subject: Started work on VideoPlayer implementation --- src/3rdparty/phonon/mmf/videoplayer.cpp | 14 +++++++++----- src/3rdparty/phonon/mmf/videoplayer.h | 4 +++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/3rdparty/phonon/mmf/videoplayer.cpp b/src/3rdparty/phonon/mmf/videoplayer.cpp index 3cf468a..6bbd010 100644 --- a/src/3rdparty/phonon/mmf/videoplayer.cpp +++ b/src/3rdparty/phonon/mmf/videoplayer.cpp @@ -18,8 +18,10 @@ along with this library. If not, see . #include #include +#include #include // For CCoeEnv +#include #include "videoplayer.h" #include "utils.h" @@ -31,19 +33,21 @@ using namespace Phonon::MMF; // Constructor / destructor //----------------------------------------------------------------------------- -MMF::VideoPlayer::VideoPlayer() +MMF::VideoPlayer::VideoPlayer() : m_widget(new QWidget()) { TRACE_CONTEXT(VideoPlayer::VideoPlayer, EAudioApi); TRACE_ENTRY_0(); + + CCoeControl* control = m_widget->winId(); + CCoeEnv* coeEnv = control->ControlEnv(); const TInt priority = 0; const TMdaPriorityPreference preference = EMdaPriorityPreferenceNone; - CCoeEnv* coeEnv = CCoeEnv::Static(); RWsSession& wsSession = coeEnv->WsSession(); CWsScreenDevice& screenDevice = *(coeEnv->ScreenDevice()); - /* DUMMY */ RWindow window; - /* DUMMY */ TRect screenRect; - /* DUMMY */ TRect clipRect; + RDrawableWindow& window = *(control->DrawableWindow()); + const TRect screenRect = control->Rect(); + const TRect clipRect = control->Rect(); // TODO: is this the correct way to handle errors in constructing Symbian objects? TRAPD(err, diff --git a/src/3rdparty/phonon/mmf/videoplayer.h b/src/3rdparty/phonon/mmf/videoplayer.h index a10bee3..ae44ec3 100644 --- a/src/3rdparty/phonon/mmf/videoplayer.h +++ b/src/3rdparty/phonon/mmf/videoplayer.h @@ -24,6 +24,7 @@ along with this library. If not, see . #include "abstractmediaplayer.h" class CVideoPlayerUtility; +class QSymbianControl; namespace Phonon { @@ -70,7 +71,8 @@ namespace Phonon void finished(); private: - CVideoPlayerUtility* m_player; + CVideoPlayerUtility* m_player; + QScopedPointer m_widget; }; } -- cgit v0.12