From ddfc3c3073216d6a9ef15b26e3836b9c3eb2085c Mon Sep 17 00:00:00 2001 From: harlekin Date: Sun, 10 Nov 2002 13:40:33 +0000 Subject: fixed seeking and further adaption to the new api --- (limited to 'noncore/multimedia/opieplayer2/xinecontrol.cpp') 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 @@ -79,6 +79,8 @@ void XineControl::play( const QString& fileName ) { if ( !libXine->play( fileName ) ) { QMessageBox::warning( 0l , tr( "Failure" ), getErrorCode() ); + // toggle stop so the the play button is reset + mediaPlayerState->setPlaying( false ); return; } mediaPlayerState->setPlaying( true ); @@ -225,10 +227,19 @@ QString XineControl::getMetaInfo() { } QString XineControl::getErrorCode() { + int errorCode = libXine->error(); + qDebug( QString("ERRORCODE: %1 ").arg(errorCode) ); + if ( errorCode == 1 ) { return tr( "No input plugin found for this media type" ); + } else if ( errorCode == 2 ) { + return tr( "No demux plugin found for this media type" ); + } else if ( errorCode == 3 ) { + return tr( "Demuxing failed for this media type" ); + } else if ( errorCode == 4 ) { + return tr( "Malformed MRL" ); } else { return tr( "Some other error" ); } -- cgit v0.9.0.2