summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/xinecontrol.cpp
Unidiff
Diffstat (limited to 'noncore/multimedia/opieplayer2/xinecontrol.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/xinecontrol.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp
index 03176b3..65ac127 100644
--- a/noncore/multimedia/opieplayer2/xinecontrol.cpp
+++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp
@@ -66,49 +66,50 @@ XineControl::~XineControl() {
66 // Re-enable the suspend mode 66 // Re-enable the suspend mode
67 QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Enable; 67 QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Enable;
68 } 68 }
69#endif 69#endif
70 delete libXine; 70 delete libXine;
71} 71}
72 72
73void XineControl::play( const QString& fileName ) { 73void XineControl::play( const QString& fileName ) {
74 hasVideoChannel = FALSE; 74 hasVideoChannel = FALSE;
75 hasAudioChannel = FALSE; 75 hasAudioChannel = FALSE;
76 m_fileName = fileName; 76 m_fileName = fileName;
77 77
78 //qDebug("<<FILENAME: " + fileName + ">>>>"); 78 qDebug("<<FILENAME: " + fileName + ">>>>");
79 79
80 if ( !libXine->play( fileName ) ) { 80 if ( !libXine->play( fileName, 0, 0 ) ) {
81 QMessageBox::warning( 0l , tr( "Failure" ), getErrorCode() ); 81 QMessageBox::warning( 0l , tr( "Failure" ), getErrorCode() );
82 // toggle stop so the the play button is reset 82 // toggle stop so the the play button is reset
83 mediaPlayerState->setPlaying( false ); 83 mediaPlayerState->setPlaying( false );
84 return; 84 return;
85 } 85 }
86 mediaPlayerState->setPlaying( true ); 86 mediaPlayerState->setPlaying( true );
87 87
88 char whichGui; 88 char whichGui;
89 // qDebug( QString( "libXine->hasVideo() return : %1 ").arg( libXine->hasVideo() ) ); 89 // qDebug( QString( "libXine->hasVideo() return : %1 ").arg( libXine->hasVideo() ) );
90 if ( !libXine->hasVideo() ) { 90 if ( !libXine->hasVideo() ) {
91 whichGui = 'a'; 91 whichGui = 'a';
92 qDebug("HAS AUDIO"); 92 qDebug("HAS AUDIO");
93 libXine->setShowVideo( false ); 93 libXine->setShowVideo( false );
94 hasAudioChannel = TRUE; 94 hasAudioChannel = TRUE;
95 } else { 95 } else {
96 whichGui = 'v'; 96 whichGui = 'v';
97 qDebug("HAS VIDEO"); 97 qDebug("HAS VIDEO");
98 libXine->setShowVideo( true ); 98 libXine->setShowVideo( true );
99 hasVideoChannel = TRUE; 99 hasVideoChannel = TRUE;
100 } 100 }
101 // determine if slider is shown 101 // determine if slider is shown
102 mediaPlayerState->setIsStreaming( !libXine->isSeekable() ); 102 mediaPlayerState->setIsSeekable( !libXine->isSeekable() );
103
103 // which gui (video / audio) 104 // which gui (video / audio)
104 mediaPlayerState->setView( whichGui ); 105 mediaPlayerState->setView( whichGui );
105 106
106#if defined(Q_WS_QWS) && !defined(QT_NO_COP) 107#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
107 if ( !disabledSuspendScreenSaver ) { 108 if ( !disabledSuspendScreenSaver ) {
108 disabledSuspendScreenSaver = TRUE; 109 disabledSuspendScreenSaver = TRUE;
109 // Stop the screen from blanking and power saving state 110 // Stop the screen from blanking and power saving state
110 QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) 111 QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" )
111 << ( whichGui == 'v' ? QPEApplication::Disable : QPEApplication::DisableSuspend ); 112 << ( whichGui == 'v' ? QPEApplication::Disable : QPEApplication::DisableSuspend );
112 } 113 }
113#endif 114#endif
114 115