[prev in list] [next in list] [prev in thread] [next in thread]
List: amarok-bugs-dist
Subject: [Bug 147126] amarok freezes when trying to play mp3 files without mp3
From: Mark Kretschmann <kretschmann () kde ! org>
Date: 2007-08-31 12:27:31
Message-ID: 20070831122731.13975.qmail () ktown ! kde ! org
[Download RAW message or body]
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=147126
kretschmann kde org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
------- Additional Comments From kretschmann kde org 2007-08-31 14:27 -------
SVN commit 706845 by markey:
Fixed possible GUI freeze when Amarok was showing the dialog for installing mp3 \
support. Patch by Sascha Sommer <ssommer suse de>
"The problem seems to be that EngineController::canDecode runs in a seperate
thread than the gui thread. Opening up a Kmessagebox there will prevent
amarok from handling all gui events and everything will freeze. I therefore
put the dialog into an extra function that will later get called from the
statusBar."
BUG: 147126
M +4 -0 ChangeLog
M +15 -7 src/enginecontroller.cpp
M +1 -0 src/enginecontroller.h
M +8 -3 src/statusbar/statusBarBase.cpp
--- branches/stable/extragear/multimedia/amarok/ChangeLog #706844:706845
@ -2,8 +2,12 @
================
(C) 2002-2007 the Amarok authors.
+
VERSION 1.4.8
BUGFIXES:
+ * Fixed possible GUI freeze when Amarok was showing the dialog for
+ installing mp3 support. Patch by Sascha Sommer <ssommer suse de>
+ (BR 147126)
* Amarok could needlessely reinitialize connections to MySQL databases
after a configuration change. Combined with a bug in MySQL libraries,
this could lead to a crash.
--- branches/stable/extragear/multimedia/amarok/src/enginecontroller.cpp \
#706844:706845 @ -244,13 +244,10 @
if( engine() != EngineController::instance()->m_voidEngine )
{
//we special case this as otherwise users hate us
- if ( !valid && ext.lower() == "mp3" && \
!installDistroCodec(AmarokConfig::soundSystem()) )
- Amarok::StatusBar::instance()->longMessageThreadSafe(
- i18n( "<p>The %1 claims it <b>cannot</b> play MP3 files."
- "<p>You may want to choose a different engine from the \
<i>Configure Dialog</i>, or examine "
- "the installation of the multimedia-framework that the \
current engine uses. "
- "<p>You may find useful information in the <i>FAQ</i> \
section of the <i>Amarok HandBook</i>." )
- .arg( AmarokConfig::soundSystem() ), KDE::StatusBar::Error );
+ if ( !valid && ext.lower() == "mp3"){
+ QCustomEvent * e = new QCustomEvent( 2000 );
+ QApplication::postEvent( Amarok::StatusBar::instance(), e );
+ }
// Cache this result for the next lookup
if ( !ext.isEmpty() )
@ -260,6 +257,17 @
return valid;
}
+void EngineController::unplayableNotification() {
+
+ if( !installDistroCodec(AmarokConfig::soundSystem()))
+ Amarok::StatusBar::instance()->longMessageThreadSafe(
+ i18n( "<p>The %1 claims it <b>cannot</b> play MP3 files."
+ "<p>You may want to choose a different engine from the \
<i>Configure Dialog</i>, or examine " + "the installation of \
the multimedia-framework that the current engine uses. " + \
"<p>You may find useful information in the <i>FAQ</i> section of the <i>Amarok \
HandBook</i>." ) + .arg( AmarokConfig::soundSystem() ), \
KDE::StatusBar::Error ); +}
+
bool EngineController::installDistroCodec( const QString& engine /*Filetype type*/)
{
KService::Ptr service = KTrader::self()->query( "Amarok/CodecInstall"
--- branches/stable/extragear/multimedia/amarok/src/enginecontroller.h #706844:706845
@ -52,6 +52,7 @
uint trackPosition() const;
EngineBase* loadEngine();
+ void unplayableNotification();
uint trackLength() const { return m_bundle.length() * 1000; }
const MetaBundle &bundle() const;
--- branches/stable/extragear/multimedia/amarok/src/statusbar/statusBarBase.cpp \
#706844:706845 @ -25,6 +25,7 @
#include "squeezedtextlabel.h"
#include "statusBarBase.h"
#include "threadmanager.h"
+#include "enginecontroller.h"
#include <kio/job.h>
#include <kiconloader.h>
@ -343,9 +344,13 @
void
StatusBar::customEvent( QCustomEvent *e )
{
- QString *s = static_cast<QString*>( e->data() );
- longMessage( *s );
- delete s;
+ if(e->type() == 1000 ){
+ QString *s = static_cast<QString*>( e->data() );
+ longMessage( *s );
+ delete s;
+ }else if(e->type() == 2000 ){
+ EngineController::instance()->unplayableNotification();
+ }
}
_______________________________________________
Amarok-bugs-dist mailing list
Amarok-bugs-dist@kde.org
https://mail.kde.org/mailman/listinfo/amarok-bugs-dist
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic