This commit is contained in:
Mike Brady
2018-03-20 16:50:01 +00:00
parent 26d7b07926
commit 73ee3fb6ec
+11 -12
View File
@@ -90,23 +90,22 @@ int main(int argc, char *argv[]) {
pthread_create(&dbus_thread, NULL, &dbus_thread_func, NULL);
GError *error1 = NULL;
MediaPlayer2 *proxy1 = media_player2_proxy_new_for_bus_sync(gbus_type_selected, G_DBUS_PROXY_FLAGS_NONE,
"org.mpris.MediaPlayer2.ShairportSync",
"/org/mpris/MediaPlayer2", NULL, &error1);
GError *error1 = NULL;
MediaPlayer2 *proxy1 = media_player2_proxy_new_for_bus_sync(
gbus_type_selected, G_DBUS_PROXY_FLAGS_NONE, "org.mpris.MediaPlayer2.ShairportSync",
"/org/mpris/MediaPlayer2", NULL, &error1);
if (error1)
printf("Error proxying MediaPlayer2");
printf("Error proxying MediaPlayer2");
g_signal_connect(proxy1, "g-properties-changed", G_CALLBACK(on_properties_changed), NULL);
GError *error2 = NULL;
MediaPlayer2Player *proxy2 = media_player2_player_proxy_new_for_bus_sync(gbus_type_selected, G_DBUS_PROXY_FLAGS_NONE,
"org.mpris.MediaPlayer2.ShairportSync",
"/org/mpris/MediaPlayer2", NULL, &error2);
GError *error2 = NULL;
MediaPlayer2Player *proxy2 = media_player2_player_proxy_new_for_bus_sync(
gbus_type_selected, G_DBUS_PROXY_FLAGS_NONE, "org.mpris.MediaPlayer2.ShairportSync",
"/org/mpris/MediaPlayer2", NULL, &error2);
if (error2)
printf("Error proxying MediaPlayer2Player");
printf("Error proxying MediaPlayer2Player");
g_signal_connect(proxy2, "g-properties-changed", G_CALLBACK(on_properties_changed), NULL);
// g_main_loop_quit(loop);
pthread_join(dbus_thread, NULL);
printf("exiting program.\n");