Env: Add CAM_CAPS variable - way to set custom caps

Signed-off-by: Vasiliy Doylov <nekocwd@mainlining.org>
This commit is contained in:
Vasiliy Doylov 2025-06-21 04:46:45 +03:00
parent ed9f331c37
commit b0793933aa
Signed by: NekoCWD
GPG key ID: B7BE22D44474A582
2 changed files with 5 additions and 1 deletions

View file

@ -12,6 +12,7 @@ Mostly made for PostmarketOS phones
- `VIDEO_ENCODE` = `x264enc tune=zerolatency speed-preset=ultrafast bitrate=8192` - String, video encode pipeline
- `AUDIO_ENABLED` = `true` - Bool, is audio record enabled (`false` to disable)
- `AUDIO_PROFILE` = `audio/x-ac3` - String - audio encoding
- `CAM_CAPS` = auto max caps by default - String
## Project TODO:
- [ ] Fix cam/mode switching? (I can't reproduce errors)
- [ ] Simplify customization

View file

@ -131,7 +131,10 @@ public class EyeNeko.Gstreamer : Object {
camerasrc_wrapper.set_property
("video-source",
new Elements.CameraSrc (camera.device.create_element (null),
get_best_caps (camera.device)));
Gst.Caps.from_string (
Env.get_variable_or ("CAM_CAPS",
get_best_caps (camera.device).to_string ()
))));
camerabin.set_state (Gst.State.PLAYING);
}