diff options
author | Marvin W <git@larma.de> | 2022-02-12 14:35:44 +0100 |
---|---|---|
committer | Marvin W <git@larma.de> | 2022-02-12 14:36:26 +0100 |
commit | 369d0c79d7272b4059c39ecedb10a62121bfbe56 (patch) | |
tree | 6ae87a1fd71b68dd8eff163c2b01dc5903f58ee0 /plugins/rtp/src/device.vala | |
parent | 0f5f57888e2e237549b1bc7002770ec102ff0e6b (diff) | |
download | dino-369d0c79d7272b4059c39ecedb10a62121bfbe56.tar.gz dino-369d0c79d7272b4059c39ecedb10a62121bfbe56.zip |
Calls: Fix device selector for multi-party calls, allow picking device before call started
Diffstat (limited to 'plugins/rtp/src/device.vala')
-rw-r--r-- | plugins/rtp/src/device.vala | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/plugins/rtp/src/device.vala b/plugins/rtp/src/device.vala index aca97578..d4eca09a 100644 --- a/plugins/rtp/src/device.vala +++ b/plugins/rtp/src/device.vala @@ -18,12 +18,14 @@ public class Dino.Plugins.Rtp.Device : MediaDevice, Object { public string id { owned get { return device_name; }} public string display_name { owned get { return device_display_name; }} - public string detail_name { owned get { - return device.properties.get_string("alsa.card_name") ?? device.properties.get_string("alsa.name") ?? device.properties.get_string("alsa.id") ?? device.properties.get_string("api.v4l2.cap.card") ?? id; + public string? detail_name { owned get { + if (device.properties.has_field("alsa.card_name")) return device.properties.get_string("alsa.card_name"); + if (device.properties.has_field("alsa.name")) return device.properties.get_string("alsa.name"); + if (device.properties.has_field("alsa.id")) return device.properties.get_string("alsa.id"); + if (device.properties.has_field("api.v4l2.cap.card")) return device.properties.get_string("api.v4l2.cap.card"); + return null; }} - - public Gst.Pipeline pipe { get { return plugin.pipe; }} - public string? media { get { + public string? media { owned get { if (device.has_classes("Audio")) { return "audio"; } else if (device.has_classes("Video")) { @@ -32,6 +34,9 @@ public class Dino.Plugins.Rtp.Device : MediaDevice, Object { return null; } }} + public bool incoming { get { return is_sink; } } + + public Gst.Pipeline pipe { get { return plugin.pipe; }} public bool is_source { get { return device.has_classes("Source"); }} public bool is_sink { get { return device.has_classes("Sink"); }} public bool is_monitor { get { return device.properties.get_string("device.class") == "monitor" || (protocol == DeviceProtocol.PIPEWIRE && device.has_classes("Stream")); } } |