ef1bd61e0b3be57460ce0d0b9a6fb088c3756fdc
[AGL/meta-agl-devel.git] /
1 From 0e3df7c3612fadf5319efb231fcd16ef16cd6e1a Mon Sep 17 00:00:00 2001
2 From: Julian Bouzas <julian.bouzas@collabora.com>
3 Date: Thu, 29 Aug 2019 13:58:13 -0400
4 Subject: [PATCH] device: add name field in spa_device_object_info
5
6 Upstream-Status: Pending
7 ---
8  spa/include/spa/monitor/device.h | 1 +
9  src/pipewire/device.c            | 2 +-
10  2 files changed, 2 insertions(+), 1 deletion(-)
11
12 diff --git a/spa/include/spa/monitor/device.h b/spa/include/spa/monitor/device.h
13 index 765e96f8..51a467b1 100644
14 --- a/spa/include/spa/monitor/device.h
15 +++ b/spa/include/spa/monitor/device.h
16 @@ -59,6 +59,7 @@ struct spa_device_object_info {
17  
18         uint32_t type;
19         const struct spa_handle_factory *factory;
20 +       const char *name;
21  
22  #define SPA_DEVICE_OBJECT_CHANGE_MASK_FLAGS    (1u<<0)
23  #define SPA_DEVICE_OBJECT_CHANGE_MASK_PROPS    (1u<<1)
24 diff --git a/src/pipewire/device.c b/src/pipewire/device.c
25 index 11907d13..4cfac06e 100644
26 --- a/src/pipewire/device.c
27 +++ b/src/pipewire/device.c
28 @@ -389,7 +389,7 @@ static void device_add(struct pw_device *device, uint32_t id,
29                 pw_properties_update(props, info->props);
30  
31         node = pw_node_new(device->core,
32 -                          device->info.name,
33 +                          info->name ? info->name : device->info.name,
34                            props,
35                            sizeof(struct node_data) +
36                            spa_handle_factory_get_size(info->factory, info->props));
37 -- 
38 2.23.0.rc1
39