mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
deviceprovider: only create devices once
We can get many info updates from a device. Only create the device once and ignore the other updates.
This commit is contained in:
parent
c524fae523
commit
935efffe0e
1 changed files with 4 additions and 0 deletions
|
|
@ -348,8 +348,12 @@ static void node_event_info(void *data, struct pw_node_info *info)
|
||||||
{
|
{
|
||||||
struct node_data *node_data = data;
|
struct node_data *node_data = data;
|
||||||
GstPipeWireDeviceProvider *self = node_data->self;
|
GstPipeWireDeviceProvider *self = node_data->self;
|
||||||
|
GstDeviceProvider *provider = GST_DEVICE_PROVIDER (self);
|
||||||
GstDevice *dev;
|
GstDevice *dev;
|
||||||
|
|
||||||
|
if (find_device (provider, node_data->id) != NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
dev = new_node (self, info, node_data->id);
|
dev = new_node (self, info, node_data->id);
|
||||||
if (dev) {
|
if (dev) {
|
||||||
if(self->list_only)
|
if(self->list_only)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue