diff options
| author | Robert Mader <robert.mader@collabora.com> | 2025-07-20 03:50:45 +0200 |
|---|---|---|
| committer | Marvin W <git@larma.de> | 2025-10-06 21:22:58 +0200 |
| commit | e801d44b8472bf72ac04ed1c8faf6bd856f25def (patch) | |
| tree | 2fc684688001b16a63d4ec9f16090c3780278614 /plugins | |
| parent | f17926329915fcd8f95e00ab042d1a22ea2b7371 (diff) | |
Only support SystemMemory caps for video
An increasing number of video device providers, such as `pipewiresrc`
(in the upcoming 1.6 release) and `v4l2src` (since Gst 1.26), support
`memory:DMABuf` caps using the special `DMA_DRM` caps. This is not
expected and handled properly, thus filter out any non-default features.
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/rtp/src/device.vala | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/rtp/src/device.vala b/plugins/rtp/src/device.vala index 734d32d9..17803c6c 100644 --- a/plugins/rtp/src/device.vala +++ b/plugins/rtp/src/device.vala @@ -362,8 +362,9 @@ public class Dino.Plugins.Rtp.Device : MediaDevice, Object { int best_height = 0; for (int i = 0; i < device.caps.get_size(); i++) { unowned Gst.Structure? that = device.caps.get_structure(i); + unowned Gst.CapsFeatures? features = device.caps.get_features(i); Value? best_fraction_now = null; - if (!that.has_name("video/x-raw")) continue; + if (!that.has_name("video/x-raw") || !features.contains("memory:SystemMemory")) continue; int num = 0, den = 0, width = 0, height = 0; if (!that.has_field("framerate")) continue; Value framerate = that.get_value("framerate"); @@ -402,7 +403,8 @@ public class Dino.Plugins.Rtp.Device : MediaDevice, Object { // No caps in first round, try without framerate for (int i = 0; i < device.caps.get_size(); i++) { unowned Gst.Structure? that = device.caps.get_structure(i); - if (!that.has_name("video/x-raw")) continue; + unowned Gst.CapsFeatures? features = device.caps.get_features(i); + if (!that.has_name("video/x-raw") || !features.contains("memory:SystemMemory")) continue; int width = 0, height = 0; if (!that.has_field("width") || !that.get_int("width", out width)) continue; if (!that.has_field("height") || !that.get_int("height", out height)) continue; |
