summaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/phonon/mmf/videoplayer_dsa.cpp60
-rw-r--r--src/3rdparty/phonon/mmf/videoplayer_surface.cpp55
2 files changed, 58 insertions, 57 deletions
diff --git a/src/3rdparty/phonon/mmf/videoplayer_dsa.cpp b/src/3rdparty/phonon/mmf/videoplayer_dsa.cpp
index fbd8397..1925471 100644
--- a/src/3rdparty/phonon/mmf/videoplayer_dsa.cpp
+++ b/src/3rdparty/phonon/mmf/videoplayer_dsa.cpp
@@ -226,38 +226,40 @@ void MMF::DsaVideoPlayer::handleParametersChanged(VideoParameters parameters)
getDsaRegion(m_wsSession, *m_window);
#endif
- static const TBool antialias = ETrue;
- int err = KErrNone;
-
- if (parameters & ScaleFactors) {
- TRAP(err, m_player->SetScaleFactorL(m_scaleWidth, m_scaleHeight,
- antialias));
- if(KErrNone != err) {
- TRACE("SetScaleFactorL (1) err %d", err);
- setError(tr("Video display error"), err);
+ if (m_player) {
+ static const TBool antialias = ETrue;
+ int err = KErrNone;
+
+ if (parameters & ScaleFactors) {
+ TRAP(err, m_player->SetScaleFactorL(m_scaleWidth, m_scaleHeight,
+ antialias));
+ if(KErrNone != err) {
+ TRACE("SetScaleFactorL (1) err %d", err);
+ setError(tr("Video display error"), err);
+ }
}
- }
- if (KErrNone == err) {
- if (parameters & WindowHandle || parameters & WindowScreenRect) {
- TRAP(err,
- m_player->SetDisplayWindowL(m_wsSession, m_screenDevice,
- *m_window,
- m_videoScreenRect,
- m_videoScreenRect));
- }
+ if (KErrNone == err) {
+ if (parameters & WindowHandle || parameters & WindowScreenRect) {
+ TRAP(err,
+ m_player->SetDisplayWindowL(m_wsSession, m_screenDevice,
+ *m_window,
+ m_videoScreenRect,
+ m_videoScreenRect));
+ }
- if (KErrNone != err) {
- TRACE("SetDisplayWindowL err %d", err);
- setError(tr("Video display error"), err);
- } else {
- m_dsaActive = true;
- if (parameters & ScaleFactors) {
- TRAP(err, m_player->SetScaleFactorL(m_scaleWidth, m_scaleHeight,
- antialias));
- if (KErrNone != err) {
- TRACE("SetScaleFactorL (2) err %d", err);
- setError(tr("Video display error"), err);
+ if (KErrNone != err) {
+ TRACE("SetDisplayWindowL err %d", err);
+ setError(tr("Video display error"), err);
+ } else {
+ m_dsaActive = true;
+ if (parameters & ScaleFactors) {
+ TRAP(err, m_player->SetScaleFactorL(m_scaleWidth, m_scaleHeight,
+ antialias));
+ if (KErrNone != err) {
+ TRACE("SetScaleFactorL (2) err %d", err);
+ setError(tr("Video display error"), err);
+ }
}
}
}
diff --git a/src/3rdparty/phonon/mmf/videoplayer_surface.cpp b/src/3rdparty/phonon/mmf/videoplayer_surface.cpp
index 5f234e5..fda7342 100644
--- a/src/3rdparty/phonon/mmf/videoplayer_surface.cpp
+++ b/src/3rdparty/phonon/mmf/videoplayer_surface.cpp
@@ -104,44 +104,43 @@ void MMF::SurfaceVideoPlayer::handleVideoWindowChanged()
void MMF::SurfaceVideoPlayer::handleParametersChanged(VideoParameters parameters)
{
- CVideoPlayerUtility2 *player = static_cast<CVideoPlayerUtility2 *>(m_player.data());
-
- int err = KErrNone;
-
TRect rect;
-
if (m_videoOutput) {
m_videoOutput->dump();
const QSize size = m_videoOutput->videoWindowSize();
rect.SetSize(TSize(size.width(), size.height()));
}
- if (parameters & WindowHandle) {
- if (m_displayWindow)
- player->RemoveDisplayWindow(*m_displayWindow);
-
- RWindow *window = static_cast<RWindow *>(m_window);
- if (window) {
- window->SetBackgroundColor(TRgb(0, 0, 0, 255));
- TRAP(err, player->AddDisplayWindowL(m_wsSession, m_screenDevice, *window, rect, rect));
- if (KErrNone != err) {
- setError(tr("Video display error"), err);
- window = 0;
+ CVideoPlayerUtility2 *player = static_cast<CVideoPlayerUtility2 *>(m_player.data());
+ if (player) {
+ int err = KErrNone;
+ if (parameters & WindowHandle) {
+ if (m_displayWindow)
+ player->RemoveDisplayWindow(*m_displayWindow);
+
+ RWindow *window = static_cast<RWindow *>(m_window);
+ if (window) {
+ window->SetBackgroundColor(TRgb(0, 0, 0, 255));
+ TRAP(err, player->AddDisplayWindowL(m_wsSession, m_screenDevice, *window, rect, rect));
+ if (KErrNone != err) {
+ setError(tr("Video display error"), err);
+ window = 0;
+ }
}
+ m_displayWindow = window;
}
- m_displayWindow = window;
- }
- if (KErrNone == err) {
- if (parameters & ScaleFactors) {
- Q_ASSERT(m_displayWindow);
- TRAP(err, player->SetVideoExtentL(*m_displayWindow, rect));
- if (KErrNone == err)
- TRAP(err, player->SetWindowClipRectL(*m_displayWindow, rect));
- if (KErrNone == err)
- TRAP(err, player->SetScaleFactorL(*m_displayWindow, m_scaleWidth, m_scaleHeight));
- if (KErrNone != err)
- setError(tr("Video display error"), err);
+ if (KErrNone == err) {
+ if (parameters & ScaleFactors) {
+ Q_ASSERT(m_displayWindow);
+ TRAP(err, player->SetVideoExtentL(*m_displayWindow, rect));
+ if (KErrNone == err)
+ TRAP(err, player->SetWindowClipRectL(*m_displayWindow, rect));
+ if (KErrNone == err)
+ TRAP(err, player->SetScaleFactorL(*m_displayWindow, m_scaleWidth, m_scaleHeight));
+ if (KErrNone != err)
+ setError(tr("Video display error"), err);
+ }
}
}
}