Search
j0ke.net Open Build Service
>
Projects
>
multimedia
>
amarok
> gstreamer-playlist.diff
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File gstreamer-playlist.diff of Package amarok (Revision 12)
Currently displaying revision
12
,
show latest
--- 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;