media-session: expose metadata method

Expose a method to create an export metadata with a certain name.
This commit is contained in:
Wim Taymans 2020-11-20 17:58:08 +01:00
parent d822a0b1d0
commit 5af2efdaa6
3 changed files with 44 additions and 38 deletions

View file

@ -76,7 +76,6 @@
int sm_access_flatpak_start(struct sm_media_session *sess);
int sm_access_portal_start(struct sm_media_session *sess);
int sm_metadata_start(struct sm_media_session *sess);
int sm_default_nodes_start(struct sm_media_session *sess);
int sm_default_profile_start(struct sm_media_session *sess);
int sm_default_routes_start(struct sm_media_session *sess);
@ -2054,6 +2053,14 @@ static void session_shutdown(struct impl *impl)
pw_core_info_free(impl->this.info);
}
static int sm_metadata_start(struct sm_media_session *sess)
{
sess->metadata = sm_media_session_export_metadata(sess, "default");
if (sess->metadata == NULL)
return -errno;
return 0;
}
static int sm_pulse_bridge_start(struct sm_media_session *sess)
{
if (pw_context_load_module(sess->context,