Camera improvement suggestions
On a PPP the camera switcher still uses the technical names ov8858
and imx258
instead of what Gstreamer considers the right names (Built-in Front Camera
and Built-in Back Camera
, see monitor output below. Using those names would make things clearer for users.
`gst-device-monitor-1.0 Video/Source`
name : Built-in Front Camera
class : Video/Source
caps : video/x-raw, format=NV21, width=640, height=480
...
video/x-raw, format=YUY2, width=3200, height=2400
properties:
api.libcamera.location = front
api.libcamera.path = /base/i2c@ff110000/camera@36
device.api = libcamera
device.description = ov8858
device.devids = 20740 20741 20742
device.id = 36
device.name = libcamera_device./base/i2c@ff110000/camera@36
device.product.name = ov8858
factory.name = api.libcamera.source
media.class = Video/Source
node.description = Built-in Front Camera
node.name = libcamera_input._base_i2c_ff110000_camera_36
node.nick = ov8858
node.pause-on-idle = false
object.path = libcamera:/base/i2c@ff110000/camera@36
priority.session = 800
factory.id = 10
client.id = 33
clock.quantum-limit = 8192
media.role = Camera
node.driver = true
object.id = 50
object.serial = 50
gst-launch-1.0 pipewiresrc target-object=50 ! ...
Device found:
name : Built-in Back Camera
class : Video/Source
caps : video/x-raw, format=NV21, width=640, height=480
...
video/x-raw, format=YUY2, width=3840, height=2400
properties:
api.libcamera.location = back
api.libcamera.path = /base/i2c@ff110000/camera@1a
device.api = libcamera
device.description = imx258
device.devids = 20749 20750 20751
device.id = 37
device.name = libcamera_device./base/i2c@ff110000/camera@1a
device.product.name = imx258
factory.name = api.libcamera.source
media.class = Video/Source
node.description = Built-in Back Camera
node.name = libcamera_input._base_i2c_ff110000_camera_1a
node.nick = imx258
node.pause-on-idle = false
object.path = libcamera:/base/i2c@ff110000/camera@1a
priority.session = 750
factory.id = 10
client.id = 33
clock.quantum-limit = 8192
media.role = Camera
node.driver = true
object.id = 52
object.serial = 52
gst-launch-1.0 pipewiresrc target-object=52 ! ...
Additionally, it would probably make sense to check for api.libcamera.location = back
(see log above again), which is likely the preferred camera for QR-code scanning, and use that by default.