summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/phonon
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-04-21 14:00:38 +0200
committerThierry Bastian <thierry.bastian@nokia.com>2009-04-21 14:01:36 +0200
commitdf9977ebce528047c39d5cf35f452bb2f42cf2e9 (patch)
tree337a2bad867969728de41b5ca12e3ce6f737de04 /src/3rdparty/phonon
parent6a3735a47de8a9851e7795cf023d95d81867260d (diff)
Fixed a flicker when switching current source in Phonon::MediaObject
Task-number: 251776
Diffstat (limited to 'src/3rdparty/phonon')
-rw-r--r--src/3rdparty/phonon/ds9/mediaobject.cpp27
1 files changed, 9 insertions, 18 deletions
diff --git a/src/3rdparty/phonon/ds9/mediaobject.cpp b/src/3rdparty/phonon/ds9/mediaobject.cpp
index 93a19b05c7..1d0b69d8ed 100644
--- a/src/3rdparty/phonon/ds9/mediaobject.cpp
+++ b/src/3rdparty/phonon/ds9/mediaobject.cpp
@@ -519,6 +519,15 @@ namespace Phonon
qSwap(m_graphs[0], m_graphs[1]); //swap the graphs
+ if (currentGraph()->mediaSource().type() != Phonon::MediaSource::Invalid &&
+ catchComError(currentGraph()->renderResult())) {
+ setState(Phonon::ErrorState);
+ return;
+ }
+
+ //we need to play the next media
+ play();
+
//we tell the video widgets to switch now to the new source
#ifndef QT_NO_PHONON_VIDEO
for (int i = 0; i < m_videoWidgets.count(); ++i) {
@@ -527,15 +536,6 @@ namespace Phonon
#endif //QT_NO_PHONON_VIDEO
emit currentSourceChanged(currentGraph()->mediaSource());
-
- if (currentGraph()->isLoading()) {
- //will simply tell that when loading is finished
- //it should start the playback
- play();
- }
-
-
-
emit metaDataChanged(currentGraph()->metadata());
if (nextGraph()->hasVideo() != currentGraph()->hasVideo()) {
@@ -548,15 +548,6 @@ namespace Phonon
#ifndef QT_NO_PHONON_MEDIACONTROLLER
setTitles(currentGraph()->titles());
#endif //QT_NO_PHONON_MEDIACONTROLLER
-
- //this manages only gapless transitions
- if (currentGraph()->mediaSource().type() != Phonon::MediaSource::Invalid) {
- if (catchComError(currentGraph()->renderResult())) {
- setState(Phonon::ErrorState);
- } else {
- play();
- }
- }
}
Phonon::State MediaObject::state() const