gst: deviceprovider: Signal default devices

By setting a "is-default" boolean property on the discovered GstDevice(s) the
application now gets a good hint of which device to select and use.

Fixes #4268
This commit is contained in:
Philippe Normand 2024-09-08 12:15:44 +01:00 committed by Wim Taymans
parent 5ed170f6c4
commit 08057e0328
2 changed files with 115 additions and 6 deletions

View file

@ -9,8 +9,9 @@
#include <gst/gst.h>
#include <pipewire/pipewire.h>
#include <gst/gstpipewirecore.h>
#include <pipewire/extensions/metadata.h>
#include <pipewire/pipewire.h>
G_BEGIN_DECLS
@ -49,6 +50,14 @@ struct _GstPipeWireDeviceProvider {
struct spa_hook core_listener;
struct pw_registry *registry;
struct spa_hook registry_listener;
struct pw_metadata *metadata;
struct spa_hook metadata_listener;
gchar *default_audio_source_name;
gchar *default_audio_sink_name;
gchar *default_video_source_name;
struct spa_list nodes;
int seq;