Skip to content
Snippets Groups Projects
Commit f8a3c099 authored by Julian Bouzas's avatar Julian Bouzas
Browse files

audio-softdsp-endpoint: set name and media-class endpoint properties on creation

parent 21e9f0d9
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment