author | zecke <zecke> | 2004-09-23 21:38:02 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-09-23 21:38:02 (UTC) |
commit | 97ab73d99688443d02086b4f00d1de7c81faa3c7 (patch) (unidiff) | |
tree | 63864e847abc41442d2ed88ca27a27ad1942c15a /noncore/multimedia/opieplayer2/xinecontrol.cpp | |
parent | 3080b2095fd9dddc4937cbf74037ce1dbc7fa6b2 (diff) | |
download | opie-97ab73d99688443d02086b4f00d1de7c81faa3c7.zip opie-97ab73d99688443d02086b4f00d1de7c81faa3c7.tar.gz opie-97ab73d99688443d02086b4f00d1de7c81faa3c7.tar.bz2 |
-Remove bogus whitespaces
-Remove stl dependency
-Make switching from fullscreen video to audio work
-Remove debug output
Diffstat (limited to 'noncore/multimedia/opieplayer2/xinecontrol.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/xinecontrol.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp index 9f944d7..e1816c8 100644 --- a/noncore/multimedia/opieplayer2/xinecontrol.cpp +++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp | |||
@@ -81,7 +81,7 @@ void XineControl::init() | |||
81 | } | 81 | } |
82 | 82 | ||
83 | XineControl::~XineControl() { | 83 | XineControl::~XineControl() { |
84 | #if defined(Q_WS_QWS) && !defined(QT_NO_COP) | 84 | #if !defined(QT_NO_COP) |
85 | if ( disabledSuspendScreenSaver ) { | 85 | if ( disabledSuspendScreenSaver ) { |
86 | disabledSuspendScreenSaver = FALSE; | 86 | disabledSuspendScreenSaver = FALSE; |
87 | // Re-enable the suspend mode | 87 | // Re-enable the suspend mode |
@@ -97,7 +97,7 @@ void XineControl::play( const QString& fileName ) { | |||
97 | hasAudioChannel = FALSE; | 97 | hasAudioChannel = FALSE; |
98 | m_fileName = fileName; | 98 | m_fileName = fileName; |
99 | 99 | ||
100 | odebug << "<<FILENAME: " + fileName + ">>>>" << oendl; | 100 | odebug << "<<FILENAME: " + fileName + ">>>>" << oendl; |
101 | 101 | ||
102 | if ( !libXine->play( fileName, 0, 0 ) ) { | 102 | if ( !libXine->play( fileName, 0, 0 ) ) { |
103 | QMessageBox::warning( 0l , tr( "Failure" ), getErrorCode() ); | 103 | QMessageBox::warning( 0l , tr( "Failure" ), getErrorCode() ); |
@@ -110,12 +110,10 @@ void XineControl::play( const QString& fileName ) { | |||
110 | MediaPlayerState::DisplayType displayType; | 110 | MediaPlayerState::DisplayType displayType; |
111 | if ( !libXine->hasVideo() ) { | 111 | if ( !libXine->hasVideo() ) { |
112 | displayType = MediaPlayerState::Audio; | 112 | displayType = MediaPlayerState::Audio; |
113 | odebug << "HAS AUDIO" << oendl; | ||
114 | libXine->setShowVideo( false ); | 113 | libXine->setShowVideo( false ); |
115 | hasAudioChannel = TRUE; | 114 | hasAudioChannel = TRUE; |
116 | } else { | 115 | } else { |
117 | displayType = MediaPlayerState::Video; | 116 | displayType = MediaPlayerState::Video; |
118 | odebug << "HAS VIDEO" << oendl; | ||
119 | libXine->setShowVideo( true ); | 117 | libXine->setShowVideo( true ); |
120 | hasVideoChannel = TRUE; | 118 | hasVideoChannel = TRUE; |
121 | } | 119 | } |
@@ -150,7 +148,7 @@ void XineControl::stop( bool isSet ) { | |||
150 | if ( !isSet ) { | 148 | if ( !isSet ) { |
151 | libXine->stop(); | 149 | libXine->stop(); |
152 | 150 | ||
153 | #if defined(Q_WS_QWS) && !defined(QT_NO_COP) | 151 | #if !defined(QT_NO_COP) |
154 | if ( disabledSuspendScreenSaver ) { | 152 | if ( disabledSuspendScreenSaver ) { |
155 | disabledSuspendScreenSaver = FALSE; | 153 | disabledSuspendScreenSaver = FALSE; |
156 | // Re-enable the suspend mode | 154 | // Re-enable the suspend mode |
@@ -176,7 +174,6 @@ long XineControl::currentTime() { | |||
176 | // todo: jede sekunde überprüfen | 174 | // todo: jede sekunde überprüfen |
177 | m_currentTime = libXine->currentTime(); | 175 | m_currentTime = libXine->currentTime(); |
178 | return m_currentTime; | 176 | return m_currentTime; |
179 | QTimer::singleShot( 1000, this, SLOT( currentTime() ) ); | ||
180 | } | 177 | } |
181 | 178 | ||
182 | /** | 179 | /** |
@@ -247,16 +244,18 @@ QString XineControl::getErrorCode() { | |||
247 | 244 | ||
248 | int errorCode = libXine->error(); | 245 | int errorCode = libXine->error(); |
249 | 246 | ||
250 | odebug << QString("ERRORCODE: %1 ").arg(errorCode) << oendl; | 247 | odebug << QString("ERRORCODE: %1 ").arg(errorCode) << oendl; |
251 | 248 | ||
252 | if ( errorCode == 1 ) { | 249 | if ( errorCode == 1 ) { |
253 | return tr( "No input plugin found for this media type" ); | 250 | return tr( "No input plugin found for this media type" ); |
254 | } else if ( errorCode == 2 ) { | 251 | } else if ( errorCode == 2 ) { |
255 | return tr( "No demux plugin found for this media type" ); | 252 | return tr( "No demux plugin found for this media type" ); |
256 | } else if ( errorCode == 3 ) { | 253 | } else if ( errorCode == 3 ) { |
257 | return tr( "Demuxing failed for this media type" ); | 254 | return tr( "Demuxing failed for this media type" ); |
258 | } else if ( errorCode == 4 ) { | 255 | } else if ( errorCode == 4 ) { |
259 | return tr( "Malformed MRL" ); | 256 | return tr( "Malformed MRL" ); |
257 | } else if ( errorCode == 5 ) { | ||
258 | return tr( "Input failed" ); | ||
260 | } else { | 259 | } else { |
261 | return tr( "Some other error" ); | 260 | return tr( "Some other error" ); |
262 | } | 261 | } |