mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
module-metadata: set factory id in properties
This commit is contained in:
parent
a8faad9f17
commit
b118a84a60
1 changed files with 5 additions and 0 deletions
|
|
@ -67,6 +67,7 @@ static void *create_object(void *_data,
|
||||||
struct pw_properties *properties,
|
struct pw_properties *properties,
|
||||||
uint32_t new_id)
|
uint32_t new_id)
|
||||||
{
|
{
|
||||||
|
struct factory_data *data = _data;
|
||||||
void *result;
|
void *result;
|
||||||
struct pw_resource *metadata_resource;
|
struct pw_resource *metadata_resource;
|
||||||
struct pw_impl_client *client = pw_resource_get_client(resource);
|
struct pw_impl_client *client = pw_resource_get_client(resource);
|
||||||
|
|
@ -78,6 +79,10 @@ static void *create_object(void *_data,
|
||||||
goto error_resource;
|
goto error_resource;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (properties)
|
||||||
|
pw_properties_setf(properties, PW_KEY_FACTORY_ID, "%d",
|
||||||
|
pw_impl_factory_get_info(data->this)->id);
|
||||||
|
|
||||||
result = pw_metadata_new(pw_impl_client_get_context(client), metadata_resource, properties);
|
result = pw_metadata_new(pw_impl_client_get_context(client), metadata_resource, properties);
|
||||||
if (result == NULL) {
|
if (result == NULL) {
|
||||||
res = -errno;
|
res = -errno;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue