summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/phonon/mmf/videoplayer.cpp14
-rw-r--r--src/3rdparty/phonon/mmf/videoplayer.h4
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 <http://www.gnu.org/licenses/>.
#include <QUrl>
#include <QTimer>
+#include <QWidget>
#include <coemain.h> // For CCoeEnv
+#include <coecntrl.h>
#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 <http://www.gnu.org/licenses/>.
#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<QWidget> m_widget;
};
}