From ebfcf10fa60292c3c41942a445834ed18b6e9837 Mon Sep 17 00:00:00 2001 From: ArenM Date: Wed, 24 May 2023 20:35:43 -0400 Subject: [PATCH] get pad from vid_if_bridge instead of io_v4l (MR 31) The camera pipline on the PinePhone the cameras connected to a bridge node instead of directly to the output. --- src/io_pipeline.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/io_pipeline.c b/src/io_pipeline.c index b720e03..1a7ab57 100644 --- a/src/io_pipeline.c +++ b/src/io_pipeline.c @@ -163,8 +163,15 @@ setup_camera(MPDeviceList **device_list, const struct mp_camera_config *config) exit(EXIT_FAILURE); } + const struct media_v2_entity *bridge = mp_device_find_entity_type( + info->device, MEDIA_ENT_F_VID_IF_BRIDGE); + if (!bridge) { + g_printerr("Could not find device bridge entity\n"); + bridge = entity; + } + const struct media_v2_pad *pad = - mp_device_get_pad_from_entity(info->device, entity->id); + mp_device_get_pad_from_entity(info->device, bridge->id); info->interface_pad_id = pad->id; const struct media_v2_interface *interface =