fixup! GST: Add caps selector
All checks were successful
PostmarketOS Build / Prepare (push) Successful in 15s
PostmarketOS Build / Build for aarch64 (push) Successful in 42s
PostmarketOS Build / Build for x86_64 (push) Successful in 13s

WIP

Signed-off-by: Vasiliy Doylov <nekocwd@mainlining.org>
This commit is contained in:
Vasiliy Doylov 2025-06-21 18:48:40 +03:00
parent 39c1790740
commit f68242c46d
Signed by: NekoCWD
GPG key ID: B7BE22D44474A582

View file

@ -32,6 +32,8 @@ public class EyeNeko.Gstreamer : Object {
available_caps.remove_all ();
for (uint i = 0; i < caps.get_size (); i++) {
var cap = new FriendlyCaps.with_struct (caps.get_structure (i));
if (cap.pixelformat != "RGB")
continue;
available_caps.append (cap);
best_caps = (best_caps == null || cap.is_res_better (best_caps)) ? cap : best_caps;
}
@ -57,7 +59,6 @@ public class EyeNeko.Gstreamer : Object {
foreach (var device in pwprovider.get_devices ()) {
if (device.has_classes ("Video/Source")) {
cameras += new Camera (device);
var id = Value (typeof (string));
message ("Camera appended %s:", device.display_name);
}
}