From: Mike Brady Date: Sun, 4 Mar 2018 17:43:43 +0000 (+0000) Subject: Hook up the dbus metadata watcher and the dacp volume control stuff. X-Git-Tag: 3.2d29~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c025bf008ecc3dbcc665e80159ed863563b2cf08;p=thirdparty%2Fshairport-sync.git Hook up the dbus metadata watcher and the dacp volume control stuff. --- diff --git a/dbus-service.c b/dbus-service.c index f030bd84..524bbb3f 100644 --- a/dbus-service.c +++ b/dbus-service.c @@ -11,8 +11,15 @@ #include "dacp.h" +#include "metadata_hub.h" #include "dbus-service.h" +void dbus_metadata_watcher(struct metadata_bundle *argc, void *userdata) { + // debug(1, "DBUS metadata watcher called"); + shairport_sync_set_volume(shairportSyncSkeleton, metadata_store.speaker_volume); +} + + gboolean notify_loudness_filter_active_callback(ShairportSync *skeleton, gpointer user_data) { debug(1, "\"notify_loudness_filter_active_callback\" called."); if (shairport_sync_get_loudness_filter_active(skeleton)) { @@ -177,6 +184,9 @@ static void on_dbus_name_acquired(GDBusConnection *connection, const gchar *name NULL); g_signal_connect(shairportSyncSkeleton, "handle-remote-command", G_CALLBACK(on_handle_remote_command), NULL); + + add_metadata_watcher(dbus_metadata_watcher, NULL); + debug(1, "Shairport Sync native D-Bus service started at \"%s\" on the %s bus.", name, (config.dbus_service_bus_type == DBT_session) ? "session" : "system"); }