Diffstat (limited to 'noncore/multimedia/opieplayer2/xinecontrol.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/xinecontrol.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp index 31ac9dc..03176b3 100644 --- a/noncore/multimedia/opieplayer2/xinecontrol.cpp +++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp | |||
@@ -76,12 +76,14 @@ void XineControl::play( const QString& fileName ) { | |||
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 ) ) { |
81 | QMessageBox::warning( 0l , tr( "Failure" ), getErrorCode() ); | 81 | QMessageBox::warning( 0l , tr( "Failure" ), getErrorCode() ); |
82 | // toggle stop so the the play button is reset | ||
83 | mediaPlayerState->setPlaying( false ); | ||
82 | return; | 84 | return; |
83 | } | 85 | } |
84 | mediaPlayerState->setPlaying( true ); | 86 | mediaPlayerState->setPlaying( true ); |
85 | 87 | ||
86 | char whichGui; | 88 | char whichGui; |
87 | // qDebug( QString( "libXine->hasVideo() return : %1 ").arg( libXine->hasVideo() ) ); | 89 | // qDebug( QString( "libXine->hasVideo() return : %1 ").arg( libXine->hasVideo() ) ); |
@@ -222,16 +224,25 @@ QString XineControl::getMetaInfo() { | |||
222 | returnString += tr( " Year: " + libXine->metaInfo( 5 ) ); | 224 | returnString += tr( " Year: " + libXine->metaInfo( 5 ) ); |
223 | } | 225 | } |
224 | return returnString; | 226 | return returnString; |
225 | } | 227 | } |
226 | 228 | ||
227 | QString XineControl::getErrorCode() { | 229 | QString XineControl::getErrorCode() { |
230 | |||
228 | int errorCode = libXine->error(); | 231 | int errorCode = libXine->error(); |
229 | 232 | ||
233 | qDebug( QString("ERRORCODE: %1 ").arg(errorCode) ); | ||
234 | |||
230 | if ( errorCode == 1 ) { | 235 | if ( errorCode == 1 ) { |
231 | return tr( "No input plugin found for this media type" ); | 236 | return tr( "No input plugin found for this media type" ); |
237 | } else if ( errorCode == 2 ) { | ||
238 | return tr( "No demux plugin found for this media type" ); | ||
239 | } else if ( errorCode == 3 ) { | ||
240 | return tr( "Demuxing failed for this media type" ); | ||
241 | } else if ( errorCode == 4 ) { | ||
242 | return tr( "Malformed MRL" ); | ||
232 | } else { | 243 | } else { |
233 | return tr( "Some other error" ); | 244 | return tr( "Some other error" ); |
234 | } | 245 | } |
235 | } | 246 | } |
236 | 247 | ||
237 | /** | 248 | /** |