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.
This commit is contained in:
ArenM
2023-05-24 20:35:43 -04:00
parent a1243430b1
commit ebfcf10fa6

View File

@@ -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 =