GST: Add ability to use other device providers
Signed-off-by: Vasiliy Doylov <nekocwd@mainlining.org>
This commit is contained in:
parent
7710438ba2
commit
e03d344d48
2 changed files with 2 additions and 1 deletions
|
@ -14,6 +14,7 @@ Mostly made for PostmarketOS phones
|
|||
- `AUDIO_PROFILE` = `audio/x-ac3` - String - audio encoding
|
||||
- `CAM_CAPS` = auto max caps by default - String
|
||||
- `ONLY_FORMAT` = null - String, filter pixel formats to show only one (e.g `RGB`)
|
||||
- `CAM_PROVIDER` = `pipewiredeviceprovider` - String, camera provider name (e.g `libcameraprovider`)
|
||||
|
||||
## Project TODO:
|
||||
- [ ] Fix cam/mode switching? (I can't reproduce errors)
|
||||
|
|
|
@ -82,7 +82,7 @@ public class EyeNeko.Gstreamer : Object {
|
|||
public static Camera[] get_all () {
|
||||
if (cameras == null) {
|
||||
cameras = new Camera[0];
|
||||
var pwprovider = Gst.DeviceProviderFactory.get_by_name ("pipewiredeviceprovider");
|
||||
var pwprovider = Gst.DeviceProviderFactory.get_by_name (Env.get_variable_or ("CAM_PROVIDER", "pipewiredeviceprovider"));
|
||||
pwprovider.start ();
|
||||
foreach (var device in pwprovider.get_devices ()) {
|
||||
if (device.has_classes ("Video/Source")) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue