diff options
author | fiaxh <git@lightrise.org> | 2022-02-10 15:41:24 +0100 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2022-02-10 15:43:34 +0100 |
commit | dbc6d87cb9c26a5858ccf7400a43cdd4f6f26971 (patch) | |
tree | 9f5433e0ba209d4f37e543f396ca719ad29c26c5 /plugins | |
parent | 28248607f03bfd3e5fc6b29e0528edfd4f04a601 (diff) | |
download | dino-dbc6d87cb9c26a5858ccf7400a43cdd4f6f26971.tar.gz dino-dbc6d87cb9c26a5858ccf7400a43cdd4f6f26971.zip |
Various call fixes
- Don't create incoming CIM calls twice
- Fix is_color check for video devices w/ multiple formats
- Tolerate mismatching content creator on jingle responses
- Change MUJI namespace to urn:xmpp:jingle:muji:0
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/rtp/src/plugin.vala | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/plugins/rtp/src/plugin.vala b/plugins/rtp/src/plugin.vala index e7ee7117..2469a967 100644 --- a/plugins/rtp/src/plugin.vala +++ b/plugins/rtp/src/plugin.vala @@ -350,10 +350,16 @@ public class Dino.Plugins.Rtp.Plugin : RootInterface, VideoCallPlugin, Object { if (device.media != "video") continue; if (device.is_sink) continue; + // Skip monitors + if (device.is_monitor) continue; + bool is_color = false; for (int i = 0; i < device.device.caps.get_size(); i++) { unowned Gst.Structure structure = device.device.caps.get_structure(i); - if (structure.has_field("format") && !structure.get_string("format").has_prefix("GRAY")) { + if (!structure.has_field("format")) continue; + // "format" might be an array and get_string() will then return null. We just assume arrays to be fine. + string? format = structure.get_string("format"); + if (format == null || !format.has_prefix("GRAY")) { is_color = true; } } @@ -361,9 +367,6 @@ public class Dino.Plugins.Rtp.Plugin : RootInterface, VideoCallPlugin, Object { // Don't allow grey-scale devices if (!is_color) continue; - // Skip monitors - if (device.is_monitor) continue; - if (device.protocol == DeviceProtocol.PIPEWIRE) { pipewire_devices.add(device); } else { |