summaryrefslogtreecommitdiff
path: root/noncore
Side-by-side diff
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp1
-rw-r--r--noncore/multimedia/opieplayer2/xinecontrol.cpp48
-rw-r--r--noncore/multimedia/opieplayer2/xinecontrol.h4
3 files changed, 30 insertions, 23 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp
index d73f0cd..37b998f 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.cpp
+++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp
@@ -56,2 +56,3 @@ PlayListWidget::PlayListWidget(QWidget* parent, const char* name, WFlags fl )
{
+ Global::statusMessage( tr( "Loading of Skin started" ) );
mediaPlayerState = new MediaPlayerState(0, "mediaPlayerState" );
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp
index e1816c8..c47a773 100644
--- a/noncore/multimedia/opieplayer2/xinecontrol.cpp
+++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp
@@ -46,12 +46,2 @@ using namespace Opie::Core;
-XineControl::XineControl( XineVideoWidget *xineWidget,
- MediaPlayerState &_mediaPlayerState,
- QObject *parent, const char *name )
- : QObject( parent, name ), mediaPlayerState( _mediaPlayerState ), xineVideoWidget( xineWidget )
-{
- libXine = new XINE::Lib( XINE::Lib::InitializeImmediately, xineWidget );
-
- init();
-}
-
XineControl::XineControl( XINE::Lib *xine, XineVideoWidget *xineWidget,
@@ -61,2 +51,4 @@ XineControl::XineControl( XINE::Lib *xine, XineVideoWidget *xineWidget,
{
+ m_wasError = false;
+
xine->ensureInitialized();
@@ -98,10 +90,13 @@ void XineControl::play( const QString& fileName ) {
m_fileName = fileName;
+ m_wasError = false;
- odebug << "<<FILENAME: " + fileName + ">>>>" << oendl;
+ /*
+ * If Playing Fails we will fire up an MessgaeBox
+ * but present the AudioWidget so the User can
+ * either Quit and change the Playlist or Continue
+ */
if ( !libXine->play( fileName, 0, 0 ) ) {
QMessageBox::warning( 0l , tr( "Failure" ), getErrorCode() );
- // toggle stop so the the play button is reset
- mediaPlayerState.setPlaying( false );
- return;
+ m_wasError = true;
}
@@ -216,2 +211,15 @@ QString XineControl::getMetaInfo() {
+ /*
+ * If there was an error let us
+ * change the Meta Info to contain the Error Message
+ */
+ if ( m_wasError ) {
+ returnString = tr("Error on file '%1' with reason: ",
+ "Error when playing a file" ).arg( m_fileName );
+ returnString += getErrorCode();
+ returnString.replace( QRegExp("<qt>", false), "" );
+ returnString.replace( QRegExp("</qt>", false), "" );
+ return returnString;
+ }
+
if ( !libXine->metaInfo( 0 ).isEmpty() ) {
@@ -249,13 +257,13 @@ QString XineControl::getErrorCode() {
if ( errorCode == 1 ) {
- return tr( "No input plugin found for this media type" );
+ return tr( "<qt>No input plugin found for this media type</qt>" );
} else if ( errorCode == 2 ) {
- return tr( "No demux plugin found for this media type" );
+ return tr( "<qt>No demux plugin found for this media type</qt>" );
} else if ( errorCode == 3 ) {
- return tr( "Demuxing failed for this media type" );
+ return tr( "<qt>Demuxing failed for this media type</qt>" );
} else if ( errorCode == 4 ) {
- return tr( "Malformed MRL" );
+ return tr( "<qt>Malformed MRL</qt>" );
} else if ( errorCode == 5 ) {
- return tr( "Input failed" );
+ return tr( "<qt>Input failed</qt>" );
} else {
- return tr( "Some other error" );
+ return tr( "<qt>Some other error</qt>" );
}
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.h b/noncore/multimedia/opieplayer2/xinecontrol.h
index 3f44f2e..848bd05 100644
--- a/noncore/multimedia/opieplayer2/xinecontrol.h
+++ b/noncore/multimedia/opieplayer2/xinecontrol.h
@@ -43,5 +43,2 @@ class XineControl : public QObject {
public:
- XineControl( XineVideoWidget *xineWidget,
- MediaPlayerState &_mediaPlayerState,
- QObject *parent = 0, const char *name =0 );
// note that this constructor takes over ownership of the passed
@@ -119,2 +116,3 @@ private:
XineVideoWidget *xineVideoWidget;
+ bool m_wasError : 1; // used for chaeting on the metainfo