argc->airplay_volume);
shairport_sync_remote_control_set_client(shairportSyncRemoteControlSkeleton, argc->client_ip);
+ shairport_sync_remote_control_set_client_name(shairportSyncRemoteControlSkeleton, argc->client_name);
// although it's a DACP server, the server is in fact, part of the the AirPlay "client" (their
// term).
// NULL);
#endif
+ shairport_sync_set_service_name(SHAIRPORT_SYNC(shairportSyncSkeleton), config.service_name);
+
#ifdef CONFIG_AIRPLAY_2
shairport_sync_set_protocol(SHAIRPORT_SYNC(shairportSyncSkeleton), "AirPlay 2");
#else
// turn off changed flags
metadata_store.cover_art_pathname_changed = 0;
metadata_store.client_ip_changed = 0;
+ metadata_store.client_name_changed = 0;
metadata_store.server_ip_changed = 0;
metadata_store.progress_string_changed = 0;
metadata_store.item_id_changed = 0;
}
free(cs);
break;
+ case 'snam':
+ cs = strndup(data, length);
+ if (string_update(&metadata_store.client_name, &metadata_store.client_name_changed, cs)) {
+ changed = 1;
+ debug(1, "MH Client Name set to: \"%s\"", metadata_store.client_name);
+ }
+ free(cs);
+ break;
case 'prgr':
cs = strndup(data, length);
if (string_update(&metadata_store.progress_string, &metadata_store.progress_string_changed,
// server
int client_ip_changed;
+ char *client_name; // the name of the client device, if available
+ int client_name_changed;
+
char *server_ip; // IP number used by Shairport Sync
int server_ip_changed;
case 'svip':
mqtt_publish("server_ip", data, length);
break;
+ case 'svna':
+ mqtt_publish("service_name", data, length);
+ break;
}
}
}
<property name="Version" type="s" access="read" />
<property name="VersionString" type="s" access="read" />
<property name="Protocol" type="s" access="read" />
+ <property name="ServiceName" type="s" access="read" />
</interface>
<interface name="org.gnome.ShairportSync.Diagnostics">
<property name="Verbosity" type="i" access="readwrite" />
<property name='PlayerState' type='s' access='read'/>
<property name='ProgressString' type='s' access='read'/>
<property name='Client' type='s' access='read'/>
+ <property name='ClientName' type='s' access='read'/>
<property name='AirplayVolume' type='d' access='read'/>
<method name="SetAirplayVolume">
<arg name="volume" type="d" direction="in" />
"and open a TCP port.",
conn->connection_number);
conn->airplay_stream_category = unspecified_stream_category;
+
// figure out what category of stream it is, by looking at the plist
plist_t timingProtocol = plist_dict_get_item(messagePlist, "timingProtocol");
if (timingProtocol != NULL) {
// play session is stopped.
// `svip` -- the payload is the IP number of the server, i.e. the player itself.
// Can be an IPv4 or an IPv6 number.
+// `svna` -- the payload is the service name of the player, i.e. the name by
+// which it is seen in the AirPlay menu.
// `disc` -- the payload is the IP number of the client, i.e. the sender of audio.
// Can be an IPv4 or an IPv6 number. This is an AirPlay-2-only message.
// It is sent when a client has been disconnected.
}
#endif
+#ifdef CONFIG_METADATA
+ send_ssnc_metadata('svna', config.service_name, strlen(config.service_name), 1);
+#endif
+
activity_monitor_start(); // not yet for AP2
pthread_create(&rtsp_listener_thread, NULL, &rtsp_listen_loop, NULL);
atexit(exit_rtsp_listener);