[-]
[+]
|
Changed |
amarok.spec
|
|
[-]
[+]
|
Added |
148317.patch
^
|
@@ -0,0 +1,15 @@
+diff -urNad amarok-1.4.7/amarok/src/playlist.cpp amarok-1.4.8/amarok/src/playlist.cpp
+--- amarok-1.4.7/amarok/src/playlist.cpp 2007-08-07 18:48:28.000000000 +0100
++++ amarok-1.4.8/amarok/src/playlist.cpp 2007-11-18 15:00:25.000000000 +0100
+@@ -1227,7 +1227,10 @@
+ }
+ else
+ {
+- if ( !AmarokConfig::randomMode() || m_prevTracks.count() <= 1 )
++ if( dynamicMode() )
++ {
++ }
++ else if( !AmarokConfig::randomMode() || m_prevTracks.count() <= 1 )
+ {
+ if( item )
+ {
|
[-]
[+]
|
Added |
amarok-includes.diff
^
|
@@ -0,0 +1,13 @@
+--- amarok/src/engine/yauap/yauap-engine.cpp
++++ amarok/src/engine/yauap/yauap-engine.cpp
+@@ -18,6 +18,10 @@ copyright : (C) 2006 by Sascha Sommer <saschasommer@freenet.de>
+
+ #include <klocale.h>
+ #include <iostream>
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <fcntl.h>
++#include <stdlib.h>
+
+ #define DBUS_API_SUBJECT_TO_CHANGE
+ #include <dbus/connection.h>
|
[-]
[+]
|
Added |
amarok-mp3-dialog-freeze.diff
^
|
@@ -0,0 +1,75 @@
+--- amarok-1.4.7.org/amarok/src/enginecontroller.h 2007-08-07 19:48:28.000000000 +0200
++++ amarok-1.4.7/amarok/src/enginecontroller.h 2007-08-29 14:07:27.000000000 +0200
+@@ -45,6 +45,7 @@
+ static EngineController* instance();
+ static EngineBase* engine() { return instance()->m_engine; }
+ static bool canDecode( const KURL& );
++ void unplayableNotification();
+ static ExtensionCache& extensionCache() { return s_extensionCache; }
+ static QString engineProperty( const QString& key ) { return engine()->pluginProperty( key ); }
+ static bool hasEngineProperty( const QString& key ) { return engine()->hasPluginProperty( key ); }
+--- amarok-1.4.7.org/amarok/src/enginecontroller.cpp 2007-08-07 19:48:28.000000000 +0200
++++ amarok-1.4.7/amarok/src/enginecontroller.cpp 2007-08-29 14:07:16.000000000 +0200
+@@ -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"
+--- amarok-1.4.7.org/amarok/src/statusbar/statusBarBase.cpp 2007-08-07 19:48:28.000000000 +0200
++++ amarok-1.4.7/amarok/src/statusbar/statusBarBase.cpp 2007-08-29 14:07:51.000000000 +0200
+@@ -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();
++ }
+ }
+
+
|
[-]
[+]
|
Added |
better-engine-name.diff
^
|
@@ -0,0 +1,89 @@
+--- amarok/src/engine/yauap/amarok_yauap-engine_plugin.desktop
++++ amarok/src/engine/yauap/amarok_yauap-engine_plugin.desktop
+@@ -1,46 +1,46 @@
+ [Desktop Entry]
+ Encoding=UTF-8
+ Type=Service
+-Name=yauap engine
+-Name[af]=yauap enjin
+-Name[bg]=Yauap
+-Name[bn]=yauap ইঞ্জিন
+-Name[ca]=Motor yauap
+-Name[cs]=yauap
+-Name[da]=Yauap-grænseflade
+-Name[de]=Yauap
+-Name[el]=μηχανή yauap
+-Name[eo]=yauap ilo
+-Name[es]=motor yauap
+-Name[et]=yauap mootor
+-Name[fa]=موتور yauap
+-Name[fi]=yauap
+-Name[fr]=Moteur yauap
+-Name[ga]=inneall yauap
+-Name[hu]=Yauap alrendszer
+-Name[is]=yauap vél
+-Name[it]=Motore yauap
+-Name[ja]=yauap エンジン
+-Name[km]=ម៉ាស៊ីន yauap
+-Name[lt]=yauap variklis
+-Name[mk]=yauap-машина
+-Name[ms]=Enjin yauap
+-Name[nds]=Yauap
+-Name[ne]=yauap इन्जिन
+-Name[nl]=yauap-engine
+-Name[pa]=yauap ਇੰਜਣ
+-Name[pl]=moduł yauap
+-Name[pt]=Motor yauap
+-Name[pt_BR]=Mecanismo Yauap
+-Name[se]=yauap-mohtor
+-Name[sr]=Мотора yauap
+-Name[sr@Latn]=Motora yauap
+-Name[sv]=Yauap-gränssnitt
+-Name[tr]=yauap motoru
+-Name[uk]=Рушій yauap
+-Name[uz]=yauap тизими
+-Name[wa]=Éndjin yauap
+-Name[zh_CN]=yauap 引擎
++Name=GStreamer/yauap engine
++Name[af]=GStreamer/yauap enjin
++Name[bg]=GStreamer/yauap
++Name[bn]=GStreamer/yauap ইঞ্জিন
++Name[ca]=Motor GStreamer/yauap
++Name[cs]=GStreamer/yauap
++Name[da]=GStreamer/yauap-grænseflade
++Name[de]=GStreamer/yauap
++Name[el]=μηχανή GStreamer/yauap
++Name[eo]=GStreamer/yauap ilo
++Name[es]=motor GStreamer/yauap
++Name[et]=GStreamer/yauap mootor
++Name[fa]=موتور GStreamer/yauap
++Name[fi]=GStreamer/yauap
++Name[fr]=Moteur GStreamer/yauap
++Name[ga]=inneall GStreamer/yauap
++Name[hu]=GStreamer/yauap alrendszer
++Name[is]=GStreamer/yauap vél
++Name[it]=Motore GStreamer/yauap
++Name[ja]=GStreamer/yauap エンジン
++Name[km]=ម៉ាស៊ីន GStreamer/yauap
++Name[lt]=GStreamer/yauap variklis
++Name[mk]=GStreamer/yauap-машина
++Name[ms]=Enjin GStreamer/yauap
++Name[nds]=GStreamer/yauap
++Name[ne]=GStreamer/yauap इन्जिन
++Name[nl]=GStreamer/yauap-engine
++Name[pa]=GStreamer/yauap ਇੰਜਣ
++Name[pl]=moduł GStreamer/yauap
++Name[pt]=Motor GStreamer/yauap
++Name[pt_BR]=Mecanismo GStreamer/yauap
++Name[se]=GStreamer/yauap-mohtor
++Name[sr]=Мотора GStreamer/yauap
++Name[sr@Latn]=Motora GStreamer/yauap
++Name[sv]=GStreamer/yauap-gränssnitt
++Name[tr]=GStreamer/yauap motoru
++Name[uk]=Рушій GStreamer/yauap
++Name[uz]=GStreamer/yauap тизими
++Name[wa]=Éndjin GStreamer/yauap
++Name[zh_CN]=GStreamer/yauap 引擎
+ X-KDE-Library=libamarok_yauap-engine_plugin
+ Comment=Plugin for Amarok
+ Comment[af]=Inprop module vir Amarok
|
[-]
[+]
|
Added |
gstreamer-playlist.diff
^
|
@@ -0,0 +1,70 @@
+--- amarok/src/engine/yauap/yauap-engine.cpp.org 2007-10-09 16:41:40.000000000 +0000
++++ amarok/src/engine/yauap/yauap-engine.cpp 2007-10-09 16:43:44.000000000 +0000
+@@ -102,18 +102,28 @@
+ }
+ dbus_connection_set_exit_on_disconnect( dbus_connection, false );
+
++ /* connect to session bus (for the signals as they do not seem to get handled otherwise...) */
++ dbus_signalconnection = dbus_bus_get_private( DBUS_BUS_SESSION, &error ); /* get another bus for the signals */
++ if( dbus_error_is_set(&error) )
++ {
++ debug() << "unable to connect to DBUS." << endl;
++ dbus_error_free(&error);
++ return false;
++ }
++ dbus_connection_set_exit_on_disconnect( dbus_signalconnection, false );
++
+ /* create qt connection */
+ qt_connection = new DBusQt::Connection( this );
+- qt_connection->dbus_connection_setup_with_qt_main( dbus_connection );
++ qt_connection->dbus_connection_setup_with_qt_main( dbus_signalconnection );
+
+- if ( !dbus_connection_add_filter(dbus_connection, signal_handler, context, NULL) )
++ if ( !dbus_connection_add_filter(dbus_signalconnection, signal_handler, context, NULL) )
+ {
+ debug() << "Failed to add filter function." << endl;
+ return false;
+ }
+
+ /* Match for DBUS_INTERFACE_DBUS */
+- dbus_bus_add_match( dbus_connection, "type='signal',interface='org.yauap.CommandInterface'", &error);
++ dbus_bus_add_match( dbus_signalconnection, "type='signal',interface='org.yauap.CommandInterface'", &error);
+ if ( dbus_error_is_set( &error ) )
+ {
+ debug() << "Error adding match, " << error.name << " " << error.message;
+@@ -134,6 +144,9 @@
+ if( dbus_connection )
+ dbus_connection_close( dbus_connection );
+
++ if( dbus_signalconnection )
++ dbus_connection_close( dbus_signalconnection );
++
+ if(qt_connection)
+ qt_connection->close();
+
+@@ -141,6 +154,7 @@
+ debug() << "calling dbus connection close" << endl;
+
+ dbus_connection = NULL;
++ dbus_signalconnection = NULL;
+ qt_connection = NULL;
+ debug() << "DBusConnection closed" << endl;
+ }
+@@ -150,6 +164,7 @@
+ {
+ qt_connection = NULL;
+ dbus_connection = NULL;
++ dbus_signalconnection = NULL;
+ context = c;
+ }
+
+--- amarok/src/engine/yauap/yauap-engine.h.org 2007-10-09 16:43:20.000000000 +0000
++++ amarok/src/engine/yauap/yauap-engine.h 2007-10-09 16:31:29.000000000 +0000
+@@ -32,6 +32,7 @@
+
+ DBusQt::Connection *qt_connection;
+ DBusConnection *dbus_connection;
++ DBusConnection *dbus_signalconnection;
+ yauapEngine *context;
+ QMutex m_mutex;
+
|
[-]
[+]
|
Added |
r715531.diff
^
|
@@ -0,0 +1,59 @@
+------------------------------------------------------------------------
+r715531 | mueller | 2007-09-22 12:22:21 +0200 (Sat, 22 Sep 2007) | 6 lines
+
+- can't use KGlobal::iconLoader()->iconPath from a subthread, it is not
+ threadsafe
+- can't use QImage::load from a thread, it is neither reentrant nor
+ threadsafe (uses unsafe QPtrList iterators and operates on shared
+ QRegexp, which is not reentrant).
+
+------------------------------------------------------------------------
+Index: amarok/src/contextbrowser.cpp
+===================================================================
+--- amarok/src/contextbrowser.cpp (revision 715530)
++++ amarok/src/contextbrowser.cpp (revision 715531)
+@@ -1105,6 +1105,10 @@ public:
+ {
+ m_metadataHistory += QDeepCopy<QString>( *it );
+ }
++
++
++ m_amarokIconPath = QDeepCopy<QString>(KGlobal::iconLoader()->iconPath( "amarok",
++ -KIcon::SizeEnormous ) );
+ }
+
+ private:
+@@ -1146,6 +1150,7 @@ private:
+ b->saveHtmlData(); // Send html code to file
+ }
+ QString m_HTMLSource;
++ QString m_amarokIconPath;
+
+ ContextBrowser *b;
+ MetaBundle m_currentTrack;
+@@ -1330,7 +1335,7 @@ void CurrentTrackJob::showHome()
+ "</div>\n" )
+ .args( QStringList()
+ << escapeHTMLAttr( "externalurl://amarok.kde.org" )
+- << escapeHTMLAttr( KGlobal::iconLoader()->iconPath( "amarok", -KIcon::SizeEnormous ) )
++ << escapeHTMLAttr( m_amarokIconPath )
+ << i18n( "1 Track", "%n Tracks", songCount.toInt() )
+ << i18n( "1 Artist", "%n Artists", artistCount.toInt() )
+ << i18n( "1 Album", "%n Albums", albumCount.toInt() )
+@@ -3193,11 +3198,15 @@ ContextBrowser::getEncodedImage( const Q
+ {
+ // Embed cover image in html (encoded string), to get around khtml's caching
+ //debug() << "Encoding imageUrl: " << imageUrl << endl;
+- const QImage img( imageUrl );
++ qApp->lock();
++ const QImage img( imageUrl, "PNG" );
++ qApp->unlock();
+ QByteArray ba;
+ QBuffer buffer( ba );
+ buffer.open( IO_WriteOnly );
++ qApp->lock();
+ img.save( &buffer, "PNG" ); // writes image into ba in PNG format
++ qApp->unlock();
+ const QString coverImage = QString( "data:image/png;base64,%1" ).arg( KCodecs::base64Encode( ba ) );
+ //debug() << "Encoded imageUrl: " << coverImage << endl;
+ return coverImage;
|
[-]
[+]
|
Added |
r717679.diff
^
|
@@ -0,0 +1,148 @@
+------------------------------------------------------------------------
+r717679 | mueller | 2007-09-27 11:50:56 +0200 (Thu, 27 Sep 2007) | 2 lines
+
+fix various threading races
+
+------------------------------------------------------------------------
+Index: amarok/src/collectiondb.cpp
+===================================================================
+--- amarok/src/collectiondb.cpp (revision 717678)
++++ amarok/src/collectiondb.cpp (revision 717679)
+@@ -217,6 +217,7 @@ CollectionDB::CollectionDB()
+ : EngineObserver( EngineController::instance() )
+ , m_autoScoring( true )
+ , m_noCover( locate( "data", "amarok/images/nocover.png" ) )
++ , m_shadowImage( locate( "data", "amarok/images/shadow_albumcover.png" ) )
+ , m_scanInProgress( false )
+ , m_rescanRequired( false )
+ , m_aftEnabledPersistentTables()
+@@ -2055,11 +2056,12 @@ CollectionDB::albumImage( const MetaBund
+ return s;
+ }
+
+-
+ QString
+ CollectionDB::makeShadowedImage( const QString& albumImage, bool cache )
+ {
+- const QImage original( albumImage );
++ qApp->lock();
++ const QImage original( albumImage, "PNG" );
++ qApp->unlock();
+
+ if( original.hasAlphaBuffer() )
+ return albumImage;
+@@ -2067,22 +2069,26 @@ CollectionDB::makeShadowedImage( const Q
+ const QFileInfo fileInfo( albumImage );
+ const uint shadowSize = static_cast<uint>( original.width() / 100.0 * 6.0 );
+ const QString cacheFile = fileInfo.fileName() + "@shadow";
+- QImage shadow;
+
+ if ( !cache && cacheCoverDir().exists( cacheFile ) )
+ return cacheCoverDir().filePath( cacheFile );
+
++ QImage shadow;
++
+ const QString folder = Amarok::saveLocation( "covershadow-cache/" );
+ const QString file = QString( "shadow_albumcover%1x%2.png" ).arg( original.width() + shadowSize ).arg( original.height() + shadowSize );
+- if ( QFile::exists( folder + file ) )
+- shadow.load( folder + file );
++ if ( QFile::exists( folder + file ) ) {
++ qApp->lock();
++ shadow.load( folder + file, "PNG" );
++ qApp->unlock();
++ }
+ else {
+- shadow.load( locate( "data", "amarok/images/shadow_albumcover.png" ) );
++ shadow = QDeepCopy<QImage>(instance()->m_shadowImage);
+ shadow = shadow.smoothScale( original.width() + shadowSize, original.height() + shadowSize );
+ shadow.save( folder + file, "PNG" );
+ }
+
+- QImage target( shadow );
++ QImage target(shadow);
+ bitBlt( &target, 0, 0, &original );
+
+ if ( cache ) {
+@@ -7834,7 +7840,7 @@ QString
+ QueryBuilder::tableName( int table )
+ {
+ // optimize for 1 table which is by far the most frequent case
+- static const QString tabNames[] = {
++ static const char tabNames[][16] = {
+ "album",
+ "artist",
+ "composer",
+Index: amarok/src/collectiondb.h
+===================================================================
+--- amarok/src/collectiondb.h (revision 717678)
++++ amarok/src/collectiondb.h (revision 717679)
+@@ -619,7 +619,7 @@ class LIBAMAROK_EXPORT CollectionDB : pu
+
+ static QMap<QListViewItem*, CoverFetcher*> *itemCoverMap;
+ static QMutex *itemCoverMapMutex;
+- QImage m_noCover;
++ QImage m_noCover, m_shadowImage;
+
+ static QMap<QThread *, DbConnection *> *threadConnections;
+ static QMutex *connectionMutex;
+Index: amarok/src/collectionbrowser.cpp
+===================================================================
+--- amarok/src/collectionbrowser.cpp (revision 717678)
++++ amarok/src/collectionbrowser.cpp (revision 717679)
+@@ -63,7 +63,6 @@
+ #include <klocale.h>
+ #include <kmessagebox.h>
+ #include <kpopupmenu.h>
+-#include <kstandarddirs.h> //KGlobal::dirs()
+ #include <ktoolbarbutton.h> //ctor
+ #include <kurldrag.h> //dragObject()
+ #include <kio/job.h>
+Index: amarok/src/contextbrowser.cpp
+===================================================================
+--- amarok/src/contextbrowser.cpp (revision 717678)
++++ amarok/src/contextbrowser.cpp (revision 717679)
+@@ -1109,6 +1109,9 @@ public:
+
+ m_amarokIconPath = QDeepCopy<QString>(KGlobal::iconLoader()->iconPath( "amarok",
+ -KIcon::SizeEnormous ) );
++ m_musicBrainIconPath = QDeepCopy<QString>(locate( "data", "amarok/images/musicbrainz.png" )
++ );
++ m_lastfmIcon = "file://" + locate( "data","amarok/images/lastfm.png" );
+ }
+
+ private:
+@@ -1151,6 +1154,8 @@ private:
+ }
+ QString m_HTMLSource;
+ QString m_amarokIconPath;
++ QString m_musicBrainIconPath;
++ QString m_lastfmIcon;
+
+ ContextBrowser *b;
+ MetaBundle m_currentTrack;
+@@ -1749,7 +1754,6 @@ void CurrentTrackJob::showLastFm( const
+ const QString albumUrl = lastFmInfo->albumUrl();
+ const QString artistUrl = lastFmInfo->artistUrl();
+ const QString titleUrl = lastFmInfo->titleUrl();
+- const QString lastfmIcon = "file://" + locate( "data","amarok/images/lastfm.png" );
+
+ const QString coverImage = ContextBrowser::getEncodedImage( lastFmInfo->imageUrl() );
+
+@@ -1824,7 +1828,7 @@ void CurrentTrackJob::showLastFm( const
+ << escapeHTMLAttr( currentTrack.album() )//10
+ << escapeHTMLAttr( userpage ) //11
+ << escapeHTMLAttr( userpage ) //12
+- << escapeHTMLAttr( lastfmIcon ) //13
++ << escapeHTMLAttr( m_lastfmIcon ) //13
+ << escapeHTML( i18n( "Skip" ) ) //14
+ << escapeHTMLAttr( skipIcon ) //15
+ << escapeHTML( i18n( "Love" ) ) //16
+@@ -2255,7 +2259,7 @@ void CurrentTrackJob::showCurrentArtistH
+ << escapeHTMLAttr( currentTrack.artist() )
+ << escapeHTMLAttr( currentTrack.album() )
+ << escapeHTMLAttr( currentTrack.title() )
+- << escapeHTML( locate( "data", "amarok/images/musicbrainz.png" ) ) )
++ << escapeHTML( m_musicBrainIconPath ) )
+ : QString ( //no title
+ "<span id='current_box-header-prettytitle' class='box-header-prettytitle'>%1</span> "
+ "</div>\n"
|
[-]
[+]
|
Added |
r717787.diff
^
|
@@ -0,0 +1,39 @@
+------------------------------------------------------------------------
+r717787 | mueller | 2007-09-27 17:21:57 +0200 (Thu, 27 Sep 2007) | 2 lines
+
+also accept uint32 as a reply
+
+------------------------------------------------------------------------
+Index: amarok/src/engine/yauap/yauap-engine.cpp
+===================================================================
+--- amarok/src/engine/yauap/yauap-engine.cpp (revision 717786)
++++ amarok/src/engine/yauap/yauap-engine.cpp (revision 717787)
+@@ -197,8 +197,9 @@ DBusConnection::call(const char *method,
+
+ if (msg) {
+ DBusMessageIter args;
+- if (dbus_message_iter_init(msg, &args) && DBUS_TYPE_INT32 ==
+- dbus_message_iter_get_arg_type(&args))
++ if (dbus_message_iter_init(msg, &args) &&
++ (DBUS_TYPE_INT32 == dbus_message_iter_get_arg_type(&args) ||
++ DBUS_TYPE_UINT32 == dbus_message_iter_get_arg_type(&args)))
+ dbus_message_iter_get_basic(&args, &ret);
+
+ dbus_message_unref (msg);
+@@ -569,7 +570,7 @@ yauapEngine::length() const
+ int length = con->call("get_length", DBUS_TYPE_INVALID);
+ if (length < 0) return 0;
+
+- debug() << "=> " << length << endl;
++ debug() << "length is => " << length << endl;
+ return (uint) length;
+ }
+
+@@ -580,6 +581,7 @@ yauapEngine::position() const
+ int position = 0;
+
+ position = con->call("get_position", DBUS_TYPE_INVALID);
++
+ if (position < 0) position = 0;
+ return (uint) position;
+ }
|
[-]
[+]
|
Added |
undefined-entity.diff
^
|
@@ -0,0 +1,29 @@
+--- doc/de/faq.docbook 2007/08/19 14:01:16 1.1
++++ doc/de/faq.docbook 2007/08/19 14:01:35
+@@ -286,7 +286,7 @@
+
+ <answer>
+ <para
+->Ja. Klicken Sie mit der &RMBn; auf den Kontext-Browser und wählen die gewünschten Einstellungen.</para>
++>Ja. Klicken Sie mit der RMBn auf den Kontext-Browser und wählen die gewünschten Einstellungen.</para>
+ </answer>
+ </qandaentry>
+
+@@ -312,7 +312,7 @@
+
+ <answer>
+ <para
+->Um Stücke zu bewerten, muss in der Wiedergabeliste die Bewertungsspalte angezeigt werden. Klicken Sie mit der &RMBn; auf die Titelleiste der Wiedergabeliste und wählen Sie <menuchoice
++>Um Stücke zu bewerten, muss in der Wiedergabeliste die Bewertungsspalte angezeigt werden. Klicken Sie mit der RMBn auf die Titelleiste der Wiedergabeliste und wählen Sie <menuchoice
+ ><guimenu
+ >Spalte anzeigen</guimenu
+ > <guimenuitem
+@@ -830,7 +830,7 @@
+
+ <answer>
+ <para
+->Klicken Sie mit der &RMBn; auf den Titel eines Browsers. In dem Kontextmenü können Sie auswählen, welche Browser angezeigt werden sollen.</para>
++>Klicken Sie mit der RMBn auf den Titel eines Browsers. In dem Kontextmenü können Sie auswählen, welche Browser angezeigt werden sollen.</para>
+ </answer>
+ </qandaentry>
+
|
[-]
[+]
|
Added |
yauap-deadlock.diff
^
|
@@ -0,0 +1,91 @@
+Index: amarok/src/engine/yauap/yauap-engine.cpp
+===================================================================
+--- amarok/src/engine/yauap/yauap-engine.cpp (revision 717759)
++++ amarok/src/engine/yauap/yauap-engine.cpp (working copy)
+@@ -67,6 +70,16 @@ signal_handler( DBusConnection * /*con*/
+ return (handled ? DBUS_HANDLER_RESULT_HANDLED : DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
+ }
+
++int
++yauapProcess::commSetupDoneC()
++{
++ Amarok::Process::commSetupDoneC();
++ int fd = open("/dev/null", O_RDWR);
++ dup2(fd, 1);
++ dup2(fd, 2);
++ close(fd);
++}
++
+ /* create a qt dbus connection that will receive the signals */
+ bool
+ DBusConnection::open()
+@@ -212,16 +225,16 @@ DBusConnection::send_with_reply(const ch
+ YAUAP_DBUS_SERVICE, YAUAP_DBUS_PATH, YAUAP_DBUS_INTERFACE, method);
+
+ if (msg) {
+- dbus_message_append_args_valist(msg, first_arg_type, ap);
++ DBusError error; dbus_error_init(&error);
+
+- DBusPendingCall* pcall = 0;
++ dbus_message_append_args_valist(msg, first_arg_type, ap);
+
+- dbus_connection_send_with_reply(dbus_connection, msg, &pcall, -1);
+- dbus_message_unref (msg);
++ DBusMessage* oldmsg = msg;
++ msg = dbus_connection_send_with_reply_and_block(dbus_connection, oldmsg, -1, &error);
++ dbus_message_unref (oldmsg);
+
+- dbus_pending_call_block(pcall);
+- msg = dbus_pending_call_steal_reply(pcall);
+- dbus_pending_call_unref(pcall);
++ if (!msg)
++ debug() << "dbus error while waiting for reply: " << error.message << endl;
+ }
+
+ return msg;
+Index: amarok/src/engine/yauap/yauap-engine.h
+===================================================================
+--- amarok/src/engine/yauap/yauap-engine.h (revision 717759)
++++ amarok/src/engine/yauap/yauap-engine.h (working copy)
+@@ -19,7 +19,7 @@ copyright : (C) 2006 by Sasch
+ #define DBUS_API_SUBJECT_TO_CHANGE
+ #include <dbus/connection.h>
+
+-#include <kprocess.h>
++#include <amarok.h>
+
+ #include "enginebase.h"
+ #include "debug.h"
+@@ -47,6 +47,14 @@ public:
+ int call(const char *method, int first_arg_type, ...);
+ };
+
++class yauapProcess : public Amarok::Process
++{
++public:
++ yauapProcess(QObject* parent) : Amarok::Process(parent) {}
++
++ virtual int commSetupDoneC();
++};
++
+ class yauapEngine : public Engine::Base
+ {
+ Q_OBJECT
+@@ -70,7 +78,7 @@ class yauapEngine : public Engine::Base
+ virtual bool getAudioCDContents(const QString &device, KURL::List &urls);
+ virtual bool metaDataForUrl(const KURL &url, Engine::SimpleMetaBundle &b);
+ public:
+- yauapEngine() : EngineBase() {}
++ yauapEngine() : EngineBase(), helper(0) {}
+ /* these need to be public because they are called from the dbus signal handler */
+ void update_metadata();
+ void update_scope();
+@@ -90,7 +98,7 @@ private:
+ Engine::State m_state;
+ DBusConnection *con;
+ /* helper process to start */
+- KProcess helper;
++ yauapProcess helper;
+ };
+
+ #endif
|
[-]
[+]
|
Added |
yauap-fixes.diff
^
|
@@ -0,0 +1,912 @@
+--- amarok/configure.in.in
++++ amarok/configure.in.in
+@@ -352,7 +352,7 @@ if test "$build_yauap" != "no"; then
+ # check for dbus-glib
+ have_yauap=no
+
+- PKG_CHECK_MODULES(DBUSGLIB, dbus-glib-1,
++ PKG_CHECK_MODULES(DBUS, dbus-1,
+ have_yauap=yes,have_yauap=no)
+
+
+@@ -361,10 +361,8 @@ if test "$build_yauap" != "no"; then
+ LIB_YAUAP=""
+ CFLAGS_YAUAP=""
+ else
+- PKG_CHECK_MODULES(GOBJECT, gobject-2.0,
+- have_yauap=yes,have_yauap=no)
+- LIB_YAUAP="$DBUSGLIB_LIBS -ldbus-qt-1 $GOBJECT_LIBS"
+- CFLAGS_YAUAP="$DBUSGLIB_CFLAGS $GOBJECT_CFLAGS"
++ LIB_YAUAP="$DBUS_LIBS -ldbus-qt-1"
++ CFLAGS_YAUAP="$DBUS_CFLAGS"
+ AC_SUBST(LIB_YAUAP)
+ AC_SUBST(CFLAGS_YAUAP)
+ AC_DEFINE(HAVE_YAUAP, 1, [have yauap])
+--- amarok/src/engine/yauap/yauap-engine.cpp
++++ amarok/src/engine/yauap/yauap-engine.cpp
+@@ -16,13 +16,6 @@ copyright : (C) 2006 by Sasch
+
+ #include <qprocess.h>
+
+-/* FIXME use the qt bindings....
+- we can't use the glib signal handling because it requires a g_main loop
+- otherwise the glib bindings might probably be ok because gstreamer is using glib anyway
+- Currently the engine uses the c bindings for signal handling and the glib bindings for function calls
+-
+-*/
+-#include <dbus/dbus-glib.h>
+ #include <klocale.h>
+ #include <iostream>
+ #include <stdlib.h>
+@@ -31,7 +24,9 @@ copyright : (C) 2006 by Sasch
+ #include <dbus/connection.h>
+
+ //#define MANUAL_YAUAP_START
+-#define YAUAP_STARTUP_TIMEOUT 10000
++#define YAUAP_DBUS_SERVICE "org.yauap.CommandService"
++#define YAUAP_DBUS_PATH "/yauapObject"
++#define YAUAP_DBUS_INTERFACE "org.yauap.CommandInterface"
+
+ #include "yauap-engine.h"
+ #include "debug.h"
+@@ -138,7 +133,7 @@ DBusConnection::close()
+ }
+
+
+-DBusConnection::DBusConnection( void* c )
++DBusConnection::DBusConnection( yauapEngine* c )
+ {
+ qt_connection = NULL;
+ dbus_connection = NULL;
+@@ -150,6 +145,89 @@ DBusConnection::~DBusConnection()
+ close();
+ }
+
++bool
++DBusConnection::send(const char *method, int first_arg_type, ...)
++{
++ dbus_uint32_t serial = 0;
++ bool ret = false;
++
++ QMutexLocker lock(&m_mutex);
++
++ DBusMessage* msg = dbus_message_new_method_call(
++ YAUAP_DBUS_SERVICE, YAUAP_DBUS_PATH, YAUAP_DBUS_INTERFACE,
++ method);
++
++ if (msg) {
++ va_list ap;
++
++ va_start(ap, first_arg_type);
++ dbus_message_append_args_valist(msg, first_arg_type, ap);
++ va_end(ap);
++
++ ret = dbus_connection_send(dbus_connection, msg, &serial);
++ dbus_message_unref (msg);
++ }
++
++ return ret;
++}
++
++int
++DBusConnection::call(const char *method, int first_arg_type, ...)
++{
++ dbus_uint32_t ret = -1;
++
++ va_list ap;
++ va_start (ap, first_arg_type);
++ DBusMessage* msg = send_with_reply(method, first_arg_type, ap);
++ va_end (ap);
++
++ if (msg) {
++ DBusMessageIter args;
++ if (dbus_message_iter_init(msg, &args) && DBUS_TYPE_INT32 ==
++ dbus_message_iter_get_arg_type(&args))
++ dbus_message_iter_get_basic(&args, &ret);
++
++ dbus_message_unref (msg);
++ }
++
++ return ret;
++}
++
++DBusMessage*
++DBusConnection::send_with_reply(const char* method, int first_arg_type, ...)
++{
++ va_list ap;
++ va_start(ap, first_arg_type);
++ DBusMessage* msg = send_with_reply(method, first_arg_type, ap);
++ va_end(ap);
++ return msg;
++}
++
++DBusMessage*
++DBusConnection::send_with_reply(const char* method, int first_arg_type, va_list ap)
++{
++ QMutexLocker lock(&m_mutex);
++
++ DBusMessage* msg = dbus_message_new_method_call(
++ YAUAP_DBUS_SERVICE, YAUAP_DBUS_PATH, YAUAP_DBUS_INTERFACE, method);
++
++ if (msg) {
++ dbus_message_append_args_valist(msg, first_arg_type, ap);
++
++ DBusPendingCall* pcall = 0;
++
++ dbus_connection_send_with_reply(dbus_connection, msg, &pcall, -1);
++ dbus_message_unref (msg);
++
++ dbus_pending_call_block(pcall);
++ msg = dbus_pending_call_steal_reply(pcall);
++ dbus_pending_call_unref(pcall);
++ }
++
++ return msg;
++}
++
++
+ /* emit state change signal */
+ void
+ yauapEngine::change_state( Engine::State state )
+@@ -161,74 +239,58 @@ yauapEngine::change_state( Engine::State
+ /* destroy engine */
+ yauapEngine::~yauapEngine()
+ {
+- GError *error = NULL;
+ /* make sure we really stopped */
+ stop();
+
+ /* quit the player */
+- if ( !dbus_g_proxy_call( remote_object, "quit", &error,
+- G_TYPE_INVALID,
+- G_TYPE_INVALID) )
+- {
+-
+- debug() << "quit failed " << error->message << endl;
+- g_error_free( error );
+- }
+-
++ if ( !con->send("quit", DBUS_TYPE_INVALID) )
++ debug() << "quit failed " << endl;
+
+- /* destroy Qt DBus connection */
+- if(con)
+- delete con;
+-
+- /* free remote object */
+- if(remote_object)
+- g_object_unref(remote_object);
+-
+- /* kill yauap */
+-#ifndef MANUAL_YAUAP_START
+- helper.kill();
+-#endif
++ delete con;
+ }
+
+ /* fetch metadata from yauap */
+ void
+-yauapEngine::update_metadata(void){
++yauapEngine::update_metadata()
++{
+ Engine::SimpleMetaBundle bndl;
+- GError *error = NULL;
+- char **reply_list;
+- char **reply_ptr;
+ debug() << " emit metadata change " << endl;
+
++ DBusMessage* msg = con->send_with_reply("get_metadata", DBUS_TYPE_INVALID);
++ if (msg) {
|
[-]
[+]
|
Added |
yauap-kprocess.diff
^
|
@@ -0,0 +1,57 @@
+--- amarok/src/engine/yauap/yauap-engine.cpp
++++ amarok/src/engine/yauap/yauap-engine.cpp
+@@ -301,15 +301,13 @@ yauapEngine::init( void )
+ {
+ GError *error = NULL;
+ int i, ret = 0;
+-
++
+ debug() << "In init" << endl;
+
+ #ifndef MANUAL_YAUAP_START
+ /* start yauap in slave mode */
+- helper.addArgument( "yauap" );
+- helper.addArgument( "-noexit" );
+- helper.setCommunication( QProcess::Stdin|QProcess::Stdout );
+-
++ helper << "yauap" << "-noexit";
++
+ if( !helper.start() )
+ {
+ debug() << "could not start yauap " << endl;
+@@ -318,7 +316,6 @@ yauapEngine::init( void )
+ }
+ #endif
+
+-
+ /* create and open qt DBus connection so that we are able to receive signals */
+ con = new DBusConnection( (void*) this );
+ con->open();
+--- amarok/src/engine/yauap/yauap-engine.h
++++ amarok/src/engine/yauap/yauap-engine.h
+@@ -16,6 +16,7 @@ copyright : (C) 2006 by Sasch
+ #define DBUS_API_SUBJECT_TO_CHANGE
+ #include <dbus/connection.h>
+
++#include <kprocess.h>
+
+ #include "enginebase.h"
+ #include "debug.h"
+@@ -38,7 +39,7 @@ public:
+
+ class yauapEngine : public Engine::Base
+ {
+- virtual ~yauapEngine();
++ virtual ~yauapEngine();
+ virtual bool init();
+ virtual bool canDecode( const KURL& ) const;
+ virtual uint position() const ;
+@@ -70,7 +71,7 @@ private:
+ Engine::State m_state;
+ DBusConnection *con;
+ /* helper process to start */
+- QProcess helper;
++ KProcess helper;
+ };
+
+
|
[-]
[+]
|
Added |
yauap-url.diff
^
|
@@ -0,0 +1,49 @@
+------------------------------------------------------------------------
+r713921 | mueller | 2007-09-18 11:19:02 +0200 (Tue, 18 Sep 2007) | 2 lines
+Changed paths:
+ M /branches/stable/extragear/multimedia/amarok/src/engine/yauap/yauap-engine.cpp
+
+it is not guaranteed that prettyURL() is a valid URL. use url() instead
+
+------------------------------------------------------------------------
+--- amarok/src/engine/yauap/yauap-engine.cpp
++++ amarok/src/engine/yauap/yauap-engine.cpp
+@@ -371,13 +371,13 @@ bool
+ yauapEngine::canDecode( const KURL &kurl ) const
+ {
+ GError *error = NULL;
+- QString qurl = kurl.prettyURL();
++ QString qurl = kurl.url();
+ const char* url = qurl.ascii();
+ int can_decode = 0;
+-
+- debug() << "In canDecode " << url << endl ;
++
++ debug() << " In canDecode " << url << endl ;
+ if (!dbus_g_proxy_call( remote_object, "can_decode", &error,
+- G_TYPE_STRING,url,
++ G_TYPE_STRING, url,
+ G_TYPE_INVALID,
+ G_TYPE_INT,&can_decode,
+ G_TYPE_INVALID))
+@@ -387,7 +387,7 @@ yauapEngine::canDecode( const KURL &kurl
+ g_error_free( error );
+ return false;
+ }
+-
++
+ debug() << "=> " << can_decode << endl;
+
+ if( can_decode )
+@@ -400,10 +400,9 @@ bool
+ yauapEngine::load( const KURL &url, bool isStream )
+ {
+ GError *error = NULL;
+- QString qurl = url.prettyURL();
++ QString qurl = url.url();
+ const char* curl = qurl.ascii();
+ int gerror = 0;
+- debug() << "In load " << curl << endl;
+
+ m_isStream = isStream;
+
|
|
Added |
amarok-1.4.7-112.pm.1.src.rpm
^
|