Fix
All checks were successful
PostmarketOS Build / Prepare (push) Successful in 8s
PostmarketOS Build / Build for aarch64 (push) Successful in 42s
PostmarketOS Build / Build for x86_64 (push) Successful in 12s

Signed-off-by: Vasiliy Doylov <nekocwd@mainlining.org>
This commit is contained in:
Vasiliy Doylov 2025-06-21 19:58:02 +03:00
parent e3d22a9f54
commit b396f42837
Signed by: NekoCWD
GPG key ID: B7BE22D44474A582

View file

@ -102,19 +102,21 @@ public class EyeNeko.Gstreamer : Object {
}
public void start_stream_from (Camera? camera) {
message ("Stream stop");
camerabin.set_state (Gst.State.NULL);
if (camera == null)
return;
if (current_camera != camera) {
current_camera = camera;
set_up_caps (camera.device);
return; // `start_stream_from` will be called again after `set_up_caps`
}
var caps = ((FriendlyCaps) caps_selecton_model.selected_item).to_caps ().to_string ();
message ("Starting stream with %s", caps);
camerabin.set_state (Gst.State.NULL);
camerasrc_wrapper.set_property
("video-source",
new Elements.CameraSrc (camera.device.create_element (null), Gst.Caps.from_string (Env.get_variable_or ("CAM_CAPS", caps))));
camerabin.set_state (Gst.State.PLAYING);
message ("Started stream with %s", caps);
}
private void add_enc_profile () {