Fix
Signed-off-by: Vasiliy Doylov <nekocwd@mainlining.org>
This commit is contained in:
parent
e3d22a9f54
commit
b396f42837
1 changed files with 4 additions and 2 deletions
|
@ -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 () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue