mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-02-14 05:20:33 +01:00
audio-softdsp-endpoint: set name and media-class endpoint properties on creation
This commit is contained in:
parent
21e9f0d98b
commit
f8a3c09902
1 changed files with 13 additions and 4 deletions
|
|
@ -49,13 +49,22 @@ endpoint_class_init (WpPwAudioSoftdspEndpointClass * klass)
|
|||
static gpointer
|
||||
endpoint_factory (WpFactory * factory, GType type, GVariant * properties)
|
||||
{
|
||||
const gchar *name = NULL;
|
||||
const gchar *media_class = NULL;
|
||||
|
||||
if (type != WP_TYPE_ENDPOINT)
|
||||
return NULL;
|
||||
|
||||
/* TODO: retrieve pw_node* from @properties and keep it
|
||||
* TODO: populate media_class and name on the endpoint
|
||||
*/
|
||||
return g_object_new (endpoint_get_type (), NULL);
|
||||
/* Get the name and media-class */
|
||||
if (!g_variant_lookup (properties, "name", "&s", &name))
|
||||
return NULL;
|
||||
if (!g_variant_lookup (properties, "media-class", "&s", &media_class))
|
||||
return NULL;
|
||||
|
||||
return g_object_new (endpoint_get_type (),
|
||||
"name", name,
|
||||
"media-class", media_class,
|
||||
NULL);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue