Browse Source

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.
ArenM 1 year ago
parent
commit
ebfcf10fa6
1 changed files with 8 additions and 1 deletions
  1. 8 1
      src/io_pipeline.c

+ 8 - 1
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 =